Re: {CREATE INDEX, REINDEX} CONCURRENTLY improvements

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Hamid Akhtar <hamid.akhtar@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-01-18T20:27:34Z
Lists: pgsql-hackers
On 2021-Jan-18, Matthias van de Meent wrote:

> On Fri, 15 Jan 2021 at 15:29, Álvaro Herrera <alvherre@alvh.no-ip.org> wrote:

> Would this not need to be the following? Right now, it resets
> potentially older h->catalog_oldest_nonremovable (which is set in the
> PROC_IN_SAFE_IC branch).
> 
> > +            if (statusFlags & PROC_IN_SAFE_IC)
> > +                h->catalog_oldest_nonremovable =
> > +                    TransactionIdOlder(h->catalog_oldest_nonremovable, xmin);
> > +            else
> > +            {
> > +                h->data_oldest_nonremovable =
> > +                    TransactionIdOlder(h->data_oldest_nonremovable, xmin);
> > +                h->catalog_oldest_nonremovable =
> > +                    TransactionIdOlder(h->catalog_oldest_nonremovable, xmin);
> > +            }

Oops, you're right.

-- 
Álvaro Herrera       Valdivia, Chile



Commits

  1. VACUUM: ignore indexing operations with CONCURRENTLY

  2. Avoid spurious wait in concurrent reindex

  3. Invent struct ReindexIndexInfo