On Sat, Nov 21, 2026 at 09:49:28AM -0800, surya poondla wrote: > Regarding the backpatch, I agree that the error itself is rare. But no > explicit SAVEPOINT is > needed, a PL/pgSQL EXCEPTION block around the DDL is enough, and that > pattern is common. When it happens, no checkpoint can complete until the > transaction ends.
The error is not only rare, it could only be caused due to an environment-related issue and would never be seen under normal running conditions: - smgrregistersync() is the only path that can fail (okay, mdregistersync(), most likely depending on what's registered). - mdnblocks() after a FileSize(), seek failure. - Some OOMs, around paths with some repalloc or simpler pallocs. One that may be the most problematic is indeed when the sync request is pushed with roughly register_dirty_segment() -> ForwardSyncRequest(), but that's also unlikely. So as a whole I'm content with leaving that as a HEAD-only improvement, as any fixes in this realm like OOMs that can only be hit in a dedicated path. If there are more voices in favor of a backpatch, let's re-evaluate that later if required. I was also wondering if resetting the flag in some of the sub-transaction failure paths would be an interesting thing to do, but I cannot get much excited about that, as all the other code paths using the checkpoint flags are already under some critical section anyway. So it would not buy much. Or we could just backpatch what's now 9931482364a9 down to v17, to discard the whole set of issues.. Hence, applied only on HEAD for now. -- Michael
signature.asc
Description: PGP signature
