From 614ac11bcdba08ae8ce2844b72312a818379aced Mon Sep 17 00:00:00 2001
From: Samay Sharma <smilingsamay@gmail.com>
Date: Mon, 13 Feb 2023 16:23:52 -0800
Subject: [PATCH v8 3/5] Remove Anti-Features section from Installation from
 source docs

Currently, several meson setup options are listed in anti-features.
However, they are similar to most other options in the postgres
features list as they are 'auto' features themselves. Also, other
options are likely better suited to the developer options section.
This commit, therefore, moves the options listed in the anti-features
section into other sections and removes that section.

For consistency, this reorganization has been done on the make section
of the docs as well.
---
 doc/src/sgml/installation.sgml | 166 ++++++++++++++-------------------
 1 file changed, 70 insertions(+), 96 deletions(-)

diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index 657330d368..9c7ee91cb9 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1214,23 +1214,6 @@ build-postgresql:
        </listitem>
       </varlistentry>
 
-     </variablelist>
-
-   </sect3>
-
-   <sect3 id="configure-options-anti-features">
-    <title>Anti-Features</title>
-
-    <para>
-     The options described in this section allow disabling
-     certain <productname>PostgreSQL</productname> features that are built
-     by default, but which might need to be turned off if the required
-     software or system features are not available.  Using these options is
-     not recommended unless really necessary.
-    </para>
-
-     <variablelist>
-
       <varlistentry id="configure-option-without-readline">
        <term><option>--without-readline</option></term>
        <listitem>
@@ -1270,47 +1253,6 @@ build-postgresql:
        </listitem>
       </varlistentry>
 
-      <varlistentry id="configure-option-disable-spinlocks">
-       <term><option>--disable-spinlocks</option></term>
-       <listitem>
-        <para>
-         Allow the build to succeed even if <productname>PostgreSQL</productname>
-         has no CPU spinlock support for the platform.  The lack of
-         spinlock support will result in very poor performance; therefore,
-         this option should only be used if the build aborts and
-         informs you that the platform lacks spinlock support. If this
-         option is required to build <productname>PostgreSQL</productname> on
-         your platform, please report the problem to the
-         <productname>PostgreSQL</productname> developers.
-        </para>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry id="configure-option-disable-atomics">
-       <term><option>--disable-atomics</option></term>
-       <listitem>
-        <para>
-         Disable use of CPU atomic operations.  This option does nothing on
-         platforms that lack such operations.  On platforms that do have
-         them, this will result in poor performance.  This option is only
-         useful for debugging or making performance comparisons.
-        </para>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry id="configure-option-disable-thread-safety">
-       <term><option>--disable-thread-safety</option></term>
-       <listitem>
-        <para>
-         Disable the thread-safety of client libraries.  This prevents
-         concurrent threads in <application>libpq</application> and
-         <application>ECPG</application> programs from safely controlling
-         their private connection handles.  Use this only on platforms
-         with deficient threading support.
-        </para>
-       </listitem>
-      </varlistentry>
-
      </variablelist>
 
    </sect3>
@@ -1702,6 +1644,47 @@ build-postgresql:
        </listitem>
       </varlistentry>
 
+      <varlistentry id="configure-option-disable-spinlocks">
+       <term><option>--disable-spinlocks</option></term>
+       <listitem>
+        <para>
+         Allow the build to succeed even if <productname>PostgreSQL</productname>
+         has no CPU spinlock support for the platform.  The lack of
+         spinlock support will result in very poor performance; therefore,
+         this option should only be used if the build aborts and
+         informs you that the platform lacks spinlock support. If this
+         option is required to build <productname>PostgreSQL</productname> on
+         your platform, please report the problem to the
+         <productname>PostgreSQL</productname> developers.
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry id="configure-option-disable-atomics">
+       <term><option>--disable-atomics</option></term>
+       <listitem>
+        <para>
+         Disable use of CPU atomic operations.  This option does nothing on
+         platforms that lack such operations.  On platforms that do have
+         them, this will result in poor performance.  This option is only
+         useful for debugging or making performance comparisons.
+        </para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry id="configure-option-disable-thread-safety">
+       <term><option>--disable-thread-safety</option></term>
+       <listitem>
+        <para>
+         Disable the thread-safety of client libraries.  This prevents
+         concurrent threads in <application>libpq</application> and
+         <application>ECPG</application> programs from safely controlling
+         their private connection handles.  Use this only on platforms
+         with deficient threading support.
+        </para>
+       </listitem>
+      </varlistentry>
+
      </variablelist>
 
    </sect3>
@@ -2661,13 +2644,6 @@ ninja install
        </para>
       </listitem>
      </varlistentry>
-    </variablelist>
-   </sect3>
-
-   <sect3 id="meson-options-anti-features">
-    <title>Anti-Features</title>
-
-    <variablelist>
      <varlistentry id="configure-readline-meson">
       <term><option>-Dreadline={ auto | enabled | disabled }</option></term>
       <listitem>
@@ -2707,36 +2683,6 @@ ninja install
        </para>
       </listitem>
      </varlistentry>
-
-     <varlistentry id="configure-spinlocks-meson">
-      <term><option>-Dspinlocks={ true | false }</option></term>
-      <listitem>
-       <para>
-        This option is set to true by default; setting it to false will
-        allow the build to succeed even if <productname>PostgreSQL</productname>
-        has no CPU spinlock support for the platform.  The lack of
-        spinlock support will result in very poor performance; therefore,
-        this option should only be changed if the build aborts and
-        informs you that the platform lacks spinlock support. If setting this
-        option to false is required to build <productname>PostgreSQL</productname> on
-        your platform, please report the problem to the
-        <productname>PostgreSQL</productname> developers.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry id="configure-atomics-meson">
-      <term><option>-Datomics={ true | false }</option></term>
-      <listitem>
-       <para>
-        This option is set to true by default; setting it to false will
-        disable use of CPU atomic operations.  The option does nothing on
-        platforms that lack such operations.  On platforms that do have
-        them, disabling atomics will result in poor performance.  Changing
-        this option is only useful for debugging or making performance comparisons.
-       </para>
-      </listitem>
-     </varlistentry>
     </variablelist>
    </sect3>
 
@@ -3158,8 +3104,36 @@ ninja install
         </para>
        </listitem>
       </varlistentry>
+      <varlistentry id="configure-spinlocks-meson">
+       <term><option>-Dspinlocks={ true | false }</option></term>
+       <listitem>
+        <para>
+         This option is set to true by default; setting it to false will
+         allow the build to succeed even if <productname>PostgreSQL</productname>
+         has no CPU spinlock support for the platform.  The lack of
+         spinlock support will result in very poor performance; therefore,
+         this option should only be changed if the build aborts and
+         informs you that the platform lacks spinlock support. If setting this
+         option to false is required to build <productname>PostgreSQL</productname> on
+         your platform, please report the problem to the
+         <productname>PostgreSQL</productname> developers.
+        </para>
+       </listitem>
+      </varlistentry>
 
-    </variablelist>
+      <varlistentry id="configure-atomics-meson">
+       <term><option>-Datomics={ true | false }</option></term>
+       <listitem>
+        <para>
+         This option is set to true by default; setting it to false will
+         disable use of CPU atomic operations.  The option does nothing on
+         platforms that lack such operations.  On platforms that do have
+         them, disabling atomics will result in poor performance.  Changing
+         this option is only useful for debugging or making performance comparisons.
+        </para>
+       </listitem>
+      </varlistentry>
+     </variablelist>
    </sect3>
   </sect2>
  </sect1>
-- 
2.38.1

