aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2024-01-09 13:04:46 -0500
committerRobert Haas <rhaas@postgresql.org>2024-01-09 13:04:46 -0500
commitf896057e46b06d5ac3f62f7d18f87a7f12185177 (patch)
treec9e1bdc1698d3f138e170bb8023b14b90ff5ff90
parentd97ef756afcadeeb040c3f11e764d6a7179d441e (diff)
downloadpostgresql-f896057e46b06d5ac3f62f7d18f87a7f12185177.tar.gz
postgresql-f896057e46b06d5ac3f62f7d18f87a7f12185177.zip
Document WAL summarization information functions.
Commit 174c480508ac25568561443e6d4a82d5c1103487 added two new information functions but failed to document them anywhere. Discussion: http://postgr.es/m/CA+Tgmobvqqj-DW9F7uUzT-cQqs6wcVb-Xhs=w=hzJnXSE-kRGw@mail.gmail.com
-rw-r--r--doc/src/sgml/func.sgml80
1 files changed, 80 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index cec21e42c05..de78d58d4bc 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -26480,6 +26480,86 @@ SELECT collation for ('foo' COLLATE "de_DE");
</sect2>
+ <sect2 id="functions-info-wal-summary">
+ <title>WAL Summarization Information Functions</title>
+
+ <para>
+ The functions shown in <xref linkend="functions-wal-summary"/>
+ print information about the status of WAL summarization.
+ See <xref linkend="guc-summarize-wal" />.
+ </para>
+
+ <table id="functions-wal-summary">
+ <title>WAL Summarization Information Functions</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry role="func_table_entry"><para role="func_signature">
+ Function
+ </para>
+ <para>
+ Description
+ </para></entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry role="func_table_entry"><para role="func_signature">
+ <indexterm>
+ <primary>pg_available_wal_summaries</primary>
+ </indexterm>
+ <function>pg_available_wal_summaries</function> ()
+ <returnvalue>setof record</returnvalue>
+ ( <parameter>tli</parameter> <type>bigint</type>,
+ <parameter>start_lsn</parameter> <type>pg_lsn</type>,
+ <parameter>end_lsn</parameter> <type>pg_lsn</type> )
+ </para>
+ <para>
+ Returns information about the WAL summary files present in the
+ data directory, under <literal>pg_wal/summaries</literal>.
+ One row will be returned per WAL summary file. Each file summarizes
+ WAL on the indicated TLI within the indicated LSN range. This function
+ might be useful to determine whether enough WAL summaries are present
+ on the server to take an incremental backup based on some prior
+ backup whose start LSN is known.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="func_table_entry"><para role="func_signature">
+ <indexterm>
+ <primary>pg_wal_summary_contents</primary>
+ </indexterm>
+ <function>pg_wal_summary_contents</function> ( <parameter>tli</parameter> <type>bigint</type>, <parameter>start_lsn</parameter> <type>pg_lsn</type>, <parameter>end_lsn</parameter> <type>pg_lsn</type> )
+ <returnvalue>setof record</returnvalue>
+ ( <parameter>relfilenode</parameter> <type>oid</type>,
+ <parameter>reltablespace</parameter> <type>oid</type>,
+ <parameter>reldatabase</parameter> <type>oid</type>,
+ <parameter>relforknumber</parameter> <type>smallint</type>,
+ <parameter>relblocknumber</parameter> <type>bigint</type>,
+ <parameter>is_limit_block</parameter> <type>boolean</type> )
+ </para>
+ <para>
+ Returns one information about the contents of a single WAL summary file
+ identified by TLI and starting and ending LSNs. Each row with
+ <literal>is_limit_block</literal> false indicates that the block
+ identified by the remaining output columns was modified by at least
+ one WAL record within the range of records summarized by this file.
+ Each row with <literal>is_limit_block</literal> true indicates either
+ that (a) the relation fork was truncated to the length given by
+ <literal>relblocknumber</literal> within the relevant range of WAL
+ records or (b) that the relation fork was created or dropped within
+ the relevant range of WAL records; in such cases,
+ <literal>relblocknumber</literal> will be zero.
+ </para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
</sect1>
<sect1 id="functions-admin">