Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit70d1c66

Browse files
Fix contrib/pageinspect's test for sequences.
I managed to break this test in two different ways in commit05036a3.First, the output of the new call to tuple_data_split() on the testsequence is dependent on endianness. This is fixed by setting aspecial start value for the test sequence that produces the sameoutput 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 operationThis is because pageinspect's disk-accessing functions areincorrectly marked PARALLEL SAFE on versions older than v15 (seecommitaeaaf52 for details). This one is fixed by changing thetest sequence to be permanent. The only reason it was previouslymarked temporary was to avoid needing a DROP SEQUENCE command atthe end of the test. Unlike some other tests in this file, the useof a permanent sequence here shouldn't result in any testinstability like what was fixed by commite2933a6.Reviewed-by: Tom LaneDiscussion:https://postgr.es/m/ZuOKOut5hhDlf_bP%40nathanBackpatch-through: 12
1 parent433d8f4 commit70d1c66

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎contrib/pageinspect/expected/page.out

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,12 @@ SELECT page_checksum(decode(repeat('00', :block_size), 'hex'), 1);
240240
(1 row)
241241

242242
-- tests for sequences
243-
createtemporarysequence test_sequence;
243+
create sequence test_sequence start 72057594037927937;
244244
select tuple_data_split('test_sequence'::regclass, t_data, t_infomask, t_infomask2, t_bits)
245245
from heap_page_items(get_raw_page('test_sequence', 0));
246246
tuple_data_split
247247
-------------------------------------------------------
248-
{"\\x0100000000000000","\\x0000000000000000","\\x00"}
248+
{"\\x0100000000000001","\\x0000000000000000","\\x00"}
249249
(1 row)
250250

251+
drop sequence test_sequence;

‎contrib/pageinspect/sql/page.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ SELECT page_header(decode(repeat('00', :block_size), 'hex'));
100100
SELECT page_checksum(decode(repeat('00', :block_size),'hex'),1);
101101

102102
-- tests for sequences
103-
createtemporarysequence test_sequence;
103+
createsequencetest_sequence start72057594037927937;
104104
select tuple_data_split('test_sequence'::regclass, t_data, t_infomask, t_infomask2, t_bits)
105105
from heap_page_items(get_raw_page('test_sequence',0));
106+
dropsequence test_sequence;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp