Skip to content

Commit 330ee23

Browse files
committed
doc: update pageinspect.sgml
1 parent 08380ef commit 330ee23

File tree

1 file changed

+116
-33
lines changed

1 file changed

+116
-33
lines changed

postgresql/doc/src/sgml/pageinspect.sgml

Lines changed: 116 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ____________________________________________________________________________-->
4343
</term>
4444
____________________________________________________________________________-->
4545
<term>
46-
<function>get_raw_page(relname text, fork text, blkno int) 返回 bytea</function>
46+
<function>get_raw_page(relname text, fork text, blkno bigint) 返回 bytea</function>
4747
<indexterm>
4848
<primary>get_raw_page</primary>
4949
</indexterm>
@@ -74,7 +74,7 @@ ____________________________________________________________________________-->
7474
</term>
7575
____________________________________________________________________________-->
7676
<term>
77-
<function>get_raw_page(relname text, blkno int) 返回 bytea</function>
77+
<function>get_raw_page(relname text, blkno bigint) 返回 bytea</function>
7878
</term>
7979

8080
<listitem>
@@ -161,14 +161,14 @@ ____________________________________________________________________________-->
161161
<varlistentry>
162162
<!--==========================orignal english content==========================
163163
<term>
164-
<function>page_checksum(page bytea, blkno int4) returns smallint</function>
164+
<function>page_checksum(page bytea, blkno bigint) returns smallint</function>
165165
<indexterm>
166166
<primary>page_checksum</primary>
167167
</indexterm>
168168
</term>
169169
____________________________________________________________________________-->
170170
<term>
171-
<function>page_checksum(page bytea, blkno int4) returns smallint</function>
171+
<function>page_checksum(page bytea, blkno bigint) returns smallint</function>
172172
<indexterm>
173173
<primary>page_checksum</primary>
174174
</indexterm>
@@ -544,33 +544,33 @@ ____________________________________________________________________________-->
544544
index's metapage. For example:
545545
<screen>
546546
test=# SELECT * FROM bt_metap('pg_cast_oid_index');
547-
-[ RECORD 1 ]-&minus;-&minus;-&minus;-&minus;-&minus;-+-&minus;-&minus;-&minus;-
548-
magic | 340322
549-
version | 4
550-
root | 1
551-
level | 0
552-
fastroot | 1
553-
fastlevel | 0
554-
oldest_xact | 582
555-
last_cleanup_num_tuples | 1000
556-
allequalimage | f
547+
-[ RECORD 1 ]-------------+-------
548+
magic | 340322
549+
version | 4
550+
root | 1
551+
level | 0
552+
fastroot | 1
553+
fastlevel | 0
554+
last_cleanup_num_delpages | 0
555+
last_cleanup_num_tuples | 230
556+
allequalimage | f
557557
</screen>
558558
</para>
559559
____________________________________________________________________________-->
560560
<para>
561561
<function>bt_metap</function>返回关于一个B树索引元页的信息。例如:
562562
<screen>
563563
test=# SELECT * FROM bt_metap('pg_cast_oid_index');
564-
-[ RECORD 1 ]-----------+-------
565-
magic | 340322
566-
version | 4
567-
root | 1
568-
level | 0
569-
fastroot | 1
570-
fastlevel | 0
571-
oldest_xact | 582
572-
last_cleanup_num_tuples | 1000
573-
allequalimage | f
564+
-[ RECORD 1 ]-------------+-------
565+
magic | 340322
566+
version | 4
567+
root | 1
568+
level | 0
569+
fastroot | 1
570+
fastlevel | 0
571+
last_cleanup_num_delpages | 0
572+
last_cleanup_num_tuples | 230
573+
allequalimage | f
574574
</screen>
575575
</para>
576576
</listitem>
@@ -579,14 +579,14 @@ allequalimage | f
579579
<varlistentry>
580580
<!--==========================orignal english content==========================
581581
<term>
582-
<function>bt_page_stats(relname text, blkno int) returns record</function>
582+
<function>bt_page_stats(relname text, blkno bigint) returns record</function>
583583
<indexterm>
584584
<primary>bt_page_stats</primary>
585585
</indexterm>
586586
</term>
587587
____________________________________________________________________________-->
588588
<term>
589-
<function>bt_page_stats(relname text, blkno int) 返回 record</function>
589+
<function>bt_page_stats(relname text, blkno bigint) 返回 record</function>
590590
<indexterm>
591591
<primary>bt_page_stats</primary>
592592
</indexterm>
@@ -599,7 +599,7 @@ ____________________________________________________________________________-->
599599
single pages of B-tree indexes. For example:
600600
<screen>
601601
test=# SELECT * FROM bt_page_stats('pg_cast_oid_index', 1);
602-
-[ RECORD 1 ]-+-&minus;-&minus;-
602+
-[ RECORD 1 ]-+-----
603603
blkno | 1
604604
type | l
605605
live_items | 224
@@ -609,7 +609,7 @@ page_size | 8192
609609
free_size | 3668
610610
btpo_prev | 0
611611
btpo_next | 0
612-
btpo | 0
612+
btpo_level | 0
613613
btpo_flags | 3
614614
</screen>
615615
</para>
@@ -628,7 +628,7 @@ page_size | 8192
628628
free_size | 3668
629629
btpo_prev | 0
630630
btpo_next | 0
631-
btpo | 0
631+
btpo_level | 0
632632
btpo_flags | 3
633633
</screen>
634634
</para>
@@ -638,14 +638,14 @@ btpo_flags | 3
638638
<varlistentry>
639639
<!--==========================orignal english content==========================
640640
<term>
641-
<function>bt_page_items(relname text, blkno int) returns setof record</function>
641+
<function>bt_page_items(relname text, blkno bigint) returns setof record</function>
642642
<indexterm>
643643
<primary>bt_page_items</primary>
644644
</indexterm>
645645
</term>
646646
____________________________________________________________________________-->
647647
<term>
648-
<function>bt_page_items(relname text, blkno int) 返回 setof record</function>
648+
<function>bt_page_items(relname text, blkno bigint) 返回 setof record</function>
649649
<indexterm>
650650
<primary>bt_page_items</primary>
651651
</indexterm>
@@ -1234,6 +1234,89 @@ test=# SELECT first_tid, nbytes, tids[0:5] AS some_tids
12341234
(170,30) | 376 | {"(170,30)","(170,31)","(170,32)","(170,33)","(170,34)"}
12351235
(173,44) | 197 | {"(173,44)","(173,45)","(173,46)","(173,47)","(173,48)"}
12361236
(7 rows)
1237+
</screen>
1238+
</para>
1239+
</listitem>
1240+
</varlistentry>
1241+
</variablelist>
1242+
</sect2>
1243+
<sect2>
1244+
<title>GiST 函数</title>
1245+
1246+
<variablelist>
1247+
<varlistentry>
1248+
<term>
1249+
<function>gist_page_opaque_info(page bytea) returns record</function>
1250+
<indexterm>
1251+
<primary>gist_page_opaque_info</primary>
1252+
</indexterm>
1253+
</term>
1254+
1255+
<listitem>
1256+
<para>
1257+
<function>gist_page_opaque_info</function> 返回有关<acronym>GiST</acronym>索引页的不透明区域的信息,比如 NSN、右链接和页面类型。例如:
1258+
<screen>
1259+
test=# SELECT * FROM gist_page_opaque_info(get_raw_page('test_gist_idx', 2));
1260+
lsn | nsn | rightlink | flags
1261+
-----+-----+-----------+--------
1262+
0/1 | 0/0 | 1 | {leaf}
1263+
(1 row)
1264+
</screen>
1265+
</para>
1266+
</listitem>
1267+
</varlistentry>
1268+
1269+
<varlistentry>
1270+
<term>
1271+
<function>gist_page_items(page bytea, index_oid regclass) returns setof record</function>
1272+
<indexterm>
1273+
<primary>gist_page_items</primary>
1274+
</indexterm>
1275+
</term>
1276+
1277+
<listitem>
1278+
<para>
1279+
<function>gist_page_items</function> 返回有关存储在<acronym>GiST</acronym>索引页面中的数据的信息。例如:
1280+
<screen>
1281+
test=# SELECT * FROM gist_page_items(get_raw_page('test_gist_idx', 0), 'test_gist_idx');
1282+
itemoffset | ctid | itemlen | dead | keys
1283+
------------+-----------+---------+------+-------------------
1284+
1 | (1,65535) | 40 | f | (p)=((166,166))
1285+
2 | (2,65535) | 40 | f | (p)=((332,332))
1286+
3 | (3,65535) | 40 | f | (p)=((498,498))
1287+
4 | (4,65535) | 40 | f | (p)=((664,664))
1288+
5 | (5,65535) | 40 | f | (p)=((830,830))
1289+
6 | (6,65535) | 40 | f | (p)=((996,996))
1290+
7 | (7,65535) | 40 | f | (p)=((1000,1000))
1291+
(7 rows)
1292+
</screen>
1293+
</para>
1294+
</listitem>
1295+
</varlistentry>
1296+
1297+
<varlistentry>
1298+
<term>
1299+
<function>gist_page_items_bytea(page bytea) returns setof record</function>
1300+
<indexterm>
1301+
<primary>gist_page_items_bytea</primary>
1302+
</indexterm>
1303+
</term>
1304+
1305+
<listitem>
1306+
<para>
1307+
与<function>gist_page_items</function>相同,但将密钥数据作为原始<type>bytea</type>blob 返回。它不会尝试解码密钥,因此不需要知道它包含哪个索引。例如:
1308+
<screen>
1309+
test=# SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
1310+
itemoffset | ctid | itemlen | dead | key_data
1311+
------------+-----------+---------+------+-----------------------------------------&zwsp;-------------------------------------------
1312+
1 | (1,65535) | 40 | f | \x00000100ffff28000000000000c0644000000000&zwsp;00c06440000000000000f03f000000000000f03f
1313+
2 | (2,65535) | 40 | f | \x00000200ffff28000000000000c0744000000000&zwsp;00c074400000000000e064400000000000e06440
1314+
3 | (3,65535) | 40 | f | \x00000300ffff28000000000000207f4000000000&zwsp;00207f400000000000d074400000000000d07440
1315+
4 | (4,65535) | 40 | f | \x00000400ffff28000000000000c0844000000000&zwsp;00c084400000000000307f400000000000307f40
1316+
5 | (5,65535) | 40 | f | \x00000500ffff28000000000000f0894000000000&zwsp;00f089400000000000c884400000000000c88440
1317+
6 | (6,65535) | 40 | f | \x00000600ffff28000000000000208f4000000000&zwsp;00208f400000000000f889400000000000f88940
1318+
7 | (7,65535) | 40 | f | \x00000700ffff28000000000000408f4000000000&zwsp;00408f400000000000288f400000000000288f40
1319+
(7 rows)
12371320
</screen>
12381321
</para>
12391322
</listitem>
@@ -1398,14 +1481,14 @@ test=# SELECT * FROM hash_page_items(get_raw_page('con_hash_index', 1)) LIMIT 5;
13981481
<varlistentry>
13991482
<!--==========================orignal english content==========================
14001483
<term>
1401-
<function>hash_bitmap_info(index oid, blkno int) returns record</function>
1484+
<function>hash_bitmap_info(index oid, blkno bigint) returns record</function>
14021485
<indexterm>
14031486
<primary>hash_bitmap_info</primary>
14041487
</indexterm>
14051488
</term>
14061489
____________________________________________________________________________-->
14071490
<term>
1408-
<function>hash_bitmap_info(index oid, blkno int) returns record</function>
1491+
<function>hash_bitmap_info(index oid, blkno bigint) returns record</function>
14091492
<indexterm>
14101493
<primary>hash_bitmap_info</primary>
14111494
</indexterm>

0 commit comments

Comments
 (0)