From 829fb5dfbf2343e27d52797776713345c71562f3 Mon Sep 17 00:00:00 2001
From: Peter Smith <peter.b.smith@fujitsu.com>
Date: Mon, 9 Aug 2021 12:28:39 +1000
Subject: [PATCH v2] create subscription options list order.

Change the WITH subscription parameter to be properly alphaetically ordered.
Otherwise it not very user-friending when looking for the option your are
interested in.

Currently it is mostly, but not fully alphabetical, so it looks like it was
always supposed to ordered but has evolved to be muddled.
---
 doc/src/sgml/ref/create_subscription.sgml | 124 +++++++++++++++---------------
 1 file changed, 63 insertions(+), 61 deletions(-)

diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml
index 702934e..96a971d 100644
--- a/doc/src/sgml/ref/create_subscription.sgml
+++ b/doc/src/sgml/ref/create_subscription.sgml
@@ -96,6 +96,57 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
       following parameters are supported:
 
       <variablelist>
+
+       <varlistentry>
+        <term><literal>binary</literal> (<type>boolean</type>)</term>
+        <listitem>
+         <para>
+          Specifies whether the subscription will request the publisher to
+          send the data in binary format (as opposed to text).
+          The default is <literal>false</literal>.
+          Even when this option is enabled, only data types that have
+          binary send and receive functions will be transferred in binary.
+         </para>
+
+         <para>
+          When doing cross-version replication, it could happen that the
+          publisher has a binary send function for some data type, but the
+          subscriber lacks a binary receive function for the type.  In
+          such a case, data transfer will fail, and
+          the <literal>binary</literal> option cannot be used.
+         </para>
+        </listitem>
+       </varlistentry>
+
+       <varlistentry>
+        <term><literal>connect</literal> (<type>boolean</type>)</term>
+        <listitem>
+         <para>
+          Specifies whether the <command>CREATE SUBSCRIPTION</command>
+          should connect to the publisher at all.  Setting this to
+          <literal>false</literal> will change default values of
+          <literal>enabled</literal>, <literal>create_slot</literal> and
+          <literal>copy_data</literal> to <literal>false</literal>.
+         </para>
+
+         <para>
+          It is not allowed to combine <literal>connect</literal> set to
+          <literal>false</literal> and <literal>enabled</literal>,
+          <literal>create_slot</literal>, or <literal>copy_data</literal>
+          set to <literal>true</literal>.
+         </para>
+
+         <para>
+          Since no connection is made when this option is set
+          to <literal>false</literal>, the tables are not subscribed, and so
+          after you enable the subscription nothing will be replicated.
+          It is required to run
+          <literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> in order
+          for tables to be subscribed.
+         </para>
+        </listitem>
+       </varlistentry>
+
        <varlistentry>
         <term><literal>copy_data</literal> (<type>boolean</type>)</term>
         <listitem>
@@ -148,6 +199,18 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
        </varlistentry>
 
        <varlistentry>
+        <term><literal>streaming</literal> (<type>boolean</type>)</term>
+        <listitem>
+         <para>
+          Specifies whether streaming of in-progress transactions should
+          be enabled for this subscription.  By default, all transactions
+          are fully decoded on the publisher, and only then sent to the
+          subscriber as a whole.
+         </para>
+        </listitem>
+       </varlistentry>
+
+       <varlistentry>
         <term><literal>synchronous_commit</literal> (<type>enum</type>)</term>
         <listitem>
          <para>
@@ -180,67 +243,6 @@ CREATE SUBSCRIPTION <replaceable class="parameter">subscription_name</replaceabl
        </varlistentry>
 
        <varlistentry>
-        <term><literal>binary</literal> (<type>boolean</type>)</term>
-        <listitem>
-         <para>
-          Specifies whether the subscription will request the publisher to
-          send the data in binary format (as opposed to text).
-          The default is <literal>false</literal>.
-          Even when this option is enabled, only data types that have
-          binary send and receive functions will be transferred in binary.
-         </para>
-
-         <para>
-          When doing cross-version replication, it could happen that the
-          publisher has a binary send function for some data type, but the
-          subscriber lacks a binary receive function for the type.  In
-          such a case, data transfer will fail, and
-          the <literal>binary</literal> option cannot be used.
-         </para>
-        </listitem>
-       </varlistentry>
-
-       <varlistentry>
-        <term><literal>connect</literal> (<type>boolean</type>)</term>
-        <listitem>
-         <para>
-          Specifies whether the <command>CREATE SUBSCRIPTION</command>
-          should connect to the publisher at all.  Setting this to
-          <literal>false</literal> will change default values of
-          <literal>enabled</literal>, <literal>create_slot</literal> and
-          <literal>copy_data</literal> to <literal>false</literal>.
-         </para>
-
-         <para>
-          It is not allowed to combine <literal>connect</literal> set to
-          <literal>false</literal> and <literal>enabled</literal>,
-          <literal>create_slot</literal>, or <literal>copy_data</literal>
-          set to <literal>true</literal>.
-         </para>
-
-         <para>
-          Since no connection is made when this option is set
-          to <literal>false</literal>, the tables are not subscribed, and so
-          after you enable the subscription nothing will be replicated.
-          It is required to run
-          <literal>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</literal> in order
-          for tables to be subscribed.
-         </para>
-        </listitem>
-       </varlistentry>
-       <varlistentry>
-        <term><literal>streaming</literal> (<type>boolean</type>)</term>
-        <listitem>
-         <para>
-          Specifies whether streaming of in-progress transactions should
-          be enabled for this subscription.  By default, all transactions
-          are fully decoded on the publisher, and only then sent to the
-          subscriber as a whole.
-         </para>
-
-        </listitem>
-       </varlistentry>
-       <varlistentry>
         <term><literal>two_phase</literal> (<type>boolean</type>)</term>
         <listitem>
          <para>
-- 
1.8.3.1

