pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: amcheck: Skip unlogged relations in Hot Standby.
2+ messages / 1 participants
[nested] [flat]

* pgsql: amcheck: Skip unlogged relations in Hot Standby.
@ 2021-10-12 00:23  Peter Geoghegan <pg@bowt.ie>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Geoghegan @ 2021-10-12 00:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

amcheck: Skip unlogged relations in Hot Standby.

Have verify_heapam.c treat unlogged relations as if they were simply
empty when in Hot Standby mode.  This brings it in line with
verify_nbtree.c, which has handled unlogged relations in the same way
since bugfix commit 6754fe65a4.  This was an oversight in commit
866e24d47d, which extended contrib/amcheck to check heap relations.

In passing, lower the verbosity used when reporting that a relation has
been skipped like this, from NOTICE to DEBUG1.  This is appropriate
because the skipping behavior is only an implementation detail, needed
to work around the fact that unlogged tables don't have smgr-level
storage for their main fork when in Hot Standby mode.

Affected unlogged relations should be considered "trivially verified",
not skipped over.  They are verified in the same sense that a totally
empty relation can be verified.  This behavior seems least surprising
overall, since unlogged relations on a replica will initially be empty
if and when the replica is promoted and Hot Standby ends.

Author: Mark Dilger <mark.dilger@enterprisedb.com>
Reviewed-By: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-Wzk_pukOFY7JmdiFLsrz+Pd3V8OwgC1TH2Vd5BH5ZgK4bA@mail.gmail.com
Backpatch: 14-, where heapam verification was introduced.

Branch
------
REL_14_STABLE

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

Modified Files
--------------
contrib/amcheck/verify_heapam.c | 16 ++++++++++++++++
contrib/amcheck/verify_nbtree.c |  5 +++--
2 files changed, 19 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: amcheck: Skip unlogged relations in Hot Standby.
@ 2021-10-12 00:23  Peter Geoghegan <pg@bowt.ie>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Geoghegan @ 2021-10-12 00:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

amcheck: Skip unlogged relations in Hot Standby.

Have verify_heapam.c treat unlogged relations as if they were simply
empty when in Hot Standby mode.  This brings it in line with
verify_nbtree.c, which has handled unlogged relations in the same way
since bugfix commit 6754fe65a4.  This was an oversight in commit
866e24d47d, which extended contrib/amcheck to check heap relations.

In passing, lower the verbosity used when reporting that a relation has
been skipped like this, from NOTICE to DEBUG1.  This is appropriate
because the skipping behavior is only an implementation detail, needed
to work around the fact that unlogged tables don't have smgr-level
storage for their main fork when in Hot Standby mode.

Affected unlogged relations should be considered "trivially verified",
not skipped over.  They are verified in the same sense that a totally
empty relation can be verified.  This behavior seems least surprising
overall, since unlogged relations on a replica will initially be empty
if and when the replica is promoted and Hot Standby ends.

Author: Mark Dilger <mark.dilger@enterprisedb.com>
Reviewed-By: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-Wzk_pukOFY7JmdiFLsrz+Pd3V8OwgC1TH2Vd5BH5ZgK4bA@mail.gmail.com
Backpatch: 14-, where heapam verification was introduced.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/292698f158ddb3f9a88f536e6eecb9e55d9619c9

Modified Files
--------------
contrib/amcheck/verify_heapam.c | 16 ++++++++++++++++
contrib/amcheck/verify_nbtree.c |  5 +++--
2 files changed, 19 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-10-12 00:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 00:23 pgsql: amcheck: Skip unlogged relations in Hot Standby. Peter Geoghegan <pg@bowt.ie>
2021-10-12 00:23 pgsql: amcheck: Skip unlogged relations in Hot Standby. Peter Geoghegan <pg@bowt.ie>

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