diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2021-09-28 15:26:25 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2021-09-28 15:26:25 +0200 |
commit | c3b011d9918100c6ec2d72297fb51635bce70e80 (patch) | |
tree | 4d45773b7c550835a17a3b9ccf6c37344a3d68ba /src | |
parent | 7d1aa6bf1c27bf7438179db446f7d1e72ae093d0 (diff) | |
download | postgresql-c3b011d9918100c6ec2d72297fb51635bce70e80.tar.gz postgresql-c3b011d9918100c6ec2d72297fb51635bce70e80.zip |
Support amcheck of sequences
Sequences were left out of the list of relation kinds that
verify_heapam knew how to check, though it is fairly trivial to allow
them. Doing that, and while at it, updating pg_amcheck to include
sequences in relations matched by table and relation patterns.
Author: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/81ad4757-92c1-4aa3-7bee-f609544837e3%40enterprisedb.com
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_amcheck/pg_amcheck.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_amcheck/pg_amcheck.c b/src/bin/pg_amcheck/pg_amcheck.c index 9b6ab248106..ec04b977de0 100644 --- a/src/bin/pg_amcheck/pg_amcheck.c +++ b/src/bin/pg_amcheck/pg_amcheck.c @@ -1910,14 +1910,14 @@ compile_relation_list_one_db(PGconn *conn, SimplePtrList *relations, if (opts.allrel) appendPQExpBuffer(&sql, " AND c.relam = %u " - "AND c.relkind IN ('r', 'm', 't') " + "AND c.relkind IN ('r', 'S', 'm', 't') " "AND c.relnamespace != %u", HEAP_TABLE_AM_OID, PG_TOAST_NAMESPACE); else appendPQExpBuffer(&sql, " AND c.relam IN (%u, %u)" - "AND c.relkind IN ('r', 'm', 't', 'i') " - "AND ((c.relam = %u AND c.relkind IN ('r', 'm', 't')) OR " + "AND c.relkind IN ('r', 'S', 'm', 't', 'i') " + "AND ((c.relam = %u AND c.relkind IN ('r', 'S', 'm', 't')) OR " "(c.relam = %u AND c.relkind = 'i'))", HEAP_TABLE_AM_OID, BTREE_AM_OID, HEAP_TABLE_AM_OID, BTREE_AM_OID); |