From 6ecaaf810b8b9e3132f00549e630400f38a7ca37 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 13 Jan 2021 12:32:54 +0200 Subject: 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 --- contrib/pageinspect/sql/gist.sql | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'contrib/pageinspect/sql/gist.sql') diff --git a/contrib/pageinspect/sql/gist.sql b/contrib/pageinspect/sql/gist.sql index b38da4cb033..e6f6e42a5ef 100644 --- a/contrib/pageinspect/sql/gist.sql +++ b/contrib/pageinspect/sql/gist.sql @@ -9,10 +9,9 @@ SELECT * FROM gist_page_opaque_info(get_raw_page('test_gist_idx', 2)); SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gist_idx'); SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 1), 'test_gist_idx') LIMIT 5; -SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 2), 'test_gist_idx') LIMIT 5; -SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0)); -SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 1)) LIMIT 5; -SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 2)) LIMIT 5; +-- gist_page_items_bytea prints the raw key data as a bytea. The output of that is +-- platform-dependent (endianess), so omit the actual key data from the output. +SELECT itemoffset, ctid, itemlen FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0)); DROP TABLE test_gist; -- cgit v1.2.3