From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Support RBM_ZERO_AND_CLEANUP_LOCK in ExtendBufferedRelTo(), add
Date: Fri, 14 Apr 2023 18:38:37 +0000
Message-ID: <E1pnOJg-0034YX-9D@gemulon.postgresql.org> (raw)
Support RBM_ZERO_AND_CLEANUP_LOCK in ExtendBufferedRelTo(), add tests
For some reason I had not implemented RBM_ZERO_AND_CLEANUP_LOCK support in
ExtendBufferedRelTo(), likely thinking it not being reachable. But it is
reachable, e.g. when replaying a WAL record for a page in a relation that
subsequently is truncated (likely only reachable when doing crash recovery or
PITR, not during ongoing streaming replication).
As now all of the RBM_* modes are supported, remove assertions checking mode.
As we had no test coverage for this scenario, add a new TAP test. There's
plenty more that ought to be tested in this area...
Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Reviewed-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/392271.1681238924%40sss.pgh.pa.us
Discussion: https://postgr.es/m/0b5eb82b-cb99-e0a4-b932-3dc60e2e3926@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/43a33ef54e503b61f269d088f2623ba3b9484ad7
Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 28 +++---
src/test/recovery/meson.build | 1 +
src/test/recovery/t/036_truncated_dropped.pl | 136 +++++++++++++++++++++++++++
3 files changed, 154 insertions(+), 11 deletions(-)
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: andres@anarazel.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Support RBM_ZERO_AND_CLEANUP_LOCK in ExtendBufferedRelTo(), add
In-Reply-To: <E1pnOJg-0034YX-9D@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