summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2023-04-07 16:08:52 -0700
committerPeter Geoghegan <pg@bowt.ie>2023-04-07 16:08:52 -0700
commit7d8219a444bd917d21234c97e2417a410f10ebd3 (patch)
treea4bf646294fb51f5bef2d7595dafab66a0fe9e2c /doc
parent76c111a7f16659f9018391f655764c8226461ca4 (diff)
downloadpostgresql-7d8219a444bd917d21234c97e2417a410f10ebd3.tar.gz
Show more detail in heapam rmgr descriptions.
Add helper functions that output arrays in a standard format, and use the functions inside heapdesc routines. This allows tools like pg_walinspect to show a detailed description of the page offset number arrays for records like PRUNE and VACUUM (unless there was an FPI). Also document the conventions that desc routines should follow. Only the heapdesc routines follow the conventions for now, so they're just guidelines for the time being. Based on a suggestion from Andres Freund. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-By: Peter Geoghegan <pg@bowt.ie> Discussion: https://postgr.es/m/flat/20230109215842.fktuhesvayno6o4g%40awork3.anarazel.de
Diffstat (limited to 'doc')
-rw-r--r--doc/src/sgml/pgwalinspect.sgml22
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/src/sgml/pgwalinspect.sgml b/doc/src/sgml/pgwalinspect.sgml
index d9ed8f0a9a..b3712be009 100644
--- a/doc/src/sgml/pgwalinspect.sgml
+++ b/doc/src/sgml/pgwalinspect.sgml
@@ -71,19 +71,19 @@
after the <replaceable>in_lsn</replaceable> argument. For
example:
<screen>
-postgres=# SELECT * FROM pg_get_wal_record_info('0/1E826E98');
--[ RECORD 1 ]----+----------------------------------------------------
-start_lsn | 0/1E826F20
-end_lsn | 0/1E826F60
-prev_lsn | 0/1E826C80
+postgres=# SELECT * FROM pg_get_wal_record_info('0/E84F5E8');
+-[ RECORD 1 ]----+--------------------------------------------------
+start_lsn | 0/E84F5E8
+end_lsn | 0/E84F620
+prev_lsn | 0/E84F5A8
xid | 0
resource_manager | Heap2
-record_type | PRUNE
-record_length | 58
-main_data_length | 8
+record_type | VACUUM
+record_length | 50
+main_data_length | 2
fpi_length | 0
-description | snapshotConflictHorizon 33748 nredirected 0 ndead 2
-block_ref | blkref #0: rel 1663/5/60221 fork main blk 2
+description | nunused: 1, unused: [ 22 ]
+block_ref | blkref #0: rel 1663/16389/20884 fork main blk 126
</screen>
</para>
<para>
@@ -144,7 +144,7 @@ block_ref |
references. Returns one row per block reference per WAL record.
For example:
<screen>
-postgres=# SELECT * FROM pg_get_wal_block_info('0/10E9D80', '0/10E9DC0') LIMIT 1;
+postgres=# SELECT * FROM pg_get_wal_block_info('0/10E9D80', '0/10E9DC0');
-[ RECORD 1 ]-----+-----------------------------------
start_lsn | 0/10E9D80
end_lsn | 0/10E9DC0