On Mon, Jan 19, 2026 at 12:31 PM Rahila Syed <[email protected]> wrote: > Starting a transaction from CFI works for a client backend but > not for auxiliary processes. When I try to execute StartTransaction() > from a checkpointer process, the following assertion fails, > Assert(MyProc->vxid.procNumber == vxid.procNumber); > This is because MyProc->vxid.procNumber is not set for auxiliary > processes.
Unfortunately, somebody is going to need to think through - and perhaps test - what happens in each individual type of background process -- not just auxiliary processes but also background workers, including but not limited to parallel workers. Some of them have error recovery logic that is similar to transaction cleanup but only covers a subset of things, in which case the question will be whether that logic handles all the kinds of resources that this code might acquire. Some of them may just straight up kill the process if an error occurs, which is fine for this patch as long as it only happens in extreme situations (e.g. OOM). In other words, we don't necessarily need a transaction specifically, but we need whatever form of error recovery is in use in any given process to be appropriate to the code that this patch proposes to execute. For a regular backend, that's a transaction. Also worth noting: I don't think that all backend types actually use CHECK_FOR_INTERRUPTS(). For those that don't, other updates may be needed to make this feature work. -- Robert Haas EDB: http://www.enterprisedb.com
