Re: Parallel vacuum workers prevent the oldest xmin from advancing
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-10-07T05:56:14Z
Lists: pgsql-hackers
On Wed, Oct 6, 2021 at 12:41 PM Masahiko Sawada <sawada.mshk@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.
Commits
-
Fix parallel operations that prevent oldest xmin from advancing.
- 33b6dd83e26f 13.6 landed
- ead49ebc07a7 14.2 landed
- 0f0cfb494004 15.0 landed