From 74b483dc67458acddd137a2d89e3bfe82d466833 Mon Sep 17 00:00:00 2001 From: Mark Dilger Date: Tue, 16 Mar 2021 09:43:44 -0700 Subject: [PATCH v8 5/5] Adding pg_amcheck special test for pg_statistic The pg_statistic catalog contains columns of type anyarray, which is unusual. Failures have been observed on build animals hornet and tern when pg_amcheck checks pg_statistic. These types of failures are reproduced with this new test. --- src/bin/pg_amcheck/t/006_pg_statistic.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/bin/pg_amcheck/t/006_pg_statistic.pl diff --git a/src/bin/pg_amcheck/t/006_pg_statistic.pl b/src/bin/pg_amcheck/t/006_pg_statistic.pl new file mode 100644 index 0000000000..0fa84e118a --- /dev/null +++ b/src/bin/pg_amcheck/t/006_pg_statistic.pl @@ -0,0 +1,20 @@ +use strict; +use warnings; + +use PostgresNode; +use Test::More tests => 3; + +# Test set-up +my $node = get_new_node('test'); +$node->init; +$node->start; + +$node->safe_psql('postgres', q(CREATE EXTENSION amcheck)); +$node->safe_psql('postgres', q(ANALYZE)); + +$node->command_checks_all( + [ 'pg_amcheck','-t', 'pg_catalog.pg_statistic', 'postgres' ], + 0, + [ qr/^$/ ], + [ qr/^$/ ], + 'pg_amcheck pg_statistic'); -- 2.21.1 (Apple Git-122.3)