postgresql/src/bin
Peter Geoghegan d2bf06db37 pg_amcheck: avoid unhelpful verification attempts.
Avoid calling contrib/amcheck functions with relations that are
unsuitable for checking.  Specifically, don't attempt verification of
temporary relations, or indexes whose pg_index entry indicates that the
index is invalid, or not ready.

These relations are not supported by any of the contrib/amcheck
functions, for reasons that are pretty fundamental.  For example, the
implementation of REINDEX CONCURRENTLY can add its own "transient"
pg_index entries, which has rather unclear implications for the B-Tree
verification functions, at least in the general case -- so they just
treat it as an error.  It falls to the amcheck caller (in this case
pg_amcheck) to deal with the situation at a higher level.

pg_amcheck now simply treats these conditions as additional "visibility
concerns" when it queries system catalogs.  This is a little arbitrary.
It seems to have the least problems among any of the available
alternatives.

Author: Mark Dilger <mark.dilger@enterprisedb.com>
Reported-By: Alexander Lakhin <exclusion@gmail.com>
Reviewed-By: Peter Geoghegan <pg@bowt.ie>
Reviewed-By: Robert Haas <robertmhaas@gmail.com>
Bug: #17212
Discussion: https://postgr.es/m/17212-34dd4a1d6bba98bf@postgresql.org
Backpatch: 14-, where pg_amcheck was introduced.
2021-10-13 14:08:12 -07:00
..
initdb Update our mapping of Windows time zone names some more. 2021-10-04 14:52:39 -04:00
pg_amcheck pg_amcheck: avoid unhelpful verification attempts. 2021-10-13 14:08:12 -07:00
pg_archivecleanup Add more $Test::Builder::Level in the TAP tests 2021-10-12 11:15:44 +09:00
pg_basebackup Flexible options for CREATE_REPLICATION_SLOT. 2021-10-05 12:52:49 -04:00
pg_checksums Fix some issues with TAP tests for postgres -C 2021-09-22 10:13:38 +09:00
pg_config Translation updates 2021-06-21 12:33:50 +02:00
pg_controldata Unify PostgresNode's new() and get_new_node() methods 2021-07-29 05:58:08 -04:00
pg_ctl Add more $Test::Builder::Level in the TAP tests 2021-10-12 11:15:44 +09:00
pg_dump Revoke PUBLIC CREATE from public schema, now owned by pg_database_owner. 2021-09-09 23:38:09 -07:00
pg_resetwal pg_resetwal: Improve numeric command-line argument parsing 2021-08-20 10:51:59 +02:00
pg_rewind Fix incorrect format placeholders 2021-09-15 09:19:01 +02:00
pg_test_fsync Support direct I/O on macOS. 2021-07-19 11:01:01 +12:00
pg_test_timing Translation updates 2021-06-21 12:33:50 +02:00
pg_upgrade Fix tests of pg_upgrade across different major versions 2021-10-13 09:22:00 +09:00
pg_verifybackup Add more $Test::Builder::Level in the TAP tests 2021-10-12 11:15:44 +09:00
pg_waldump Remove some unnecessary casts in format arguments 2021-08-08 22:08:07 +02:00
pgbench Fix incorrect format placeholder 2021-10-13 08:20:59 +02:00
pgevent Update copyright for 2021 2021-01-02 13:06:25 -05:00
psql psql: Fix some scan-build warnings 2021-10-12 21:20:29 +02:00
scripts Unify PostgresNode's new() and get_new_node() methods 2021-07-29 05:58:08 -04:00
Makefile Add pg_amcheck, a CLI for contrib/amcheck. 2021-03-12 13:00:01 -05:00