diff --strip-trailing-cr -U3 C:/cirrus/contrib/pgstattuple/expected/pgstattuple.out C:/cirrus/build/testrun/pgstattuple/regress/results/pgstattuple.out --- C:/cirrus/contrib/pgstattuple/expected/pgstattuple.out 2025-12-07 14:50:49.874881900 +0000 +++ C:/cirrus/build/testrun/pgstattuple/regress/results/pgstattuple.out 2025-12-07 14:57:20.093578800 +0000 @@ -152,154 +152,7 @@ ERROR: relation "test_hashidx" is not a GIN index -- check that using any of these functions with unsupported relations will fail create table test_partitioned (a int) partition by range (a); -create index test_partitioned_index on test_partitioned(a); -create index test_partitioned_hash_index on test_partitioned using hash(a); --- these should all fail -select pgstattuple('test_partitioned'); -ERROR: cannot get tuple-level statistics for relation "test_partitioned" -DETAIL: This operation is not supported for partitioned tables. -select pgstattuple('test_partitioned_index'); -ERROR: cannot get tuple-level statistics for relation "test_partitioned_index" -DETAIL: This operation is not supported for partitioned indexes. -select pgstattuple_approx('test_partitioned'); -ERROR: relation "test_partitioned" is of wrong relation kind -DETAIL: This operation is not supported for partitioned tables. -select pg_relpages('test_partitioned'); -ERROR: cannot get page count of relation "test_partitioned" -DETAIL: This operation is not supported for partitioned tables. -select pgstatindex('test_partitioned'); -ERROR: relation "test_partitioned" is not a btree index -select pgstatginindex('test_partitioned'); -ERROR: relation "test_partitioned" is not a GIN index -select pgstathashindex('test_partitioned'); -ERROR: relation "test_partitioned" is not a hash index -select pgstathashindex('test_partitioned_hash_index'); -ERROR: relation "test_partitioned_hash_index" is not a hash index -create view test_view as select 1; --- these should all fail -select pgstattuple('test_view'); -ERROR: cannot get tuple-level statistics for relation "test_view" -DETAIL: This operation is not supported for views. -select pgstattuple_approx('test_view'); -ERROR: relation "test_view" is of wrong relation kind -DETAIL: This operation is not supported for views. -select pg_relpages('test_view'); -ERROR: cannot get page count of relation "test_view" -DETAIL: This operation is not supported for views. -select pgstatindex('test_view'); -ERROR: relation "test_view" is not a btree index -select pgstatginindex('test_view'); -ERROR: relation "test_view" is not a GIN index -select pgstathashindex('test_view'); -ERROR: relation "test_view" is not a hash index -create foreign data wrapper dummy; -create server dummy_server foreign data wrapper dummy; -create foreign table test_foreign_table () server dummy_server; --- these should all fail -select pgstattuple('test_foreign_table'); -ERROR: cannot get tuple-level statistics for relation "test_foreign_table" -DETAIL: This operation is not supported for foreign tables. -select pgstattuple_approx('test_foreign_table'); -ERROR: relation "test_foreign_table" is of wrong relation kind -DETAIL: This operation is not supported for foreign tables. -select pg_relpages('test_foreign_table'); -ERROR: cannot get page count of relation "test_foreign_table" -DETAIL: This operation is not supported for foreign tables. -select pgstatindex('test_foreign_table'); -ERROR: relation "test_foreign_table" is not a btree index -select pgstatginindex('test_foreign_table'); -ERROR: relation "test_foreign_table" is not a GIN index -select pgstathashindex('test_foreign_table'); -ERROR: relation "test_foreign_table" is not a hash index --- a partition of a partitioned table should work though -create table test_partition partition of test_partitioned for values from (1) to (100); -select pgstattuple('test_partition'); - pgstattuple ---------------------- - (0,0,0,0,0,0,0,0,0) -(1 row) - -select pgstattuple_approx('test_partition'); - pgstattuple_approx ------------------------ - (0,0,0,0,0,0,0,0,0,0) -(1 row) - -select pg_relpages('test_partition'); - pg_relpages -------------- - 0 -(1 row) - --- toast tables should work -select pgstattuple((select reltoastrelid from pg_class where relname = 'test')); - pgstattuple ---------------------- - (0,0,0,0,0,0,0,0,0) -(1 row) - -select pgstattuple_approx((select reltoastrelid from pg_class where relname = 'test')); - pgstattuple_approx ------------------------ - (0,0,0,0,0,0,0,0,0,0) -(1 row) - -select pg_relpages((select reltoastrelid from pg_class where relname = 'test')); - pg_relpages -------------- - 0 -(1 row) - --- not for the index calls though, of course -select pgstatindex('test_partition'); -ERROR: relation "test_partition" is not a btree index -select pgstatginindex('test_partition'); -ERROR: relation "test_partition" is not a GIN index -select pgstathashindex('test_partition'); -ERROR: relation "test_partition" is not a hash index --- an actual index of a partitioned table should work though -create index test_partition_idx on test_partition(a); -create index test_partition_hash_idx on test_partition using hash (a); --- these should work -select pgstatindex('test_partition_idx'); - pgstatindex ------------------------------- - (4,0,8192,0,0,0,0,0,NaN,NaN) -(1 row) - -select pgstathashindex('test_partition_hash_idx'); - pgstathashindex ---------------------- - (4,8,0,1,0,0,0,100) -(1 row) - --- these should work for sequences -create sequence test_sequence; -select count(*) from pgstattuple('test_sequence'); - count -------- - 1 -(1 row) - -select pg_relpages('test_sequence'); - pg_relpages -------------- - 1 -(1 row) - --- these should fail for sequences -select pgstatindex('test_sequence'); -ERROR: relation "test_sequence" is not a btree index -select pgstatginindex('test_sequence'); -ERROR: relation "test_sequence" is not a GIN index -select pgstathashindex('test_sequence'); -ERROR: relation "test_sequence" is not a hash index -select pgstattuple_approx('test_sequence'); -ERROR: relation "test_sequence" is of wrong relation kind -DETAIL: This operation is not supported for sequences. -drop sequence test_sequence; -drop table test_partitioned; -drop view test_view; -drop foreign table test_foreign_table; -drop server dummy_server; -drop foreign data wrapper dummy; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost