1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Add "LP_DEAD item?" column to GiST pageinspect functions

This brings gist_page_items() and gist_page_items_bytea() in line with
nbtree's bt_page_items() function.

Minor follow-up to commit 756ab291, which added the GiST functions.

Author: Andrey Borodin <x4mmm@yandex-team.ru>
Discussion: https://postgr.es/m/E0794687-7315-4C29-A9C7-EC54D448596D@yandex-team.ru
This commit is contained in:
Peter Geoghegan
2021-02-14 20:11:11 -08:00
parent fa41cf8f18
commit 9e596b65f4
4 changed files with 46 additions and 42 deletions

View File

@@ -714,15 +714,15 @@ test=# SELECT * FROM gist_page_opaque_info(get_raw_page('test_gist_idx', 2));
the data stored in a page of a <acronym>GiST</acronym> index. For example:
<screen>
test=# SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gist_idx');
itemoffset | ctid | itemlen | keys
------------+-----------+---------+-------------------
1 | (1,65535) | 40 | (p)=((166,166))
2 | (2,65535) | 40 | (p)=((332,332))
3 | (3,65535) | 40 | (p)=((498,498))
4 | (4,65535) | 40 | (p)=((664,664))
5 | (5,65535) | 40 | (p)=((830,830))
6 | (6,65535) | 40 | (p)=((996,996))
7 | (7,65535) | 40 | (p)=((1000,1000))
itemoffset | ctid | itemlen | dead | keys
------------+-----------+---------+------+-------------------
1 | (1,65535) | 40 | f | (p)=((166,166))
2 | (2,65535) | 40 | f | (p)=((332,332))
3 | (3,65535) | 40 | f | (p)=((498,498))
4 | (4,65535) | 40 | f | (p)=((664,664))
5 | (5,65535) | 40 | f | (p)=((830,830))
6 | (6,65535) | 40 | f | (p)=((996,996))
7 | (7,65535) | 40 | f | (p)=((1000,1000))
(7 rows)
</screen>
</para>
@@ -745,15 +745,15 @@ test=# SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gis
example:
<screen>
test=# SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
itemoffset | ctid | itemlen | key_data
------------+-----------+---------+-------------------------------------------&zwsp;-----------------------------------------
1 | (1,65535) | 40 | \x00000100ffff28000000000000c0644000000000&zwsp;00c06440000000000000f03f000000000000f03f
2 | (2,65535) | 40 | \x00000200ffff28000000000000c0744000000000&zwsp;00c074400000000000e064400000000000e06440
3 | (3,65535) | 40 | \x00000300ffff28000000000000207f4000000000&zwsp;00207f400000000000d074400000000000d07440
4 | (4,65535) | 40 | \x00000400ffff28000000000000c0844000000000&zwsp;00c084400000000000307f400000000000307f40
5 | (5,65535) | 40 | \x00000500ffff28000000000000f0894000000000&zwsp;00f089400000000000c884400000000000c88440
6 | (6,65535) | 40 | \x00000600ffff28000000000000208f4000000000&zwsp;00208f400000000000f889400000000000f88940
7 | (7,65535) | 40 | \x00000700ffff28000000000000408f4000000000&zwsp;00408f400000000000288f400000000000288f40
itemoffset | ctid | itemlen | dead | key_data
------------+-----------+---------+------+-----------------------------------------&zwsp;-------------------------------------------
1 | (1,65535) | 40 | f | \x00000100ffff28000000000000c0644000000000&zwsp;00c06440000000000000f03f000000000000f03f
2 | (2,65535) | 40 | f | \x00000200ffff28000000000000c0744000000000&zwsp;00c074400000000000e064400000000000e06440
3 | (3,65535) | 40 | f | \x00000300ffff28000000000000207f4000000000&zwsp;00207f400000000000d074400000000000d07440
4 | (4,65535) | 40 | f | \x00000400ffff28000000000000c0844000000000&zwsp;00c084400000000000307f400000000000307f40
5 | (5,65535) | 40 | f | \x00000500ffff28000000000000f0894000000000&zwsp;00f089400000000000c884400000000000c88440
6 | (6,65535) | 40 | f | \x00000600ffff28000000000000208f4000000000&zwsp;00208f400000000000f889400000000000f88940
7 | (7,65535) | 40 | f | \x00000700ffff28000000000000408f4000000000&zwsp;00408f400000000000288f400000000000288f40
(7 rows)
</screen>
</para>