On Fri, 2024-02-16 at 13:08 +0530, Bharath Rupireddy wrote: > I'd suggest we strike a balance here - error out in assert builds if > startptr+count is past the current insert position and trust the > callers for production builds.
It's not reasonable to have divergent behavior between assert-enabled builds and production. I think for now I will just commit the Assert as Andres suggested until we work out a few more details. One idea is to use Álvaro's work to eliminate the spinlock, and then add a variable to represent the last known point returned by WaitXLogInsertionsToFinish(). Then we can cheaply Assert that the caller requested something before that point. > Here, I'm with v23 patch set: Thank you, I'll look at these. Regards, Jeff Davis