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

Commit6ecaaf8

Browse files
committed
Fix portability issues in the new gist pageinspect test.
1. The raw bytea representation of the point-type keys used in the test depends on endianess. Remove the raw key_data column from the test.2. The items stored on non-leftmost gist page depends on how many items git on the other pages. This showed up as a failure on 32-bit i386 systems. To fix, only test the gist_page_items() function on the leftmost leaf page.Per Andrey Borodin and the buildfarm.Discussion:https://www.postgresql.org/message-id/9FCEC1DC-86FB-4A57-88EF-DD13663B36AF%40yandex-team.ru
1 parente6eeb8d commit6ecaaf8

File tree

2 files changed

+15
-44
lines changed

2 files changed

+15
-44
lines changed

‎contrib/pageinspect/expected/gist.out

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -42,46 +42,18 @@ SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 1), 'test_gist_idx')
4242
5 | (0,5) | 40 | (p)=((5,5))
4343
(5 rows)
4444

45-
SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 2), 'test_gist_idx') LIMIT 5;
46-
itemoffset | ctid | itemlen | keys
47-
------------+--------+---------+-----------------
48-
1 | (1,10) | 40 | (p)=((167,167))
49-
2 | (1,11) | 40 | (p)=((168,168))
50-
3 | (1,12) | 40 | (p)=((169,169))
51-
4 | (1,13) | 40 | (p)=((170,170))
52-
5 | (1,14) | 40 | (p)=((171,171))
53-
(5 rows)
54-
55-
SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
56-
itemoffset | ctid | itemlen | key_data
57-
------------+-----------+---------+------------------------------------------------------------------------------------
58-
1 | (1,65535) | 40 | \x00000100ffff28000000000000c064400000000000c06440000000000000f03f000000000000f03f
59-
2 | (2,65535) | 40 | \x00000200ffff28000000000000c074400000000000c074400000000000e064400000000000e06440
60-
3 | (3,65535) | 40 | \x00000300ffff28000000000000207f400000000000207f400000000000d074400000000000d07440
61-
4 | (4,65535) | 40 | \x00000400ffff28000000000000c084400000000000c084400000000000307f400000000000307f40
62-
5 | (5,65535) | 40 | \x00000500ffff28000000000000f089400000000000f089400000000000c884400000000000c88440
63-
6 | (6,65535) | 40 | \x00000600ffff28000000000000208f400000000000208f400000000000f889400000000000f88940
64-
7 | (7,65535) | 40 | \x00000700ffff28000000000000408f400000000000408f400000000000288f400000000000288f40
45+
-- gist_page_items_bytea prints the raw key data as a bytea. The output of that is
46+
-- platform-dependent (endianess), so omit the actual key data from the output.
47+
SELECT itemoffset, ctid, itemlen FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
48+
itemoffset | ctid | itemlen
49+
------------+-----------+---------
50+
1 | (1,65535) | 40
51+
2 | (2,65535) | 40
52+
3 | (3,65535) | 40
53+
4 | (4,65535) | 40
54+
5 | (5,65535) | 40
55+
6 | (6,65535) | 40
56+
7 | (7,65535) | 40
6557
(7 rows)
6658

67-
SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 1)) LIMIT 5;
68-
itemoffset | ctid | itemlen | key_data
69-
------------+-------+---------+------------------------------------------------------------------------------------
70-
1 | (0,1) | 40 | \x0000000001002800000000000000f03f000000000000f03f000000000000f03f000000000000f03f
71-
2 | (0,2) | 40 | \x00000000020028000000000000000040000000000000004000000000000000400000000000000040
72-
3 | (0,3) | 40 | \x00000000030028000000000000000840000000000000084000000000000008400000000000000840
73-
4 | (0,4) | 40 | \x00000000040028000000000000001040000000000000104000000000000010400000000000001040
74-
5 | (0,5) | 40 | \x00000000050028000000000000001440000000000000144000000000000014400000000000001440
75-
(5 rows)
76-
77-
SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 2)) LIMIT 5;
78-
itemoffset | ctid | itemlen | key_data
79-
------------+--------+---------+------------------------------------------------------------------------------------
80-
1 | (1,10) | 40 | \x000001000a0028000000000000e064400000000000e064400000000000e064400000000000e06440
81-
2 | (1,11) | 40 | \x000001000b0028000000000000006540000000000000654000000000000065400000000000006540
82-
3 | (1,12) | 40 | \x000001000c0028000000000000206540000000000020654000000000002065400000000000206540
83-
4 | (1,13) | 40 | \x000001000d0028000000000000406540000000000040654000000000004065400000000000406540
84-
5 | (1,14) | 40 | \x000001000e0028000000000000606540000000000060654000000000006065400000000000606540
85-
(5 rows)
86-
8759
DROP TABLE test_gist;

‎contrib/pageinspect/sql/gist.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ SELECT * FROM gist_page_opaque_info(get_raw_page('test_gist_idx', 2));
99

1010
SELECT*FROM gist_page_items(get_raw_page('test_gist_idx',0),'test_gist_idx');
1111
SELECT*FROM gist_page_items(get_raw_page('test_gist_idx',1),'test_gist_idx')LIMIT5;
12-
SELECT*FROM gist_page_items(get_raw_page('test_gist_idx',2),'test_gist_idx')LIMIT5;
1312

14-
SELECT*FROM gist_page_items_bytea(get_raw_page('test_gist_idx',0));
15-
SELECT*FROM gist_page_items_bytea(get_raw_page('test_gist_idx',1))LIMIT5;
16-
SELECT*FROM gist_page_items_bytea(get_raw_page('test_gist_idx',2))LIMIT5;
13+
-- gist_page_items_bytea prints the raw key data as a bytea. The output of that is
14+
-- platform-dependent (endianess), so omit the actual key data from the output.
15+
SELECTitemoffset, ctid, itemlenFROM gist_page_items_bytea(get_raw_page('test_gist_idx',0));
1716

1817
DROPTABLE test_gist;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp