diff --strip-trailing-cr -U3 C:/cirrus/contrib/pageinspect/expected/page.out C:/cirrus/build/testrun/pageinspect/regress/results/page.out --- C:/cirrus/contrib/pageinspect/expected/page.out 2025-11-21 20:03:18.521818400 +0000 +++ C:/cirrus/build/testrun/pageinspect/regress/results/page.out 2025-11-21 20:13:17.424370000 +0000 @@ -179,110 +179,7 @@ -- check that using any of these functions with a partitioned table or index -- would fail create table test_partitioned (a int) partition by range (a); -create index test_partitioned_index on test_partitioned (a); -select get_raw_page('test_partitioned', 0); -- error about partitioned table -ERROR: cannot get raw page from relation "test_partitioned" -DETAIL: This operation is not supported for partitioned tables. -select get_raw_page('test_partitioned_index', 0); -- error about partitioned index -ERROR: cannot get raw page from relation "test_partitioned_index" -DETAIL: This operation is not supported for partitioned indexes. --- a regular table which is a member of a partition set should work though -create table test_part1 partition of test_partitioned for values from ( 1 ) to (100); -select get_raw_page('test_part1', 0); -- get farther and error about empty table -ERROR: block number 0 is out of range for relation "test_part1" -drop table test_partitioned; --- check null bitmap alignment for table whose number of attributes is multiple of 8 -create table test8 (f1 int, f2 int, f3 int, f4 int, f5 int, f6 int, f7 int, f8 int); -insert into test8(f1, f8) values (x'7f00007f'::int, 0); -select t_bits, t_data from heap_page_items(get_raw_page('test8', 0)); - t_bits | t_data -----------+-------------------- - 10000001 | \x7f00007f00000000 -(1 row) - -select tuple_data_split('test8'::regclass, t_data, t_infomask, t_infomask2, t_bits) - from heap_page_items(get_raw_page('test8', 0)); - tuple_data_split -------------------------------------------------------------- - {"\\x7f00007f",NULL,NULL,NULL,NULL,NULL,NULL,"\\x00000000"} -(1 row) - -drop table test8; --- check storage of generated columns --- stored -create table test9s (a int not null, b int generated always as (a * 2) stored); -insert into test9s values (131584); -select raw_flags, t_bits, t_data - from heap_page_items(get_raw_page('test9s', 0)), lateral heap_tuple_infomask_flags(t_infomask, t_infomask2); - raw_flags | t_bits | t_data ----------------------+--------+-------------------- - {HEAP_XMAX_INVALID} | | \x0002020000040400 -(1 row) - -select tuple_data_split('test9s'::regclass, t_data, t_infomask, t_infomask2, t_bits) - from heap_page_items(get_raw_page('test9s', 0)); - tuple_data_split -------------------------------- - {"\\x00020200","\\x00040400"} -(1 row) - -drop table test9s; --- virtual -create table test9v (a int not null, b int generated always as (a * 2) virtual); -insert into test9v values (131584); -select raw_flags, t_bits, t_data - from heap_page_items(get_raw_page('test9v', 0)), lateral heap_tuple_infomask_flags(t_infomask, t_infomask2); - raw_flags | t_bits | t_data -----------------------------------+----------+------------ - {HEAP_HASNULL,HEAP_XMAX_INVALID} | 10000000 | \x00020200 -(1 row) - -select tuple_data_split('test9v'::regclass, t_data, t_infomask, t_infomask2, t_bits) - from heap_page_items(get_raw_page('test9v', 0)); - tuple_data_split ----------------------- - {"\\x00020200",NULL} -(1 row) - -drop table test9v; --- Failure with incorrect page size --- Suppress the DETAIL message, to allow the tests to work across various --- page sizes. -\set VERBOSITY terse -SELECT fsm_page_contents('aaa'::bytea); -ERROR: invalid page size -SELECT page_checksum('bbb'::bytea, 0); -ERROR: invalid page size -SELECT page_header('ccc'::bytea); -ERROR: invalid page size -\set VERBOSITY default --- Tests with all-zero pages. -SHOW block_size \gset -SELECT fsm_page_contents(decode(repeat('00', :block_size), 'hex')); - fsm_page_contents -------------------- - -(1 row) - -SELECT page_header(decode(repeat('00', :block_size), 'hex')); - page_header ------------------------------- - (0/00000000,0,0,0,0,0,0,0,0) -(1 row) - -SELECT page_checksum(decode(repeat('00', :block_size), 'hex'), 1); - page_checksum ---------------- - -(1 row) - --- tests for sequences -create sequence test_sequence start 72057594037927937; -select tuple_data_split('test_sequence'::regclass, t_data, t_infomask, t_infomask2, t_bits) - from heap_page_items(get_raw_page('test_sequence', 0)); - tuple_data_split -------------------------------------------------------- - {"\\x0100000000000001","\\x0000000000000000","\\x00"} -(1 row) - -drop sequence test_sequence; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff --strip-trailing-cr -U3 C:/cirrus/contrib/pageinspect/expected/hash.out C:/cirrus/build/testrun/pageinspect/regress/results/hash.out --- C:/cirrus/contrib/pageinspect/expected/hash.out 2025-11-21 20:03:18.519972900 +0000 +++ C:/cirrus/build/testrun/pageinspect/regress/results/hash.out 2025-11-21 20:13:19.804246600 +0000 @@ -2,209 +2,7 @@ INSERT INTO test_hash VALUES (1, 'one'); CREATE INDEX test_hash_a_idx ON test_hash USING hash (a); CREATE TABLE test_hash_part (a int, b int) PARTITION BY RANGE (a); -CREATE INDEX test_hash_part_idx ON test_hash_part USING hash(b); -\x -SELECT hash_page_type(get_raw_page('test_hash_a_idx', 0)); --[ RECORD 1 ]--+--------- -hash_page_type | metapage - -SELECT hash_page_type(get_raw_page('test_hash_a_idx', 1)); --[ RECORD 1 ]--+------- -hash_page_type | bucket - -SELECT hash_page_type(get_raw_page('test_hash_a_idx', 2)); --[ RECORD 1 ]--+------- -hash_page_type | bucket - -SELECT hash_page_type(get_raw_page('test_hash_a_idx', 3)); --[ RECORD 1 ]--+------- -hash_page_type | bucket - -SELECT hash_page_type(get_raw_page('test_hash_a_idx', 4)); --[ RECORD 1 ]--+------- -hash_page_type | bucket - -SELECT hash_page_type(get_raw_page('test_hash_a_idx', 5)); --[ RECORD 1 ]--+------- -hash_page_type | bitmap - -SELECT hash_page_type(get_raw_page('test_hash_a_idx', 6)); -ERROR: block number 6 is out of range for relation "test_hash_a_idx" -SELECT * FROM hash_bitmap_info('test_hash_a_idx', -1); -ERROR: invalid block number -SELECT * FROM hash_bitmap_info('test_hash_a_idx', 0); -ERROR: invalid overflow block number 0 -SELECT * FROM hash_bitmap_info('test_hash_a_idx', 1); -ERROR: invalid overflow block number 1 -SELECT * FROM hash_bitmap_info('test_hash_a_idx', 2); -ERROR: invalid overflow block number 2 -SELECT * FROM hash_bitmap_info('test_hash_a_idx', 3); -ERROR: invalid overflow block number 3 -SELECT * FROM hash_bitmap_info('test_hash_a_idx', 4); -ERROR: invalid overflow block number 4 -SELECT * FROM hash_bitmap_info('test_hash_a_idx', 5); -ERROR: invalid overflow block number 5 -SELECT * FROM hash_bitmap_info('test_hash_a_idx', 6); -ERROR: block number 6 is out of range for relation "test_hash_a_idx" -SELECT * FROM hash_bitmap_info('test_hash_part_idx', 1); -- error -ERROR: "test_hash_part_idx" is not a hash index -SELECT magic, version, ntuples, bsize, bmsize, bmshift, maxbucket, highmask, -lowmask, ovflpoint, firstfree, nmaps, procid, spares, mapp FROM -hash_metapage_info(get_raw_page('test_hash_a_idx', 0)); --[ RECORD 1 ]-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -magic | 105121344 -version | 4 -ntuples | 1 -bsize | 8152 -bmsize | 4096 -bmshift | 15 -maxbucket | 3 -highmask | 7 -lowmask | 3 -ovflpoint | 2 -firstfree | 0 -nmaps | 1 -procid | 450 -spares | {0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} -mapp | {5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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-ERROR: page is not a hash meta page -SELECT magic, version, ntuples, bsize, bmsize, bmshift, maxbucket, highmask, -lowmask, ovflpoint, firstfree, nmaps, procid, spares, mapp FROM -hash_metapage_info(get_raw_page('test_hash_a_idx', 2)); -ERROR: page is not a hash meta page -SELECT magic, version, ntuples, bsize, bmsize, bmshift, maxbucket, highmask, -lowmask, ovflpoint, firstfree, nmaps, procid, spares, mapp FROM -hash_metapage_info(get_raw_page('test_hash_a_idx', 3)); -ERROR: page is not a hash meta page -SELECT magic, version, ntuples, bsize, bmsize, bmshift, maxbucket, highmask, -lowmask, ovflpoint, firstfree, nmaps, procid, spares, mapp FROM -hash_metapage_info(get_raw_page('test_hash_a_idx', 4)); -ERROR: page is not a hash meta page -SELECT magic, version, ntuples, bsize, bmsize, bmshift, maxbucket, highmask, -lowmask, ovflpoint, firstfree, nmaps, procid, spares, mapp FROM -hash_metapage_info(get_raw_page('test_hash_a_idx', 5)); -ERROR: page is not a hash meta page -SELECT live_items, dead_items, page_size, hasho_prevblkno, hasho_nextblkno, -hasho_bucket, hasho_flag, hasho_page_id FROM -hash_page_stats(get_raw_page('test_hash_a_idx', 0)); -ERROR: page is not a hash bucket or overflow page -SELECT live_items, dead_items, page_size, hasho_prevblkno, hasho_nextblkno, -hasho_bucket, hasho_flag, hasho_page_id FROM -hash_page_stats(get_raw_page('test_hash_a_idx', 1)); --[ RECORD 1 ]---+----------- -live_items | 0 -dead_items | 0 -page_size | 8192 -hasho_prevblkno | 3 -hasho_nextblkno | 4294967295 -hasho_bucket | 0 -hasho_flag | 2 -hasho_page_id | 65408 - -SELECT live_items, dead_items, page_size, hasho_prevblkno, hasho_nextblkno, -hasho_bucket, hasho_flag, hasho_page_id FROM -hash_page_stats(get_raw_page('test_hash_a_idx', 2)); --[ RECORD 1 ]---+----------- -live_items | 0 -dead_items | 0 -page_size | 8192 -hasho_prevblkno | 3 -hasho_nextblkno | 4294967295 -hasho_bucket | 1 -hasho_flag | 2 -hasho_page_id | 65408 - -SELECT live_items, dead_items, page_size, hasho_prevblkno, hasho_nextblkno, -hasho_bucket, hasho_flag, hasho_page_id FROM -hash_page_stats(get_raw_page('test_hash_a_idx', 3)); --[ RECORD 1 ]---+----------- -live_items | 1 -dead_items | 0 -page_size | 8192 -hasho_prevblkno | 3 -hasho_nextblkno | 4294967295 -hasho_bucket | 2 -hasho_flag | 2 -hasho_page_id | 65408 - -SELECT live_items, dead_items, page_size, hasho_prevblkno, hasho_nextblkno, -hasho_bucket, hasho_flag, hasho_page_id FROM -hash_page_stats(get_raw_page('test_hash_a_idx', 4)); --[ RECORD 1 ]---+----------- -live_items | 0 -dead_items | 0 -page_size | 8192 -hasho_prevblkno | 3 -hasho_nextblkno | 4294967295 -hasho_bucket | 3 -hasho_flag | 2 -hasho_page_id | 65408 - -SELECT live_items, dead_items, page_size, hasho_prevblkno, hasho_nextblkno, -hasho_bucket, hasho_flag, hasho_page_id FROM -hash_page_stats(get_raw_page('test_hash_a_idx', 5)); -ERROR: page is not a hash bucket or overflow page -SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 0)); -ERROR: page is not a hash bucket or overflow page -SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 1)); -(0 rows) - -SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 2)); -(0 rows) - -SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 3)); --[ RECORD 1 ]---------- -itemoffset | 1 -ctid | (0,1) -data | 2389907270 - -SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 4)); -(0 rows) - -SELECT * FROM hash_page_items(get_raw_page('test_hash_a_idx', 5)); -ERROR: page is not a hash bucket or overflow page --- Failure with non-hash index -CREATE INDEX test_hash_a_btree ON test_hash USING btree (a); -SELECT hash_bitmap_info('test_hash_a_btree', 0); -ERROR: "test_hash_a_btree" is not a hash index --- Failure with various modes. --- Suppress the DETAIL message, to allow the tests to work across various --- page sizes and architectures. -\set VERBOSITY terse --- invalid page size -SELECT hash_metapage_info('aaa'::bytea); -ERROR: invalid page size -SELECT hash_page_items('bbb'::bytea); -ERROR: invalid page size -SELECT hash_page_stats('ccc'::bytea); -ERROR: invalid page size -SELECT hash_page_type('ddd'::bytea); -ERROR: invalid page size --- invalid special area size -SELECT hash_metapage_info(get_raw_page('test_hash', 0)); -ERROR: input page is not a valid hash page -SELECT hash_page_items(get_raw_page('test_hash', 0)); -ERROR: input page is not a valid hash page -SELECT hash_page_stats(get_raw_page('test_hash', 0)); -ERROR: input page is not a valid hash page -SELECT hash_page_type(get_raw_page('test_hash', 0)); -ERROR: input page is not a valid hash page -\set VERBOSITY default --- Tests with all-zero pages. -SHOW block_size \gset -SELECT hash_metapage_info(decode(repeat('00', :block_size), 'hex')); -ERROR: page is not a hash meta page -SELECT hash_page_items(decode(repeat('00', :block_size), 'hex')); -ERROR: page is not a hash bucket or overflow page -SELECT hash_page_stats(decode(repeat('00', :block_size), 'hex')); -ERROR: page is not a hash bucket or overflow page -SELECT hash_page_type(decode(repeat('00', :block_size), 'hex')); --[ RECORD 1 ]--+------- -hash_page_type | unused - -DROP TABLE test_hash; -DROP TABLE test_hash_part; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff --strip-trailing-cr -U3 C:/cirrus/contrib/pageinspect/expected/checksum.out C:/cirrus/build/testrun/pageinspect/regress/results/checksum.out --- C:/cirrus/contrib/pageinspect/expected/checksum.out 2025-11-21 20:03:18.517563100 +0000 +++ C:/cirrus/build/testrun/pageinspect/regress/results/checksum.out 2025-11-21 20:13:19.992241900 +0000 @@ -1,40 +1,2 @@ --- --- Verify correct calculation of checksums --- --- Postgres' checksum algorithm produces different answers on little-endian --- and big-endian machines. The results of this test also vary depending --- on the configured block size. This test has several different expected --- results files to handle the following possibilities: --- --- BLCKSZ end file --- 8K LE checksum.out --- 8K BE checksum_1.out --- --- In future we might provide additional expected-results files for other --- block sizes, but there seems little point as long as so many other --- test scripts also show false failures for non-default block sizes. --- --- This is to label the results files with blocksize: -SHOW block_size; - block_size ------------- - 8192 -(1 row) - -SHOW block_size \gset --- Apply page_checksum() to some different data patterns and block numbers -SELECT blkno, - page_checksum(decode(repeat('01', :block_size), 'hex'), blkno) AS checksum_01, - page_checksum(decode(repeat('04', :block_size), 'hex'), blkno) AS checksum_04, - page_checksum(decode(repeat('ff', :block_size), 'hex'), blkno) AS checksum_ff, - page_checksum(decode(repeat('abcd', :block_size / 2), 'hex'), blkno) AS checksum_abcd, - page_checksum(decode(repeat('e6d6', :block_size / 2), 'hex'), blkno) AS checksum_e6d6, - page_checksum(decode(repeat('4a5e', :block_size / 2), 'hex'), blkno) AS checksum_4a5e - FROM generate_series(0, 100, 50) AS a (blkno); - blkno | checksum_01 | checksum_04 | checksum_ff | checksum_abcd | checksum_e6d6 | checksum_4a5e --------+-------------+-------------+-------------+---------------+---------------+--------------- - 0 | 1175 | 28338 | 3612 | -30781 | -16269 | -27377 - 50 | 1225 | 28352 | 3598 | -30795 | -16251 | -27391 - 100 | 1139 | 28438 | 3648 | -30881 | -16305 | -27349 -(3 rows) - +psql: error: connection to server on socket "c:/cirrus//.s.PGSQL.40029" failed: FATAL: the database system is not yet accepting connections +DETAIL: Consistent recovery state has not been yet reached.