Re: Parallel vacuum workers prevent the oldest xmin from advancing

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel vacuum workers prevent the oldest xmin from advancing
Date: 2021-10-12 06:53:31
Message-ID: CAD21AoBJwiAbTkjCFeFmHzH6F_ySU8pO2k_2Mkzb6TVd0tLmoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 11, 2021 at 9:51 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Mon, Oct 11, 2021 at 09:23:32AM +0900, Masahiko Sawada wrote:
> > On Sat, Oct 9, 2021 at 12:13 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> >> * PROC_VACUUM_FOR_WRAPAROUND. Should be innocuous I think, since the
> >> "parent" process already has this flag and thus shouldn't be cancelled.
> >
> > Currently, we don't support parallel vacuum for autovacuum. So
> > parallel workers for vacuum don't have these two flags.
>
> That's something that should IMO be marked in the code as a comment as
> something to worry about once/if someone begins playing with parallel
> autovacuum. If the change involving autovacuum is simple, I see no
> reason to not add this part now, though.

Agreed. I added the comment. Also, I added an assertion to ensure that
a parallel worker for vacuum has PROC_IN_VACUUM flag (and doesn't have
other flags). But we cannot do that for parallel workers for building
btree index as they don’t know whether or not the CONCURRENTLY option
is specified.

Regards,

--
Masahiko Sawada
EDB: https://www.enterprisedb.com/

Attachment Content-Type Size
copy_status_flags_v2.patch application/octet-stream 2.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2021-10-12 06:54:06 RE: Added schema level support for publication.
Previous Message Bharath Rupireddy 2021-10-12 06:46:07 Re: Accommodate startup process in a separate ProcState array slot instead of in MaxBackends slots.