pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix parallel operations that prevent oldest xmin from advancing.
Date: Fri, 19 Nov 2021 04:02:32 +0000
Message-ID: <E1mnv6e-0003Qw-Ft@gemulon.postgresql.org> (raw)

Fix parallel operations that prevent oldest xmin from advancing.

While determining xid horizons, we skip over backends that are running
Vacuum. We also ignore Create Index Concurrently, or Reindex Concurrently
for the purposes of computing Xmin for Vacuum. But we were not setting the
flags corresponding to these operations when they are performed in
parallel which was preventing Xid horizon from advancing.

The optimization related to skipping Create Index Concurrently, or Reindex
Concurrently operations was implemented in PG-14 but the fix is the same
for the Parallel Vacuum as well so back-patched till PG-13.

Author: Masahiko Sawada
Reviewed-by: Amit Kapila
Backpatch-through: 13
Discussion: https://postgr.es/m/CAD21AoCLQqgM1sXh9BrDFq0uzd3RBFKi=Vfo6cjjKODm0Onr5w@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/33b6dd83e26f06c96e7d54af534a70476749cbab

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c |  6 ++++++
src/backend/storage/ipc/procarray.c  | 16 ++++++++++++++--
src/include/storage/proc.h           |  7 +++++++
3 files changed, 27 insertions(+), 2 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1mnv6e-0003Qw-Ft@gemulon.postgresql.org>
Permalink:  ../E1mnv6e-0003Qw-Ft@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mnv6e-0003Qw-Ft@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: akapila@postgresql.org
  Subject: Re: pgsql: Fix parallel operations that prevent oldest xmin from advancing.
  In-Reply-To: <E1mnv6e-0003Qw-Ft@gemulon.postgresql.org>
  References: <E1mnv6e-0003Qw-Ft@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