pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Melanie Plageman <melanieplageman@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Test that vacuum removes tuples older than OldestXmin
Date: Fri, 19 Jul 2024 16:15:25 +0000
Message-ID: <E1sUqGT-000Hl5-5B@gemulon.postgresql.org> (raw)

Test that vacuum removes tuples older than OldestXmin

If vacuum fails to prune a tuple killed before OldestXmin, it will
decide to freeze its xmax and later error out in pre-freeze checks.

Add a test reproducing this scenario to the recovery suite which creates
a table on a primary, updates the table to generate dead tuples for
vacuum, and then, during the vacuum, uses a replica to force
GlobalVisState->maybe_needed on the primary to move backwards and
precede the value of OldestXmin set at the beginning of vacuuming the
table.

This commit is separate from the fix in case there are test stability
issues.

Author: Melanie Plageman
Reviewed-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAAKRu_apNU2MPBK96V%2BbXjTq0RiZ-%3DA4ZTaysakpx9jxbq1dbQ%40mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/test/recovery/meson.build                   |   1 +
src/test/recovery/t/043_vacuum_horizon_floor.pl | 268 ++++++++++++++++++++++++
2 files changed, 269 insertions(+)



view thread (7+ messages)  latest in thread

Message-ID: <E1sUqGT-000Hl5-5B@gemulon.postgresql.org>
Permalink:  ../E1sUqGT-000Hl5-5B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sUqGT-000Hl5-5B@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: melanieplageman@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Test that vacuum removes tuples older than OldestXmin
  In-Reply-To: <E1sUqGT-000Hl5-5B@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