On Wed, Oct 6, 2021 at 12:41 PM Masahiko Sawada <sawada.m...@gmail.com> wrote: > > Hi all, > > A customer reported that during parallel index vacuum, the oldest xmin > doesn't advance. Normally, the calculation of oldest xmin > (ComputeXidHorizons()) ignores xmin/xid of processes having > PROC_IN_VACUUM flag in MyProc->statusFlags. But since parallel vacuum > workers don’t set their statusFlags, the xmin of the parallel vacuum > worker is considered to calculate the oldest xmin. This issue happens > from PG13 where the parallel vacuum was introduced. I think it's a > bug. >
I agree. Your patch seems to be in the right direction but I haven't tested it yet. Feel free to register in the next CF to avoid forgetting it. -- With Regards, Amit Kapila.