pgsql: Extend PageIsVerified() to handle more custom options

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Extend PageIsVerified() to handle more custom options
Date: 2020-11-02 01:45:23
Message-ID: E1kZOuR-0006Zn-JE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Extend PageIsVerified() to handle more custom options

This is useful for checks of relation pages without having to load the
pages into the shared buffers, and two cases can make use of that: page
verification in base backups and the online, lock-safe, flavor.

Compatibility is kept with past versions using a routine that calls the
new extended routine with the set of options compatible with the
original version. Contrary to d401c576, a macro cannot be used as there
may be external code relying on the presence of the original routine.

This is applied down to 11, where this will be used by a follow-up
commit addressing a set of issues with page verification in base
backups.

Extracted from a larger patch by the same author.

Author: Anastasia Lubennikova
Reviewed-by: Michael Paquier, Julien Rouhaud
Discussion: https://postgr.es/m/608f3476-0598-2514-2c03-e05c7d2b0cbd@postgrespro.ru
Backpatch-through: 11

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/backend/catalog/storage.c | 3 ++-
src/backend/storage/buffer/bufmgr.c | 6 ++++--
src/backend/storage/page/bufpage.c | 32 ++++++++++++++++++++++++++------
src/include/storage/bufpage.h | 7 +++++++
4 files changed, 39 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2020-11-02 02:57:47 pgsql: Use Enum for top level logical replication message types.
Previous Message David Rowley 2020-11-02 00:49:52 pgsql: Allow run-time pruning on nested Append/MergeAppend nodes