Fix contrib/pageinspect's test for sequences.
authorNathan Bossart <[email protected]>
Fri, 13 Sep 2024 15:16:40 +0000 (10:16 -0500)
committerNathan Bossart <[email protected]>
Fri, 13 Sep 2024 15:16:40 +0000 (10:16 -0500)
commite0277d90acf6f328d3dfc804238682490124fbb3
tree113ec4f0aa2849f1c35c46551b20ada03828b494
parentdd5670fa549ec5b06f331b55353f54df8b786449
Fix contrib/pageinspect's test for sequences.

I managed to break this test in two different ways in commit
05036a3155.

First, the output of the new call to tuple_data_split() on the test
sequence is dependent on endianness.  This is fixed by setting a
special start value for the test sequence that produces the same
output regardless of the endianness of the machine.

Second, on versions older than v15, the new test case fails under
"force_parallel_mode = regress" with the following error:

ERROR:  cannot access temporary tables during a parallel operation

This is because pageinspect's disk-accessing functions are
incorrectly marked PARALLEL SAFE on versions older than v15 (see
commit aeaaf520f4 for details).  This one is fixed by changing the
test sequence to be permanent.  The only reason it was previously
marked temporary was to avoid needing a DROP SEQUENCE command at
the end of the test.  Unlike some other tests in this file, the use
of a permanent sequence here shouldn't result in any test
instability like what was fixed by commit e2933a6e11.

Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/ZuOKOut5hhDlf_bP%40nathan
Backpatch-through: 12
contrib/pageinspect/expected/page.out
contrib/pageinspect/sql/page.sql