ページの先頭行へ戻る
Enterprise Postgres 17 リリース情報

2.2.82 pageinspectのgist_page_items関数 のkeysの結果の変更

非互換

pageinspectのgist_page_items 関数が修正され、keysの結果の出力に非キー属性を出力するように追加しました。

Fujitsu Enterprise Postgres 15以前の場合
[postgres@VM00056238 ~]$ /opt/fsepv15server64/bin/psql
psql (15.0)
Type "help" for help.

postgres=#
postgres=# SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gist_idx');
 itemoffset |   ctid    | itemlen | dead |       keys
------------+-----------+---------+------+-------------------
          1 | (1,65535) |      40 | f    | (p)=((185,185))
          2 | (2,65535) |      40 | f    | (p)=((370,370))
          3 | (3,65535) |      40 | f    | (p)=((555,555))
          4 | (4,65535) |      40 | f    | (p)=((740,740))
          5 | (5,65535) |      40 | f    | (p)=((870,870))
          6 | (6,65535) |      40 | f    | (p)=((1000,1000))
(6 rows)

postgres=#

...............................................................................................................................................................

postgres=# -- Mask the value of the key attribute to avoid alignment issues.
postgres=# SELECT regexp_replace(keys, '\(p\)=\("(.*?)"\)', '(p)=("<val>")') AS keys_nonleaf_1
postgres-#   FROM gist_page_items(get_raw_page('test_gist_idx_inc', 0), 'test_gist_idx_inc')
postgres-#   WHERE itemoffset = 1;
 keys_nonleaf_1
-----------------
 (p)=((135,135))
(1 row)

postgres=# SELECT keys AS keys_leaf_1
postgres-#   FROM gist_page_items(get_raw_page('test_gist_idx_inc', 1), 'test_gist_idx_inc')
postgres-#   WHERE itemoffset = 1;
 keys_leaf_1
-------------
 (p)=((1,1))
(1 row)
Fujitsu Enterprise Postgres 16の場合
postgres=# SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gist_idx');
 itemoffset |   ctid    | itemlen | dead |             keys
------------+-----------+---------+------+-------------------------------
          1 | (1,65535) |      40 | f    | (p)=("(185,185),(1,1)")
          2 | (2,65535) |      40 | f    | (p)=("(370,370),(186,186)")
          3 | (3,65535) |      40 | f    | (p)=("(555,555),(371,371)")
          4 | (4,65535) |      40 | f    | (p)=("(740,740),(556,556)")
          5 | (5,65535) |      40 | f    | (p)=("(870,870),(741,741)")
          6 | (6,65535) |      40 | f    | (p)=("(1000,1000),(871,871)")
(6 rows)

postgres=#

........................................................................................................................................................

postgres=# -- Mask the value of the key attribute to avoid alignment issues.
postgres=# SELECT regexp_replace(keys, '\(p\)=\("(.*?)"\)', '(p)=("<val>")') AS keys_nonleaf_1
postgres-#   FROM gist_page_items(get_raw_page('test_gist_idx_inc', 0), 'test_gist_idx_inc')
postgres-#   WHERE itemoffset = 1;
 keys_nonleaf_1
----------------
 (p)=("<val>")
(1 row)

postgres=# SELECT keys AS keys_leaf_1
postgres-#   FROM gist_page_items(get_raw_page('test_gist_idx_inc', 1), 'test_gist_idx_inc')
postgres-#   WHERE itemoffset = 1;
                     keys_leaf_1
------------------------------------------------------
 (p) INCLUDE (t, i)=("(1,1),(1,1)") INCLUDE (1, null)
(1 row)

postgres=#

対処方法

ありません。