pgsql: Fix parallel operations that prevent oldest xmin from advancing. - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Fix parallel operations that prevent oldest xmin from advancing.
Date
Msg-id E1mnv6e-0003Qt-FS@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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_14_STABLE

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

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c |  6 ++++++
src/backend/access/nbtree/nbtsort.c  |  7 +++++++
src/backend/storage/ipc/procarray.c  | 17 +++++++++++++++--
src/include/storage/proc.h           |  7 +++++++
4 files changed, 35 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Improve psql tab completion for transforms, domains and sequence
Next
From: Andres Freund
Date:
Subject: pgsql: Initialize backend status reporting during bootstrap.