Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix ordering/categorization of some recently-added system views.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 May 2016 16:33:13 +0000 (12:33 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 May 2016 16:33:13 +0000 (12:33 -0400)
Somebody added pg_replication_origin, pg_replication_origin_status and
pg_replication_slots to catalogs.sgml without a whole lot of concern for
either alphabetical order or the difference between a table and a view.
Clean up the mess.

Back-patch to 9.5, not so much because this is critical as because if
I don't it will result in a cross-branch divergence in release-9.5.sgml,
which would be a maintenance hazard.

doc/src/sgml/catalogs.sgml
doc/src/sgml/high-availability.sgml
doc/src/sgml/logicaldecoding.sgml
doc/src/sgml/release-9.5.sgml
doc/src/sgml/replication-origins.sgml

index 90a137bc0d35345912452765b6a34d91d0de2466..0ef6ef111ea8f6bffab9c620c996f8430fa6dc92 100644 (file)
       <entry>information about range types</entry>
      </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>
 
  </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>
 
 
  </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>
-    </tbody>
-   </tgroup>
-  </table>
- </sect1>
-
  <sect1 id="catalog-pg-seclabel">
   <title><structname>pg_seclabel</structname></title>
 
       <entry>prepared transactions</entry>
      </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>
@@ -8760,6 +8573,193 @@ 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>
+
+    </tbody>
+   </tgroup>
+  </table>
+ </sect1>
+
  <sect1 id="view-pg-roles">
   <title><structname>pg_roles</structname></title>
 
index e4a50ba6549c0c09208f5c1854c09f2d7457c42f..1f1fb463436015ffc5c38234da52d9f88f24ab27 100644 (file)
@@ -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>
index 93f8e4ebdf92ce073f19bb305aca3985b2ae37cb..b6acf907598ca5caafec073a5e0a09af32a9ff19 100644 (file)
@@ -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
index d64655b007a34896ab60451041b0d9ecae3b3f55..a66b4fcfcfbd3b1bb0efae774a15edec5300a1c2 100644 (file)
@@ -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>
 
index fdc41c99d772161c3cbace97b305b161e133b05e..317ca9a1dfbf3d175c9f855d41ec012eeb87d9f8 100644 (file)
@@ -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