diff options
-rw-r--r-- | doc/src/sgml/catalogs.sgml | 515 | ||||
-rw-r--r-- | doc/src/sgml/high-availability.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/logicaldecoding.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/release-9.5.sgml | 2 | ||||
-rw-r--r-- | doc/src/sgml/replication-origins.sgml | 2 |
5 files changed, 261 insertions, 262 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index d6b60db0744..0a37cde4208 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -239,23 +239,13 @@ </row> <row> - <entry><link linkend="catalog-pg-rewrite"><structname>pg_rewrite</structname></link></entry> - <entry>query rewrite rules</entry> - </row> - - <row> <entry><link linkend="catalog-pg-replication-origin"><structname>pg_replication_origin</structname></link></entry> <entry>registered replication origins</entry> </row> <row> - <entry><link linkend="catalog-pg-replication-origin-status"><structname>pg_replication_origin_status</structname></link></entry> - <entry>information about replication origins, including replication progress</entry> - </row> - - <row> - <entry><link linkend="catalog-pg-replication-slots"><structname>pg_replication_slots</structname></link></entry> - <entry>replication slot information</entry> + <entry><link linkend="catalog-pg-rewrite"><structname>pg_rewrite</structname></link></entry> + <entry>query rewrite rules</entry> </row> <row> @@ -5208,6 +5198,54 @@ </sect1> + <sect1 id="catalog-pg-replication-origin"> + <title><structname>pg_replication_origin</structname></title> + + <indexterm zone="catalog-pg-replication-origin"> + <primary>pg_replication_origin</primary> + </indexterm> + + <para> + The <structname>pg_replication_origin</structname> catalog contains + all replication origins created. For more on replication origins + see <xref linkend="replication-origins">. + </para> + + <table> + + <title><structname>pg_replication_origin</structname> Columns</title> + + <tgroup cols="4"> + <thead> + <row> + <entry>Name</entry> + <entry>Type</entry> + <entry>References</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><structfield>roident</structfield></entry> + <entry><type>Oid</type></entry> + <entry></entry> + <entry>A unique, cluster-wide identifier for the replication + origin. Should never leave the system.</entry> + </row> + + <row> + <entry><structfield>roname</structfield></entry> + <entry><type>text</type></entry> + <entry></entry> + <entry>The external, user defined, name of a replication + origin.</entry> + </row> + </tbody> + </tgroup> + </table> + </sect1> + <sect1 id="catalog-pg-rewrite"> <title><structname>pg_rewrite</structname></title> @@ -5320,252 +5358,6 @@ </sect1> - <sect1 id="catalog-pg-replication-origin"> - <title><structname>pg_replication_origin</structname></title> - - <indexterm zone="catalog-pg-replication-origin"> - <primary>pg_replication_origin</primary> - </indexterm> - - <para> - The <structname>pg_replication_origin</structname> catalog contains - all replication origins created. For more on replication origins - see <xref linkend="replication-origins">. - </para> - - <table> - - <title><structname>pg_replication_origin</structname> Columns</title> - - <tgroup cols="4"> - <thead> - <row> - <entry>Name</entry> - <entry>Type</entry> - <entry>References</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><structfield>roident</structfield></entry> - <entry><type>Oid</type></entry> - <entry></entry> - <entry>A unique, cluster-wide identifier for the replication - origin. Should never leave the system.</entry> - </row> - - <row> - <entry><structfield>roname</structfield></entry> - <entry><type>text</type></entry> - <entry></entry> - <entry>The external, user defined, name of a replication - origin.</entry> - </row> - </tbody> - </tgroup> - </table> - </sect1> - - <sect1 id="catalog-pg-replication-origin-status"> - <title><structname>pg_replication_origin_status</structname></title> - - <indexterm zone="catalog-pg-replication-origin-status"> - <primary>pg_replication_origin_status</primary> - </indexterm> - - <para> - The <structname>pg_replication_origin_status</structname> view - contains information about how far replay for a certain origin has - progressed. For more on replication origins - see <xref linkend="replication-origins">. - </para> - - <table> - - <title><structname>pg_replication_origin_status</structname> Columns</title> - - <tgroup cols="4"> - <thead> - <row> - <entry>Name</entry> - <entry>Type</entry> - <entry>References</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><structfield>local_id</structfield></entry> - <entry><type>Oid</type></entry> - <entry><literal><link linkend="catalog-pg-replication-origin"><structname>pg_replication_origin</structname></link>.roident</literal></entry> - <entry>internal node identifier</entry> - </row> - - <row> - <entry><structfield>external_id</structfield></entry> - <entry><type>text</type></entry> - <entry><literal><link linkend="catalog-pg-replication-origin"><structname>pg_replication_origin</structname></link>.roname</literal></entry> - <entry>external node identifier</entry> - </row> - - <row> - <entry><structfield>remote_lsn</structfield></entry> - <entry><type>pg_lsn</type></entry> - <entry></entry> - <entry>The origin node's LSN up to which data has been replicated.</entry> - </row> - - - <row> - <entry><structfield>local_lsn</structfield></entry> - <entry><type>pg_lsn</type></entry> - <entry></entry> - <entry> - This node's LSN at which <literal>remote_lsn</literal> has - been replicated. Used to flush commit records before persisting - data to disk when using asynchronous commits. - </entry> - </row> - </tbody> - </tgroup> - </table> - </sect1> - - <sect1 id="catalog-pg-replication-slots"> - <title><structname>pg_replication_slots</structname></title> - - <indexterm zone="catalog-pg-replication-slots"> - <primary>pg_replication_slots</primary> - </indexterm> - - <para> - The <structname>pg_replication_slots</structname> view provides a listing - of all replication slots that currently exist on the database cluster, - along with their current state. - </para> - - <para> - For more on replication slots, - see <xref linkend="streaming-replication-slots"> and <xref linkend="logicaldecoding">. - </para> - - <table> - - <title><structname>pg_replication_slots</structname> Columns</title> - - <tgroup cols="4"> - <thead> - <row> - <entry>Name</entry> - <entry>Type</entry> - <entry>References</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><structfield>slot_name</structfield></entry> - <entry><type>name</type></entry> - <entry></entry> - <entry>A unique, cluster-wide identifier for the replication slot</entry> - </row> - - <row> - <entry><structfield>plugin</structfield></entry> - <entry><type>name</type></entry> - <entry></entry> - <entry>The base name of the shared object containing the output plugin this logical slot is using, or null for physical slots.</entry> - </row> - - <row> - <entry><structfield>slot_type</structfield></entry> - <entry><type>text</type></entry> - <entry></entry> - <entry>The slot type - <literal>physical</> or <literal>logical</></entry> - </row> - - <row> - <entry><structfield>datoid</structfield></entry> - <entry><type>oid</type></entry> - <entry><literal><link linkend="catalog-pg-database"><structname>pg_database</structname></link>.oid</literal></entry> - <entry>The OID of the database this slot is associated with, or - null. Only logical slots have an associated database.</entry> - </row> - - <row> - <entry><structfield>database</structfield></entry> - <entry><type>text</type></entry> - <entry><literal><link linkend="catalog-pg-database"><structname>pg_database</structname></link>.datname</literal></entry> - <entry>The name of the database this slot is associated with, or - null. Only logical slots have an associated database.</entry> - </row> - - <row> - <entry><structfield>active</structfield></entry> - <entry><type>boolean</type></entry> - <entry></entry> - <entry>True if this slot is currently actively being used</entry> - </row> - - <row> - <entry><structfield>active_pid</structfield></entry> - <entry><type>integer</type></entry> - <entry></entry> - <entry>The process ID of the session using this slot if the slot - is currently actively being used. <literal>NULL</literal> if - inactive. - </entry> - </row> - - <row> - <entry><structfield>xmin</structfield></entry> - <entry><type>xid</type></entry> - <entry></entry> - <entry>The oldest transaction that this slot needs the database to - retain. <literal>VACUUM</literal> cannot remove tuples deleted - by any later transaction. - </entry> - </row> - - <row> - <entry><structfield>catalog_xmin</structfield></entry> - <entry><type>xid</type></entry> - <entry></entry> - <entry>The oldest transaction affecting the system catalogs that this - slot needs the database to retain. <literal>VACUUM</literal> cannot - remove catalog tuples deleted by any later transaction. - </entry> - </row> - - <row> - <entry><structfield>restart_lsn</structfield></entry> - <entry><type>pg_lsn</type></entry> - <entry></entry> - <entry>The address (<literal>LSN</literal>) of oldest WAL which still - might be required by the consumer of this slot and thus won't be - automatically removed during checkpoints. - </entry> - </row> - - <row> - <entry><structfield>confirmed_flush_lsn</structfield></entry> - <entry><type>pg_lsn</type></entry> - <entry></entry> - <entry>The address (<literal>LSN</literal>) up to which the logical - slot's consumer has confirmed receiving data. Data older than this is - not available anymore. <literal>NULL</> for physical slots. - </entry> - </row> - - </tbody> - </tgroup> - </table> - </sect1> - <sect1 id="catalog-pg-seclabel"> <title><structname>pg_seclabel</structname></title> @@ -7545,6 +7337,16 @@ </row> <row> + <entry><link linkend="view-pg-replication-origin-status"><structname>pg_replication_origin_status</structname></link></entry> + <entry>information about replication origins, including replication progress</entry> + </row> + + <row> + <entry><link linkend="view-pg-replication-slots"><structname>pg_replication_slots</structname></link></entry> + <entry>replication slot information</entry> + </row> + + <row> <entry><link linkend="view-pg-roles"><structname>pg_roles</structname></link></entry> <entry>database roles</entry> </row> @@ -8800,6 +8602,203 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx </sect1> + <sect1 id="view-pg-replication-origin-status"> + <title><structname>pg_replication_origin_status</structname></title> + + <indexterm zone="view-pg-replication-origin-status"> + <primary>pg_replication_origin_status</primary> + </indexterm> + + <para> + The <structname>pg_replication_origin_status</structname> view + contains information about how far replay for a certain origin has + progressed. For more on replication origins + see <xref linkend="replication-origins">. + </para> + + <table> + + <title><structname>pg_replication_origin_status</structname> Columns</title> + + <tgroup cols="4"> + <thead> + <row> + <entry>Name</entry> + <entry>Type</entry> + <entry>References</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><structfield>local_id</structfield></entry> + <entry><type>Oid</type></entry> + <entry><literal><link linkend="catalog-pg-replication-origin"><structname>pg_replication_origin</structname></link>.roident</literal></entry> + <entry>internal node identifier</entry> + </row> + + <row> + <entry><structfield>external_id</structfield></entry> + <entry><type>text</type></entry> + <entry><literal><link linkend="catalog-pg-replication-origin"><structname>pg_replication_origin</structname></link>.roname</literal></entry> + <entry>external node identifier</entry> + </row> + + <row> + <entry><structfield>remote_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> + <entry></entry> + <entry>The origin node's LSN up to which data has been replicated.</entry> + </row> + + <row> + <entry><structfield>local_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> + <entry></entry> + <entry> + This node's LSN at which <literal>remote_lsn</literal> has + been replicated. Used to flush commit records before persisting + data to disk when using asynchronous commits. + </entry> + </row> + </tbody> + </tgroup> + </table> + </sect1> + + <sect1 id="view-pg-replication-slots"> + <title><structname>pg_replication_slots</structname></title> + + <indexterm zone="view-pg-replication-slots"> + <primary>pg_replication_slots</primary> + </indexterm> + + <para> + The <structname>pg_replication_slots</structname> view provides a listing + of all replication slots that currently exist on the database cluster, + along with their current state. + </para> + + <para> + For more on replication slots, + see <xref linkend="streaming-replication-slots"> and <xref linkend="logicaldecoding">. + </para> + + <table> + + <title><structname>pg_replication_slots</structname> Columns</title> + + <tgroup cols="4"> + <thead> + <row> + <entry>Name</entry> + <entry>Type</entry> + <entry>References</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><structfield>slot_name</structfield></entry> + <entry><type>name</type></entry> + <entry></entry> + <entry>A unique, cluster-wide identifier for the replication slot</entry> + </row> + + <row> + <entry><structfield>plugin</structfield></entry> + <entry><type>name</type></entry> + <entry></entry> + <entry>The base name of the shared object containing the output plugin this logical slot is using, or null for physical slots.</entry> + </row> + + <row> + <entry><structfield>slot_type</structfield></entry> + <entry><type>text</type></entry> + <entry></entry> + <entry>The slot type - <literal>physical</> or <literal>logical</></entry> + </row> + + <row> + <entry><structfield>datoid</structfield></entry> + <entry><type>oid</type></entry> + <entry><literal><link linkend="catalog-pg-database"><structname>pg_database</structname></link>.oid</literal></entry> + <entry>The OID of the database this slot is associated with, or + null. Only logical slots have an associated database.</entry> + </row> + + <row> + <entry><structfield>database</structfield></entry> + <entry><type>text</type></entry> + <entry><literal><link linkend="catalog-pg-database"><structname>pg_database</structname></link>.datname</literal></entry> + <entry>The name of the database this slot is associated with, or + null. Only logical slots have an associated database.</entry> + </row> + + <row> + <entry><structfield>active</structfield></entry> + <entry><type>boolean</type></entry> + <entry></entry> + <entry>True if this slot is currently actively being used</entry> + </row> + + <row> + <entry><structfield>active_pid</structfield></entry> + <entry><type>integer</type></entry> + <entry></entry> + <entry>The process ID of the session using this slot if the slot + is currently actively being used. <literal>NULL</literal> if + inactive. + </entry> + </row> + + <row> + <entry><structfield>xmin</structfield></entry> + <entry><type>xid</type></entry> + <entry></entry> + <entry>The oldest transaction that this slot needs the database to + retain. <literal>VACUUM</literal> cannot remove tuples deleted + by any later transaction. + </entry> + </row> + + <row> + <entry><structfield>catalog_xmin</structfield></entry> + <entry><type>xid</type></entry> + <entry></entry> + <entry>The oldest transaction affecting the system catalogs that this + slot needs the database to retain. <literal>VACUUM</literal> cannot + remove catalog tuples deleted by any later transaction. + </entry> + </row> + + <row> + <entry><structfield>restart_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> + <entry></entry> + <entry>The address (<literal>LSN</literal>) of oldest WAL which still + might be required by the consumer of this slot and thus won't be + automatically removed during checkpoints. + </entry> + </row> + + <row> + <entry><structfield>confirmed_flush_lsn</structfield></entry> + <entry><type>pg_lsn</type></entry> + <entry></entry> + <entry>The address (<literal>LSN</literal>) up to which the logical + slot's consumer has confirmed receiving data. Data older than this is + not available anymore. <literal>NULL</> for physical slots. + </entry> + </row> + + </tbody> + </tgroup> + </table> + </sect1> + <sect1 id="view-pg-roles"> <title><structname>pg_roles</structname></title> diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 7ceb5881400..8834a429769 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -914,7 +914,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass' </para> <para> Existing replication slots and their state can be seen in the - <link linkend="catalog-pg-replication-slots"><structname>pg_replication_slots</structname></link> + <link linkend="view-pg-replication-slots"><structname>pg_replication_slots</structname></link> view. </para> <para> diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml index 109f76c1654..b29a90ac7cd 100644 --- a/doc/src/sgml/logicaldecoding.sgml +++ b/doc/src/sgml/logicaldecoding.sgml @@ -324,7 +324,7 @@ $ pg_recvlogical -d postgres --slot test --drop-slot <title>System Catalogs Related to Logical Decoding</title> <para> - The <link linkend="catalog-pg-replication-slots"><structname>pg_replication_slots</structname></link> + The <link linkend="view-pg-replication-slots"><structname>pg_replication_slots</structname></link> view and the <link linkend="monitoring-stats-views-table"><structname>pg_stat_replication</structname></link> view provide information about the current state of replication slots and diff --git a/doc/src/sgml/release-9.5.sgml b/doc/src/sgml/release-9.5.sgml index d64655b007a..a66b4fcfcfb 100644 --- a/doc/src/sgml/release-9.5.sgml +++ b/doc/src/sgml/release-9.5.sgml @@ -2176,7 +2176,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list. --> <para> Report the processes holding replication slots in <link - linkend="catalog-pg-replication-slots"><structname>pg_replication_slots</></> + linkend="view-pg-replication-slots"><structname>pg_replication_slots</></> (Craig Ringer) </para> diff --git a/doc/src/sgml/replication-origins.sgml b/doc/src/sgml/replication-origins.sgml index fdc41c99d77..317ca9a1dfb 100644 --- a/doc/src/sgml/replication-origins.sgml +++ b/doc/src/sgml/replication-origins.sgml @@ -66,7 +66,7 @@ <link linkend="pg-replication-origin-xact-setup"><function>pg_replication_origin_xact_setup()</function></link>. If that's done replication progress will persist in a crash safe manner. Replay progress for all replication origins can be seen in the - <link linkend="catalog-pg-replication-origin-status"> + <link linkend="view-pg-replication-origin-status"> <structname>pg_replication_origin_status</structname> </link> view. An individual origin's progress, e.g. when resuming replication, can be acquired using |