pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: VACUUM: ignore indexing operations with CONCURRENTLY
Date: Tue, 23 Feb 2021 15:21:02 +0000
Message-ID: <E1lEZUk-0002sY-MB@gemulon.postgresql.org> (raw)

VACUUM: ignore indexing operations with CONCURRENTLY

As envisioned in commit c98763bf51bf, it is possible for VACUUM to
ignore certain transactions that are executing CREATE INDEX CONCURRENTLY
and REINDEX CONCURRENTLY for the purposes of computing Xmin; that's
because we know those transactions are not going to examine any other
tables, and are not going to execute anything else in the same
transaction.  (Only operations on "safe" indexes can be ignored: those
on indexes that are neither partial nor expressional).

This is extremely useful in cases where CIC/RC can run for a very long
time, because that used to be a significant headache for concurrent
vacuuming of other tables.

Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/20210115133858.GA18931@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d9d076222f5b94a85e0e318339cfc44b8f26022d

Modified Files
--------------
doc/src/sgml/ref/create_index.sgml  |  2 ++
doc/src/sgml/ref/reindex.sgml       |  2 ++
src/backend/storage/ipc/procarray.c | 42 ++++++++++++++++++++++++++++++-------
src/backend/utils/misc/guc.c        |  2 +-
4 files changed, 39 insertions(+), 9 deletions(-)



Message-ID: <E1lEZUk-0002sY-MB@gemulon.postgresql.org>
Permalink:  ../E1lEZUk-0002sY-MB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lEZUk-0002sY-MB@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: VACUUM: ignore indexing operations with CONCURRENTLY
  In-Reply-To: <E1lEZUk-0002sY-MB@gemulon.postgresql.org>
  References: <E1lEZUk-0002sY-MB@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox