On Wed, Nov 11, 2026 at 1:16 PM Xuneng Zhou <[email protected]> wrote:
> On Wed, Nov 11, 2026 at 11:25 AM shihao zhong <[email protected]> > wrote: > > > > Hi Xuneng, > > > > Thanks for reviewing this patch. > > > > > The diganose of the problem seems good to me. The fix is small and > > > helps to mitigate the stall. > > > > Yes, so I think we can start from the existing patch and get it > backpatched. > > Make sense. I'll look into this one. > > > > A more ideal fix seems to be more > > > event-driven -- let the late pinners cancel themselves. > > > > If I understand correctly, you are referring to changing the PINBuffer > logic > > where the backend sees BM_PIN_COUNT_WAITER and cancels itself? > > > > I am not sure if that is the best approach as PinBuffer is in the hot > path. > > Honestly, I don't have a concrete idea of how to do this for now. Just > a natural thought of keeping the stall causers away instead of asking > them to leave repeatedly. I found the COW idea mentioned by Satya pretty interesting. Fundamentally, we use cleanup lock to ensure that replay doesn't move bytes while readers point at them. COW could guarantee this without the problems related to $subject. [1] https://postgr.es/m/[email protected] [2] https://postgr.es/m/cahg+qdf3ncb3voaqq5efcv5dyyuz9sncsjau-x1jdbtcjk3...@mail.gmail.com -- Regards, Xuneng Zhou HighGo Software Co., Ltd.
