summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMichael Paquier2023-01-23 04:55:18 +0000
committerMichael Paquier2023-01-23 04:55:18 +0000
commitc31cf1c03d01ce86f20bef8c980fe56a257b3b4b (patch)
tree171926cd166100130f6e7e1c0f799450db60ec20 /doc
parent16fd03e956540d1b47b743f6a84f37c54ac93dd4 (diff)
pg_walinspect: Add pg_get_wal_fpi_info()
This function is able to extract the full page images from a range of records, specified as of input arguments start_lsn and end_lsn. Like the other functions of this module, an error is returned if using LSNs that do not reflect real system values. All the FPIs stored in a single record are extracted. The module's version is bumped to 1.1. Author: Bharath Rupireddy Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/CALj2ACVCcvzd7WiWvD=6_7NBvVB_r6G0EGSxL4F8vosAi6Se4g@mail.gmail.com
Diffstat (limited to 'doc')
-rw-r--r--doc/src/sgml/pgwalinspect.sgml32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/src/sgml/pgwalinspect.sgml b/doc/src/sgml/pgwalinspect.sgml
index 119e162e60..22677e54f2 100644
--- a/doc/src/sgml/pgwalinspect.sgml
+++ b/doc/src/sgml/pgwalinspect.sgml
@@ -188,6 +188,38 @@ combined_size_percentage | 2.8634072910530795
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <function>pg_get_wal_fpi_info(start_lsn pg_lsn, end_lsn pg_lsn) returns setof record</function>
+ </term>
+
+ <listitem>
+ <para>
+ Gets a copy of full page images as <type>bytea</type> values (after
+ applying decompression when necessary) and their information associated
+ with all the valid WAL records between
+ <replaceable>start_lsn</replaceable> and
+ <replaceable>end_lsn</replaceable>. Returns one row per full page image.
+ If <replaceable>start_lsn</replaceable> or
+ <replaceable>end_lsn</replaceable> are not yet available, the function
+ will raise an error. For example:
+<screen>
+postgres=# SELECT lsn, reltablespace, reldatabase, relfilenode, relblocknumber,
+ forkname, substring(fpi for 24) as fpi_trimmed
+ FROM pg_get_wal_fpi_info('0/1801690', '0/1825C60');
+-[ RECORD 1 ]--+---------------------------------------------------
+lsn | 0/1807E20
+reltablespace | 1663
+reldatabase | 5
+relfilenode | 16396
+relblocknumber | 43
+forkname | main
+fpi_trimmed | \x00000000b89e660100000000a003c0030020042000000000
+</screen>
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>