]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Extend PageIsVerified() to handle more custom options
authorMichael Paquier <michael@paquier.xyz>
Mon, 2 Nov 2020 01:41:34 +0000 (10:41 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 2 Nov 2020 01:41:34 +0000 (10:41 +0900)
commit0a593bc4674f4f08333447facc111c9659f3d4f8
treec226b0266b1a245814599cd1097c69b7f619c95b
parentd1ac060e63961fc6d5eadd27729ff29d5a52f9f1
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
src/backend/storage/buffer/bufmgr.c
src/backend/storage/page/bufpage.c
src/include/storage/bufpage.h