V2-0001 Get rid of section n_n_n on DOCs.diff.diff

application/octet-stream

Filename: V2-0001 Get rid of section n_n_n on DOCs.diff.diff
Type: application/octet-stream
Part: 0
Message: Re: Get rid of "Section.N.N.N" on DOCs
From 00fe4d4aa1876066e73254773153366a5bbdba9f Mon Sep 17 00:00:00 2001
From: PegoraroF10 <marcos@f10.com.br>
Date: Tue, 23 Dec 2025 11:25:34 -0300
Subject: [PATCH] Copied content of tag title to xreflabel tag, so all section
 n.n.n will be replaced by these titles

---
 doc/src/sgml/advanced.sgml            |  14 +--
 doc/src/sgml/amcheck.sgml             |   8 +-
 doc/src/sgml/arch-dev.sgml            |  18 +--
 doc/src/sgml/archive-modules.sgml     |  12 +-
 doc/src/sgml/array.sgml               |  14 +--
 doc/src/sgml/auth-delay.sgml          |   4 +-
 doc/src/sgml/auto-explain.sgml        |   6 +-
 doc/src/sgml/backup-manifest.sgml     |   6 +-
 doc/src/sgml/backup.sgml              |  36 +++---
 doc/src/sgml/basebackup-to-shell.sgml |   4 +-
 doc/src/sgml/basic-archive.sgml       |   6 +-
 doc/src/sgml/bki.sgml                 |  22 ++--
 doc/src/sgml/bloom.sgml               |  10 +-
 doc/src/sgml/brin.sgml                |  12 +-
 doc/src/sgml/btree-gin.sgml           |   4 +-
 doc/src/sgml/btree-gist.sgml          |   4 +-
 doc/src/sgml/btree.sgml               |  16 +--
 doc/src/sgml/catalogs.sgml            | 130 +++++++++++-----------
 doc/src/sgml/charset.sgml             |  70 ++++++------
 doc/src/sgml/citext.sgml              |  10 +-
 doc/src/sgml/client-auth.sgml         |  32 +++---
 doc/src/sgml/color.sgml               |   4 +-
 doc/src/sgml/config.sgml              | 132 +++++++++++-----------
 doc/src/sgml/contrib-spi.sgml         |   8 +-
 doc/src/sgml/contrib.sgml             |   4 +-
 doc/src/sgml/cube.sgml                |  12 +-
 doc/src/sgml/custom-rmgr.sgml         |   2 +-
 doc/src/sgml/custom-scan.sgml         |  12 +-
 doc/src/sgml/datatype.sgml            | 106 +++++++++---------
 doc/src/sgml/datetime.sgml            |  14 +--
 doc/src/sgml/ddl.sgml                 | 108 +++++++++---------
 doc/src/sgml/dfunc.sgml               |   2 +-
 doc/src/sgml/dict-int.sgml            |   4 +-
 doc/src/sgml/dict-xsyn.sgml           |   4 +-
 doc/src/sgml/dml.sgml                 |   8 +-
 doc/src/sgml/docguide.sgml            |  34 +++---
 doc/src/sgml/earthdistance.sgml       |   4 +-
 doc/src/sgml/ecpg.sgml                | 154 +++++++++++++-------------
 doc/src/sgml/event-trigger.sgml       |  16 +--
 doc/src/sgml/extend.sgml              |  36 +++---
 doc/src/sgml/external-projects.sgml   |   8 +-
 doc/src/sgml/fdwhandler.sgml          |  34 +++---
 doc/src/sgml/features.sgml            |  16 +--
 doc/src/sgml/fuzzystrmatch.sgml       |  10 +-
 doc/src/sgml/generic-wal.sgml         |   2 +-
 doc/src/sgml/geqo.sgml                |  12 +-
 doc/src/sgml/gin.sgml                 |  20 ++--
 doc/src/sgml/gist.sgml                |  14 +--
 doc/src/sgml/hash.sgml                |   6 +-
 doc/src/sgml/high-availability.sgml   |  52 ++++-----
 doc/src/sgml/history.sgml             |   8 +-
 doc/src/sgml/hstore.sgml              |  16 +--
 doc/src/sgml/indexam.sgml             |  12 +-
 doc/src/sgml/indices.sgml             |  36 +++---
 doc/src/sgml/info.sgml                |   2 +-
 doc/src/sgml/information_schema.sgml  | 132 +++++++++++-----------
 doc/src/sgml/installation.sgml        |  82 +++++++-------
 doc/src/sgml/intagg.sgml              |   4 +-
 doc/src/sgml/intarray.sgml            |  10 +-
 doc/src/sgml/intro.sgml               |   2 +-
 doc/src/sgml/isn.sgml                 |  14 +--
 doc/src/sgml/jit.sgml                 |  18 +--
 doc/src/sgml/json.sgml                |  16 +--
 doc/src/sgml/libpq.sgml               | 112 +++++++++----------
 doc/src/sgml/lo.sgml                  |   8 +-
 doc/src/sgml/lobj.sgml                |  32 +++---
 doc/src/sgml/logical-replication.sgml |  78 ++++++-------
 doc/src/sgml/logicaldecoding.sgml     |  92 +++++++--------
 doc/src/sgml/ltree.sgml               |  12 +-
 doc/src/sgml/maintenance.sgml         |  20 ++--
 doc/src/sgml/manage-ag.sgml           |  12 +-
 doc/src/sgml/monitoring.sgml          |  88 +++++++--------
 doc/src/sgml/mvcc.sgml                |  34 +++---
 doc/src/sgml/nls.sgml                 |  16 +--
 doc/src/sgml/notation.sgml            |   2 +-
 doc/src/sgml/oauth-validators.sgml    |  18 +--
 doc/src/sgml/pageinspect.sgml         |  14 +--
 doc/src/sgml/parallel.sgml            |  20 ++--
 doc/src/sgml/passwordcheck.sgml       |   2 +-
 doc/src/sgml/perform.sgml             |  46 ++++----
 doc/src/sgml/pgbuffercache.sgml       |  26 ++---
 doc/src/sgml/pgcrypto.sgml            |  74 ++++++-------
 doc/src/sgml/pgfreespacemap.sgml      |   6 +-
 doc/src/sgml/pglogicalinspect.sgml    |   4 +-
 doc/src/sgml/pgoverexplain.sgml       |   6 +-
 doc/src/sgml/pgprewarm.sgml           |   6 +-
 doc/src/sgml/pgrowlocks.sgml          |   6 +-
 doc/src/sgml/pgstatstatements.sgml    |  12 +-
 doc/src/sgml/pgstattuple.sgml         |   4 +-
 doc/src/sgml/pgsurgery.sgml           |   4 +-
 doc/src/sgml/pgtrgm.sgml              |  14 +--
 doc/src/sgml/pgvisibility.sgml        |   4 +-
 doc/src/sgml/pgwalinspect.sgml        |   4 +-
 doc/src/sgml/planstats.sgml           |  12 +-
 doc/src/sgml/plperl.sgml              |  24 ++--
 doc/src/sgml/plpgsql.sgml             | 150 ++++++++++++-------------
 doc/src/sgml/plpython.sgml            |  40 +++----
 doc/src/sgml/pltcl.sgml               |  24 ++--
 doc/src/sgml/postgres-fdw.sgml        |  42 +++----
 doc/src/sgml/problems.sgml            |   8 +-
 doc/src/sgml/protocol.sgml            |  62 +++++------
 doc/src/sgml/queries.sgml             |  54 ++++-----
 doc/src/sgml/query.sgml               |  18 +--
 doc/src/sgml/rangetypes.sgml          |  22 ++--
 doc/src/sgml/regress.sgml             |  46 ++++----
 doc/src/sgml/release-19.sgml          |   2 +-
 doc/src/sgml/release.sgml             |   2 +-
 doc/src/sgml/rowtypes.sgml            |  14 +--
 doc/src/sgml/rules.sgml               |  28 ++---
 doc/src/sgml/runtime.sgml             |  62 +++++------
 doc/src/sgml/seg.sgml                 |  12 +-
 doc/src/sgml/sepgsql.sgml             |  30 ++---
 doc/src/sgml/sourcerepo.sgml          |   2 +-
 doc/src/sgml/sources.sgml             |   8 +-
 doc/src/sgml/spgist.sgml              |  18 +--
 doc/src/sgml/spi.sgml                 |  12 +-
 doc/src/sgml/sslinfo.sgml             |   4 +-
 doc/src/sgml/start.sgml               |   8 +-
 doc/src/sgml/storage.sgml             |  20 ++--
 doc/src/sgml/syntax.sgml              |  66 +++++------
 doc/src/sgml/system-views.sgml        |  80 ++++++-------
 doc/src/sgml/tablefunc.sgml           |  14 +--
 doc/src/sgml/tablesample-method.sgml  |   2 +-
 doc/src/sgml/textsearch.sgml          |  72 ++++++------
 doc/src/sgml/trigger.sgml             |   8 +-
 doc/src/sgml/tsm-system-rows.sgml     |   2 +-
 doc/src/sgml/tsm-system-time.sgml     |   2 +-
 doc/src/sgml/typeconv.sgml            |  12 +-
 doc/src/sgml/unaccent.sgml            |   6 +-
 doc/src/sgml/user-manag.sgml          |  12 +-
 doc/src/sgml/uuid-ossp.sgml           |   6 +-
 doc/src/sgml/wal.sgml                 |  14 +--
 doc/src/sgml/xact.sgml                |   6 +-
 doc/src/sgml/xaggr.sgml               |  12 +-
 doc/src/sgml/xfunc.sgml               |  92 +++++++--------
 doc/src/sgml/xindex.sgml              |  18 +--
 doc/src/sgml/xml2.sgml                |  14 +--
 doc/src/sgml/xoper.sgml               |  16 +--
 doc/src/sgml/xplang.sgml              |   2 +-
 doc/src/sgml/xtypes.sgml              |   4 +-
 140 files changed, 1794 insertions(+), 1794 deletions(-)

diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml
index 451bcb202ec..7dec52d4259 100644
--- a/doc/src/sgml/advanced.sgml
+++ b/doc/src/sgml/advanced.sgml
@@ -3,7 +3,7 @@
  <chapter id="tutorial-advanced">
   <title>Advanced Features</title>
 
-  <sect1 id="tutorial-advanced-intro">
+  <sect1 id="tutorial-advanced-intro" xreflabel="Introduction">
    <title>Introduction</title>
 
    <para>
@@ -29,7 +29,7 @@
   </sect1>
 
 
-  <sect1 id="tutorial-views">
+  <sect1 id="tutorial-views" xreflabel="Views">
    <title>Views</title>
 
    <indexterm zone="tutorial-views">
@@ -68,7 +68,7 @@ SELECT * FROM myview;
   </sect1>
 
 
-  <sect1 id="tutorial-fk">
+  <sect1 id="tutorial-fk" xreflabel="Foreign Keys">
    <title>Foreign Keys</title>
 
    <indexterm zone="tutorial-fk">
@@ -137,7 +137,7 @@ DETAIL:  Key (city)=(Berkeley) is not present in table "cities".
   </sect1>
 
 
-  <sect1 id="tutorial-transactions">
+  <sect1 id="tutorial-transactions" xreflabel="Transactions">
    <title>Transactions</title>
 
    <indexterm zone="tutorial-transactions">
@@ -317,7 +317,7 @@ COMMIT;
   </sect1>
 
 
-  <sect1 id="tutorial-window">
+  <sect1 id="tutorial-window" xreflabel="Window Functions">
    <title>Window Functions</title>
 
    <indexterm zone="tutorial-window">
@@ -565,7 +565,7 @@ SELECT sum(salary) OVER w, avg(salary) OVER w
   </sect1>
 
 
-  <sect1 id="tutorial-inheritance">
+  <sect1 id="tutorial-inheritance" xreflabel="Inheritance">
    <title>Inheritance</title>
 
    <indexterm zone="tutorial-inheritance">
@@ -703,7 +703,7 @@ SELECT name, elevation
   </sect1>
 
 
-  <sect1 id="tutorial-conclusion">
+  <sect1 id="tutorial-conclusion" xreflabel="Conclusion">
    <title>Conclusion</title>
 
    <para>
diff --git a/doc/src/sgml/amcheck.sgml b/doc/src/sgml/amcheck.sgml
index 08006856579..38d48715973 100644
--- a/doc/src/sgml/amcheck.sgml
+++ b/doc/src/sgml/amcheck.sgml
@@ -55,7 +55,7 @@
   able to infer something of the data itself from such messages.
  </para>
 
- <sect2 id="amcheck-functions">
+ <sect2 id="amcheck-functions" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -375,7 +375,7 @@ SET client_min_messages = DEBUG1;
   </variablelist>
  </sect2>
 
- <sect2 id="amcheck-optional-heapallindexed-verification">
+ <sect2 id="amcheck-optional-heapallindexed-verification" xreflabel="Optional heapallindexed Verification">
   <title>Optional <parameter>heapallindexed</parameter> Verification</title>
  <para>
   When the <parameter>heapallindexed</parameter> argument to B-Tree
@@ -416,7 +416,7 @@ SET client_min_messages = DEBUG1;
 
  </sect2>
 
- <sect2 id="amcheck-using-amcheck-effectively">
+ <sect2 id="amcheck-using-amcheck-effectively" xreflabel="Using amcheck Effectively">
   <title>Using <filename>amcheck</filename> Effectively</title>
 
  <para>
@@ -564,7 +564,7 @@ SET client_min_messages = DEBUG1;
  </para>
 
  </sect2>
- <sect2 id="amcheck-repairing-corruption">
+ <sect2 id="amcheck-repairing-corruption" xreflabel="Repairing Corruption">
   <title>Repairing Corruption</title>
  <para>
   No error concerning corruption raised by <filename>amcheck</filename> should
diff --git a/doc/src/sgml/arch-dev.sgml b/doc/src/sgml/arch-dev.sgml
index 06b6e2a8493..0b1d91d96ac 100644
--- a/doc/src/sgml/arch-dev.sgml
+++ b/doc/src/sgml/arch-dev.sgml
@@ -23,7 +23,7 @@
    at which the results are returned to the client.
   </para>
 
-  <sect1 id="query-path">
+  <sect1 id="query-path" xreflabel="The Path of a Query">
    <title>The Path of a Query</title>
 
    <para>
@@ -110,7 +110,7 @@
    </para>
   </sect1>
 
-  <sect1 id="connect-estab">
+  <sect1 id="connect-estab" xreflabel="How Connections Are Established">
    <title>How Connections Are Established</title>
 
    <para>
@@ -154,7 +154,7 @@
    </para>
   </sect1>
 
-  <sect1 id="parser-stage">
+  <sect1 id="parser-stage" xreflabel="The Parser Stage">
    <title>The Parser Stage</title>
 
    <para>
@@ -178,7 +178,7 @@
     </itemizedlist>
    </para>
 
-   <sect2 id="parser-stage-parser">
+   <sect2 id="parser-stage-parser" xreflabel="Parser">
     <title>Parser</title>
 
     <para>
@@ -241,7 +241,7 @@
 
    </sect2>
 
-   <sect2 id="parser-stage-transformation-process">
+   <sect2 id="parser-stage-transformation-process" xreflabel="Transformation Process">
      <title>Transformation Process</title>
 
     <para>
@@ -283,7 +283,7 @@
    </sect2>
   </sect1>
 
-  <sect1 id="rule-system">
+  <sect1 id="rule-system" xreflabel="The PostgreSQL Rule System">
    <title>The <productname>PostgreSQL</productname> Rule System</title>
 
    <para>
@@ -328,7 +328,7 @@
 
   </sect1>
 
-  <sect1 id="planner-optimizer">
+  <sect1 id="planner-optimizer" xreflabel="Planner/Optimizer">
    <title>Planner/Optimizer</title>
 
    <para>
@@ -365,7 +365,7 @@
     and plans.
    </para>
 
-   <sect2 id="planner-optimizer-generating-possible-plans">
+   <sect2 id="planner-optimizer-generating-possible-plans" xreflabel="Generating Possible Plans">
     <title>Generating Possible Plans</title>
 
     <para>
@@ -477,7 +477,7 @@
    </sect2>
   </sect1>
 
-  <sect1 id="executor">
+  <sect1 id="executor" xreflabel="Executor">
    <title>Executor</title>
 
    <para>
diff --git a/doc/src/sgml/archive-modules.sgml b/doc/src/sgml/archive-modules.sgml
index 10ec96eae96..70916c9b03d 100644
--- a/doc/src/sgml/archive-modules.sgml
+++ b/doc/src/sgml/archive-modules.sgml
@@ -36,7 +36,7 @@
   example, which demonstrates some useful techniques.
  </para>
 
- <sect1 id="archive-module-init">
+ <sect1 id="archive-module-init" xreflabel="Initialization Functions">
   <title>Initialization Functions</title>
   <indexterm zone="archive-module-init">
    <primary>_PG_archive_module_init</primary>
@@ -70,14 +70,14 @@ typedef const ArchiveModuleCallbacks *(*ArchiveModuleInit) (void);
   </para>
  </sect1>
 
- <sect1 id="archive-module-callbacks">
+ <sect1 id="archive-module-callbacks" xreflabel="Archive Module Callbacks">
   <title>Archive Module Callbacks</title>
   <para>
    The archive callbacks define the actual archiving behavior of the module.
    The server will call them as required to process each individual WAL file.
   </para>
 
-  <sect2 id="archive-module-startup">
+  <sect2 id="archive-module-startup" xreflabel="Startup Callback">
    <title>Startup Callback</title>
    <para>
     The <function>startup_cb</function> callback is called shortly after the
@@ -91,7 +91,7 @@ typedef void (*ArchiveStartupCB) (ArchiveModuleState *state);
    </para>
   </sect2>
 
-  <sect2 id="archive-module-check">
+  <sect2 id="archive-module-check" xreflabel="Check Callback">
    <title>Check Callback</title>
    <para>
     The <function>check_configured_cb</function> callback is called to determine
@@ -128,7 +128,7 @@ WARNING:  archive_mode enabled, yet archiving is not configured
    </note>
   </sect2>
 
-  <sect2 id="archive-module-archive">
+  <sect2 id="archive-module-archive" xreflabel="Archive Callback">
    <title>Archive Callback</title>
    <para>
     The <function>archive_file_cb</function> callback is called to archive a
@@ -157,7 +157,7 @@ typedef bool (*ArchiveFileCB) (ArchiveModuleState *state, const char *file, cons
    </note>
   </sect2>
 
-  <sect2 id="archive-module-shutdown">
+  <sect2 id="archive-module-shutdown" xreflabel="Shutdown Callback">
    <title>Shutdown Callback</title>
    <para>
     The <function>shutdown_cb</function> callback is called when the archiver
diff --git a/doc/src/sgml/array.sgml b/doc/src/sgml/array.sgml
index ce338c770c9..827b6804618 100644
--- a/doc/src/sgml/array.sgml
+++ b/doc/src/sgml/array.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/array.sgml -->
 
-<sect1 id="arrays">
+<sect1 id="arrays" xreflabel="Arrays">
  <title>Arrays</title>
 
  <indexterm>
@@ -14,7 +14,7 @@
   or domain can be created.
  </para>
 
- <sect2 id="arrays-declaration">
+ <sect2 id="arrays-declaration" xreflabel="Declaration of Array Types">
   <title>Declaration of Array Types</title>
 
   <indexterm>
@@ -84,7 +84,7 @@ CREATE TABLE tictactoe (
  </para>
  </sect2>
 
- <sect2 id="arrays-input">
+ <sect2 id="arrays-input" xreflabel="Array Value Input">
   <title>Array Value Input</title>
 
   <indexterm>
@@ -197,7 +197,7 @@ INSERT INTO sal_emp
  </para>
  </sect2>
 
- <sect2 id="arrays-accessing">
+ <sect2 id="arrays-accessing" xreflabel="Accessing Arrays">
   <title>Accessing Arrays</title>
 
   <indexterm>
@@ -377,7 +377,7 @@ SELECT cardinality(schedule) FROM sal_emp WHERE name = 'Carol';
  </para>
  </sect2>
 
- <sect2 id="arrays-modifying">
+ <sect2 id="arrays-modifying" xreflabel="Modifying Arrays">
   <title>Modifying Arrays</title>
 
   <indexterm>
@@ -595,7 +595,7 @@ SELECT array_append(ARRAY[1, 2], NULL);    -- this might have been meant
  </para>
  </sect2>
 
- <sect2 id="arrays-searching">
+ <sect2 id="arrays-searching" xreflabel="Searching in Arrays">
   <title>Searching in Arrays</title>
 
   <indexterm>
@@ -694,7 +694,7 @@ SELECT array_positions(ARRAY[1, 4, 3, 1, 3, 4, 2, 1], 1);
  </tip>
  </sect2>
 
- <sect2 id="arrays-io">
+ <sect2 id="arrays-io" xreflabel="Array Input and Output Syntax">
   <title>Array Input and Output Syntax</title>
 
   <indexterm>
diff --git a/doc/src/sgml/auth-delay.sgml b/doc/src/sgml/auth-delay.sgml
index 0571f2a99df..00aa16d8694 100644
--- a/doc/src/sgml/auth-delay.sgml
+++ b/doc/src/sgml/auth-delay.sgml
@@ -21,7 +21,7 @@
   <xref linkend="guc-shared-preload-libraries"/> in <filename>postgresql.conf</filename>.
  </para>
 
- <sect2 id="auth-delay-configuration-parameters">
+ <sect2 id="auth-delay-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
   <variablelist>
@@ -54,7 +54,7 @@ auth_delay.milliseconds = '500'
 </programlisting>
  </sect2>
 
- <sect2 id="auth-delay-author">
+ <sect2 id="auth-delay-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/auto-explain.sgml b/doc/src/sgml/auto-explain.sgml
index 15c868021e6..97d17c28cbb 100644
--- a/doc/src/sgml/auto-explain.sgml
+++ b/doc/src/sgml/auto-explain.sgml
@@ -32,7 +32,7 @@ LOAD 'auto_explain';
   that.
  </para>
 
- <sect2 id="auto-explain-configuration-parameters">
+ <sect2 id="auto-explain-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
  <para>
@@ -316,7 +316,7 @@ auto_explain.log_min_duration = '3s'
 </programlisting>
  </sect2>
 
- <sect2 id="auto-explain-example">
+ <sect2 id="auto-explain-example" xreflabel="Example">
   <title>Example</title>
 
 <programlisting>
@@ -348,7 +348,7 @@ LOG:  duration: 3.651 ms  plan:
 ]]></screen>
  </sect2>
 
- <sect2 id="auto-explain-author">
+ <sect2 id="auto-explain-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/backup-manifest.sgml b/doc/src/sgml/backup-manifest.sgml
index 594e216bcba..8f04b54334e 100644
--- a/doc/src/sgml/backup-manifest.sgml
+++ b/doc/src/sgml/backup-manifest.sgml
@@ -25,7 +25,7 @@
    in this object are described in the next section.
   </para>
 
- <sect1 id="backup-manifest-toplevel">
+ <sect1 id="backup-manifest-toplevel" xreflabel="Backup Manifest Top-level Object">
   <title>Backup Manifest Top-level Object</title>
 
   <para>
@@ -99,7 +99,7 @@
   </variablelist>
  </sect1>
 
- <sect1 id="backup-manifest-files">
+ <sect1 id="backup-manifest-files" xreflabel="Backup Manifest File Object">
   <title>Backup Manifest File Object</title>
 
   <para>
@@ -178,7 +178,7 @@
   </variablelist>
  </sect1>
 
- <sect1 id="backup-manifest-wal-ranges">
+ <sect1 id="backup-manifest-wal-ranges" xreflabel="Backup Manifest WAL Range Object">
   <title>Backup Manifest WAL Range Object</title>
 
   <para>
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 168444eccc5..0ca810ebfa0 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -24,7 +24,7 @@
   in the following sections.
  </para>
 
- <sect1 id="backup-dump">
+ <sect1 id="backup-dump" xreflabel="SQL Dump">
   <title><acronym>SQL</acronym> Dump</title>
 
   <para>
@@ -101,7 +101,7 @@ pg_dump <replaceable class="parameter">dbname</replaceable> &gt; <replaceable cl
    exclusive lock, such as most forms of <command>ALTER TABLE</command>.)
   </para>
 
-  <sect2 id="backup-dump-restore">
+  <sect2 id="backup-dump-restore" xreflabel="Restoring the Dump">
    <title>Restoring the Dump</title>
 
    <para>
@@ -194,7 +194,7 @@ pg_dump -h <replaceable>host1</replaceable> <replaceable>dbname</replaceable> |
    </para>
   </sect2>
 
-  <sect2 id="backup-dump-all">
+  <sect2 id="backup-dump-all" xreflabel="Using pg_dumpall">
    <title>Using <application>pg_dumpall</application></title>
 
    <para>
@@ -238,7 +238,7 @@ psql -X -f <replaceable class="parameter">dumpfile</replaceable> postgres
    </para>
   </sect2>
 
-  <sect2 id="backup-dump-large">
+  <sect2 id="backup-dump-large" xreflabel="Handling Large Databases">
    <title>Handling Large Databases</title>
 
    <para>
@@ -354,7 +354,7 @@ pg_dump -j <replaceable class="parameter">num</replaceable> -F d -f <replaceable
   </sect2>
  </sect1>
 
- <sect1 id="backup-file">
+ <sect1 id="backup-file" xreflabel="File System Level Backup">
   <title>File System Level Backup</title>
 
   <para>
@@ -470,7 +470,7 @@ tar -cf backup.tar /usr/local/pgsql/data
   </para>
  </sect1>
 
- <sect1 id="continuous-archiving">
+ <sect1 id="continuous-archiving" xreflabel="Continuous Archiving and Point-in-Time Recovery (PITR)">
   <title>Continuous Archiving and Point-in-Time Recovery (PITR)</title>
 
   <indexterm zone="backup">
@@ -569,7 +569,7 @@ tar -cf backup.tar /usr/local/pgsql/data
    archiving WAL files.
   </para>
 
-  <sect2 id="backup-archiving-wal">
+  <sect2 id="backup-archiving-wal" xreflabel="Setting Up WAL Archiving">
    <title>Setting Up WAL Archiving</title>
 
    <para>
@@ -802,7 +802,7 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 &amp;&amp; cp pg_wal/0
    </para>
   </sect2>
 
-  <sect2 id="backup-base-backup">
+  <sect2 id="backup-base-backup" xreflabel="Making a Base Backup">
    <title>Making a Base Backup</title>
 
    <para>
@@ -863,7 +863,7 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 &amp;&amp; cp pg_wal/0
    </para>
   </sect2>
 
-  <sect2 id="backup-incremental-backup">
+  <sect2 id="backup-incremental-backup" xreflabel="Making an Incremental Backup">
    <title>Making an Incremental Backup</title>
 
    <para>
@@ -944,7 +944,7 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 &amp;&amp; cp pg_wal/0
    </para>
   </sect2>
 
-  <sect2 id="backup-lowlevel-base-backup">
+  <sect2 id="backup-lowlevel-base-backup" xreflabel="Making a Base Backup Using the Low Level API">
    <title>Making a Base Backup Using the Low Level API</title>
    <para>
     Instead of taking a full or incremental base backup using
@@ -1071,7 +1071,7 @@ SELECT * FROM pg_backup_stop(wait_for_archive => true);
    </listitem>
   </orderedlist>
     </para>
-   <sect3 id="backup-lowlevel-base-backup-data">
+   <sect3 id="backup-lowlevel-base-backup-data" xreflabel="Backing Up the Data Directory">
    <title>Backing Up the Data Directory</title>
    <para>
     Some file system backup tools emit warnings or errors
@@ -1174,7 +1174,7 @@ SELECT * FROM pg_backup_stop(wait_for_archive => true);
    </sect3>
   </sect2>
 
-  <sect2 id="backup-pitr-recovery">
+  <sect2 id="backup-pitr-recovery" xreflabel="Recovering Using a Continuous Archive Backup">
    <title>Recovering Using a Continuous Archive Backup</title>
 
    <para>
@@ -1379,7 +1379,7 @@ restore_command = 'cp "/mnt/server/archivedir/%f" "%p"'
 
   </sect2>
 
-  <sect2 id="backup-timelines">
+  <sect2 id="backup-timelines" xreflabel="Timelines">
    <title>Timelines</title>
 
   <indexterm zone="backup">
@@ -1457,14 +1457,14 @@ restore_command = 'cp "/mnt/server/archivedir/%f" "%p"'
    </para>
   </sect2>
 
-  <sect2 id="backup-tips">
+  <sect2 id="backup-tips" xreflabel="Tips and Examples">
    <title>Tips and Examples</title>
 
    <para>
     Some tips for configuring continuous archiving are given here.
    </para>
 
-    <sect3 id="backup-standalone">
+    <sect3 id="backup-standalone" xreflabel="Standalone Hot Backups">
      <title>Standalone Hot Backups</title>
 
      <para>
@@ -1486,7 +1486,7 @@ restore_command = 'cp "/mnt/server/archivedir/%f" "%p"'
      </para>
     </sect3>
 
-    <sect3 id="compressed-archive-logs">
+    <sect3 id="compressed-archive-logs" xreflabel="Compressed Archive Logs">
      <title>Compressed Archive Logs</title>
 
      <para>
@@ -1502,7 +1502,7 @@ restore_command = 'gunzip &lt; "/mnt/server/archivedir/%f.gz" &gt; "%p"'
      </para>
     </sect3>
 
-    <sect3 id="backup-scripts">
+    <sect3 id="backup-scripts" xreflabel="archive_command Scripts">
      <title><varname>archive_command</varname> Scripts</title>
 
      <para>
@@ -1558,7 +1558,7 @@ archive_command = 'local_backup_script.sh "%p" "%f"'
     </sect3>
   </sect2>
 
-  <sect2 id="continuous-archiving-caveats">
+  <sect2 id="continuous-archiving-caveats" xreflabel="Caveats">
    <title>Caveats</title>
 
    <para>
diff --git a/doc/src/sgml/basebackup-to-shell.sgml b/doc/src/sgml/basebackup-to-shell.sgml
index b6a3b395414..d8ed6d37b88 100644
--- a/doc/src/sgml/basebackup-to-shell.sgml
+++ b/doc/src/sgml/basebackup-to-shell.sgml
@@ -27,7 +27,7 @@
   <xref linkend="guc-local-preload-libraries"/>.
  </para>
 
- <sect2 id="basebackup-to-shell-configuration-parameters">
+ <sect2 id="basebackup-to-shell-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
   <variablelist>
@@ -74,7 +74,7 @@
   </variablelist>
  </sect2>
 
- <sect2 id="basebackup-to-shell-author">
+ <sect2 id="basebackup-to-shell-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/basic-archive.sgml b/doc/src/sgml/basic-archive.sgml
index b4d43ced203..90798dc8890 100644
--- a/doc/src/sgml/basic-archive.sgml
+++ b/doc/src/sgml/basic-archive.sgml
@@ -21,7 +21,7 @@
   must be enabled.
  </para>
 
- <sect2 id="basic-archive-configuration-parameters">
+ <sect2 id="basic-archive-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
   <variablelist>
@@ -57,7 +57,7 @@ basic_archive.archive_directory = '/path/to/archive/directory'
 </programlisting>
  </sect2>
 
- <sect2 id="basic-archive-notes">
+ <sect2 id="basic-archive-notes" xreflabel="Notes">
   <title>Notes</title>
 
   <para>
@@ -70,7 +70,7 @@ basic_archive.archive_directory = '/path/to/archive/directory'
   </para>
  </sect2>
 
- <sect2 id="basic-archive-author">
+ <sect2 id="basic-archive-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/bki.sgml b/doc/src/sgml/bki.sgml
index 53a982bf60d..be8f1e22402 100644
--- a/doc/src/sgml/bki.sgml
+++ b/doc/src/sgml/bki.sgml
@@ -69,7 +69,7 @@
   the <acronym>BKI</acronym> file format.
  </para>
 
- <sect1 id="system-catalog-declarations">
+ <sect1 id="system-catalog-declarations" xreflabel="System Catalog Declaration Rules">
   <title>System Catalog Declaration Rules</title>
 
   <para>
@@ -155,7 +155,7 @@
   </para>
  </sect1>
 
- <sect1 id="system-catalog-initial-data">
+ <sect1 id="system-catalog-initial-data" xreflabel="System Catalog Initial Data">
   <title>System Catalog Initial Data</title>
 
   <para>
@@ -164,7 +164,7 @@
    initial data in an editable format.
   </para>
 
-  <sect2 id="system-catalog-initial-data-format">
+  <sect2 id="system-catalog-initial-data-format" xreflabel="Data File Format">
    <title>Data File Format</title>
 
    <para>
@@ -336,7 +336,7 @@
    </itemizedlist>
   </sect2>
 
-  <sect2 id="system-catalog-oid-assignment">
+  <sect2 id="system-catalog-oid-assignment" xreflabel="OID Assignment">
    <title>OID Assignment</title>
 
    <para>
@@ -450,7 +450,7 @@
    </para>
   </sect2>
 
-  <sect2 id="system-catalog-oid-references">
+  <sect2 id="system-catalog-oid-references" xreflabel="OID Reference Lookup">
    <title>OID Reference Lookup</title>
 
    <para>
@@ -582,7 +582,7 @@
    </para>
   </sect2>
 
-  <sect2 id="system-catalog-auto-array-types">
+  <sect2 id="system-catalog-auto-array-types" xreflabel="Automatic Creation of Array Types">
    <title>Automatic Creation of Array Types</title>
 
    <para>
@@ -617,7 +617,7 @@
    </para>
   </sect2>
 
-  <sect2 id="system-catalog-recipes">
+  <sect2 id="system-catalog-recipes" xreflabel="Recipes for Editing Data Files">
    <title>Recipes for Editing Data Files</title>
 
    <para>
@@ -756,7 +756,7 @@ $ perl  rewrite_dat_with_prokind.pl  pg_proc.dat
   </sect2>
  </sect1>
 
- <sect1 id="bki-format">
+ <sect1 id="bki-format" xreflabel="BKI File Format">
   <title><acronym>BKI</acronym> File Format</title>
 
   <para>
@@ -784,7 +784,7 @@ $ perl  rewrite_dat_with_prokind.pl  pg_proc.dat
 
  </sect1>
 
- <sect1 id="bki-commands">
+ <sect1 id="bki-commands" xreflabel="BKI Commands">
   <title><acronym>BKI</acronym> Commands</title>
 
   <variablelist>
@@ -972,7 +972,7 @@ $ perl  rewrite_dat_with_prokind.pl  pg_proc.dat
 
  </sect1>
 
- <sect1 id="bki-structure">
+ <sect1 id="bki-structure" xreflabel="Structure of the Bootstrap BKI File">
   <title>Structure of the Bootstrap <acronym>BKI</acronym> File</title>
 
   <para>
@@ -1058,7 +1058,7 @@ $ perl  rewrite_dat_with_prokind.pl  pg_proc.dat
   </para>
  </sect1>
 
- <sect1 id="bki-example">
+ <sect1 id="bki-example" xreflabel="BKI Example">
   <title>BKI Example</title>
 
   <para>
diff --git a/doc/src/sgml/bloom.sgml b/doc/src/sgml/bloom.sgml
index 3f6d38f377b..080dda61146 100644
--- a/doc/src/sgml/bloom.sgml
+++ b/doc/src/sgml/bloom.sgml
@@ -38,7 +38,7 @@
   indexes can also perform inequality and range searches.
  </para>
 
- <sect2 id="bloom-parameters">
+ <sect2 id="bloom-parameters" xreflabel="Parameters">
   <title>Parameters</title>
 
   <para>
@@ -73,7 +73,7 @@
    </variablelist>
  </sect2>
 
- <sect2 id="bloom-examples">
+ <sect2 id="bloom-examples" xreflabel="Examples">
   <title>Examples</title>
 
   <para>
@@ -226,7 +226,7 @@ CREATE INDEX
   </para>
  </sect2>
 
- <sect2 id="bloom-operator-class-interface">
+ <sect2 id="bloom-operator-class-interface" xreflabel="Operator Class Interface">
   <title>Operator Class Interface</title>
 
   <para>
@@ -243,7 +243,7 @@ DEFAULT FOR TYPE text USING bloom AS
 </programlisting>
  </sect2>
 
- <sect2 id="bloom-limitations">
+ <sect2 id="bloom-limitations" xreflabel="Limitations">
   <title>Limitations</title>
   <para>
    <itemizedlist>
@@ -279,7 +279,7 @@ DEFAULT FOR TYPE text USING bloom AS
   </para>
  </sect2>
 
- <sect2 id="bloom-authors">
+ <sect2 id="bloom-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/brin.sgml b/doc/src/sgml/brin.sgml
index 64fb520db7e..2c40ba87a61 100644
--- a/doc/src/sgml/brin.sgml
+++ b/doc/src/sgml/brin.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/brin.sgml -->
 
-<sect1 id="brin">
+<sect1 id="brin" xreflabel="BRIN Indexes">
 <title>BRIN Indexes</title>
 
    <indexterm>
@@ -8,7 +8,7 @@
     <secondary>BRIN</secondary>
    </indexterm>
 
-<sect2 id="brin-intro">
+<sect2 id="brin-intro" xreflabel="Introduction">
  <title>Introduction</title>
 
  <para>
@@ -64,7 +64,7 @@
   be more precise and more data blocks can be skipped during an index scan.
  </para>
 
- <sect3 id="brin-operation">
+ <sect3 id="brin-operation" xreflabel="Index Maintenance">
   <title>Index Maintenance</title>
 
   <para>
@@ -139,7 +139,7 @@ LOG:  request for BRIN range summarization for index "brin_wi_idx" page 128 was
  </sect3>
 </sect2>
 
-<sect2 id="brin-builtin-opclasses">
+<sect2 id="brin-builtin-opclasses" xreflabel="Built-in Operator Classes">
  <title>Built-in Operator Classes</title>
 
  <para>
@@ -743,7 +743,7 @@ LOG:  request for BRIN range summarization for index "brin_wi_idx" page 128 was
   </tgroup>
  </table>
 
-  <sect3 id="brin-builtin-opclasses--parameters">
+  <sect3 id="brin-builtin-opclasses--parameters" xreflabel="Operator Class Parameters">
    <title>Operator Class Parameters</title>
 
    <para>
@@ -812,7 +812,7 @@ LOG:  request for BRIN range summarization for index "brin_wi_idx" page 128 was
 
 </sect2>
 
-<sect2 id="brin-extensibility">
+<sect2 id="brin-extensibility" xreflabel="Extensibility">
  <title>Extensibility</title>
 
  <para>
diff --git a/doc/src/sgml/btree-gin.sgml b/doc/src/sgml/btree-gin.sgml
index 46117209ce5..cc8129cf334 100644
--- a/doc/src/sgml/btree-gin.sgml
+++ b/doc/src/sgml/btree-gin.sgml
@@ -38,7 +38,7 @@
   on the current database.
  </para>
 
- <sect2 id="btree-gin-example-usage">
+ <sect2 id="btree-gin-example-usage" xreflabel="Example Usage">
   <title>Example Usage</title>
 
 <programlisting>
@@ -51,7 +51,7 @@ SELECT * FROM test WHERE a &lt; 10;
 
  </sect2>
 
- <sect2 id="btree-gin-authors">
+ <sect2 id="btree-gin-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/btree-gist.sgml b/doc/src/sgml/btree-gist.sgml
index a4c1b99be1f..2d7aaa25896 100644
--- a/doc/src/sgml/btree-gist.sgml
+++ b/doc/src/sgml/btree-gist.sgml
@@ -65,7 +65,7 @@
   on the current database.
  </para>
 
- <sect2 id="btree-gist-example-usage">
+ <sect2 id="btree-gist-example-usage" xreflabel="Example Usage">
   <title>Example Usage</title>
 
   <para>
@@ -108,7 +108,7 @@ INSERT 0 1
 
  </sect2>
 
- <sect2 id="btree-gist-authors">
+ <sect2 id="btree-gist-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/btree.sgml b/doc/src/sgml/btree.sgml
index 027361f20bb..2ed72d6a605 100644
--- a/doc/src/sgml/btree.sgml
+++ b/doc/src/sgml/btree.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/btree.sgml -->
 
-<sect1 id="btree">
+<sect1 id="btree" xreflabel="B-Tree Indexes">
 <title>B-Tree Indexes</title>
 
    <indexterm>
@@ -8,7 +8,7 @@
     <secondary>B-Tree</secondary>
    </indexterm>
 
-<sect2 id="btree-intro">
+<sect2 id="btree-intro" xreflabel="Introduction">
  <title>Introduction</title>
 
  <para>
@@ -32,7 +32,7 @@
 
 </sect2>
 
-<sect2 id="btree-behavior">
+<sect2 id="btree-behavior" xreflabel="Behavior of B-Tree Operator Classes">
  <title>Behavior of B-Tree Operator Classes</title>
 
  <para>
@@ -202,7 +202,7 @@
 
 </sect2>
 
-<sect2 id="btree-support-funcs">
+<sect2 id="btree-support-funcs" xreflabel="B-Tree Support Functions">
  <title>B-Tree Support Functions</title>
 
  <para>
@@ -616,7 +616,7 @@ options(<replaceable>relopts</replaceable> <type>local_relopts *</type>) returns
 
 </sect2>
 
-<sect2 id="btree-implementation">
+<sect2 id="btree-implementation" xreflabel="Implementation">
  <title>Implementation</title>
 
  <para>
@@ -626,7 +626,7 @@ options(<replaceable>relopts</replaceable> <type>local_relopts *</type>) returns
   distribution for a much more detailed, internals-focused description
   of the B-Tree implementation.
  </para>
- <sect3 id="btree-structure">
+ <sect3 id="btree-structure" xreflabel="B-Tree Structure">
   <title>B-Tree Structure</title>
   <para>
    <productname>PostgreSQL</productname> B-Tree indexes are
@@ -658,7 +658,7 @@ options(<replaceable>relopts</replaceable> <type>local_relopts *</type>) returns
   </para>
  </sect3>
 
- <sect3 id="btree-deletion">
+ <sect3 id="btree-deletion" xreflabel="Bottom-up Index Deletion">
   <title>Bottom-up Index Deletion</title>
   <para>
    B-Tree indexes are not directly aware that under MVCC, there might
@@ -762,7 +762,7 @@ options(<replaceable>relopts</replaceable> <type>local_relopts *</type>) returns
   </para>
  </sect3>
 
- <sect3 id="btree-deduplication">
+ <sect3 id="btree-deduplication" xreflabel="Deduplication">
   <title>Deduplication</title>
   <para>
    A duplicate is a leaf page tuple (a tuple that points to a table
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 2fc63442980..2648d462aef 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -23,7 +23,7 @@
    of the system catalogs is ever decreasing.
   </para>
 
- <sect1 id="catalogs-overview">
+ <sect1 id="catalogs-overview" xreflabel="Overview">
   <title>Overview</title>
 
   <para>
@@ -375,7 +375,7 @@
  </sect1>
 
 
- <sect1 id="catalog-pg-aggregate">
+ <sect1 id="catalog-pg-aggregate" xreflabel="pg_aggregate">
   <title><structname>pg_aggregate</structname></title>
 
   <indexterm zone="catalog-pg-aggregate">
@@ -662,7 +662,7 @@
  </sect1>
 
 
- <sect1 id="catalog-pg-am">
+ <sect1 id="catalog-pg-am" xreflabel="pg_am">
   <title><structname>pg_am</structname></title>
 
   <indexterm zone="catalog-pg-am">
@@ -749,7 +749,7 @@
  </sect1>
 
 
- <sect1 id="catalog-pg-amop">
+ <sect1 id="catalog-pg-amop" xreflabel="pg_amop">
   <title><structname>pg_amop</structname></title>
 
   <indexterm zone="catalog-pg-amop">
@@ -922,7 +922,7 @@
  </sect1>
 
 
- <sect1 id="catalog-pg-amproc">
+ <sect1 id="catalog-pg-amproc" xreflabel="pg_amproc">
   <title><structname>pg_amproc</structname></title>
 
   <indexterm zone="catalog-pg-amproc">
@@ -1026,7 +1026,7 @@
  </sect1>
 
 
- <sect1 id="catalog-pg-attrdef">
+ <sect1 id="catalog-pg-attrdef" xreflabel="pg_attrdef">
   <title><structname>pg_attrdef</structname></title>
 
   <indexterm zone="catalog-pg-attrdef">
@@ -1102,7 +1102,7 @@
  </sect1>
 
 
- <sect1 id="catalog-pg-attribute">
+ <sect1 id="catalog-pg-attribute" xreflabel="pg_attribute">
   <title><structname>pg_attribute</structname></title>
 
   <indexterm zone="catalog-pg-attribute">
@@ -1434,7 +1434,7 @@
  </sect1>
 
 
- <sect1 id="catalog-pg-authid">
+ <sect1 id="catalog-pg-authid" xreflabel="pg_authid">
   <title><structname>pg_authid</structname></title>
 
   <indexterm zone="catalog-pg-authid">
@@ -1633,7 +1633,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-auth-members">
+ <sect1 id="catalog-pg-auth-members" xreflabel="pg_auth_members">
   <title><structname>pg_auth_members</structname></title>
 
   <indexterm zone="catalog-pg-auth-members">
@@ -1744,7 +1744,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-cast">
+ <sect1 id="catalog-pg-cast" xreflabel="pg_cast">
   <title><structname>pg_cast</structname></title>
 
   <indexterm zone="catalog-pg-cast">
@@ -1883,7 +1883,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </para>
  </sect1>
 
- <sect1 id="catalog-pg-class">
+ <sect1 id="catalog-pg-class" xreflabel="pg_class">
   <title><structname>pg_class</structname></title>
 
   <indexterm zone="catalog-pg-class">
@@ -2332,7 +2332,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </para>
  </sect1>
 
- <sect1 id="catalog-pg-collation">
+ <sect1 id="catalog-pg-collation" xreflabel="pg_collation">
   <title><structname>pg_collation</structname></title>
 
   <indexterm zone="catalog-pg-collation">
@@ -2513,7 +2513,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </para>
  </sect1>
 
- <sect1 id="catalog-pg-constraint">
+ <sect1 id="catalog-pg-constraint" xreflabel="pg_constraint">
   <title><structname>pg_constraint</structname></title>
 
   <indexterm zone="catalog-pg-constraint">
@@ -2873,7 +2873,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-conversion">
+ <sect1 id="catalog-pg-conversion" xreflabel="pg_conversion">
   <title><structname>pg_conversion</structname></title>
 
   <indexterm zone="catalog-pg-conversion">
@@ -2983,7 +2983,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-database">
+ <sect1 id="catalog-pg-database" xreflabel="pg_database">
   <title><structname>pg_database</structname></title>
 
   <indexterm zone="catalog-pg-database">
@@ -3221,7 +3221,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-db-role-setting">
+ <sect1 id="catalog-pg-db-role-setting" xreflabel="pg_db_role_setting">
   <title><structname>pg_db_role_setting</structname></title>
 
   <indexterm zone="catalog-pg-db-role-setting">
@@ -3290,7 +3290,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-default-acl">
+ <sect1 id="catalog-pg-default-acl" xreflabel="pg_default_acl">
   <title><structname>pg_default_acl</structname></title>
 
   <indexterm zone="catalog-pg-default-acl">
@@ -3396,7 +3396,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-depend">
+ <sect1 id="catalog-pg-depend" xreflabel="pg_depend">
   <title><structname>pg_depend</structname></title>
 
   <indexterm zone="catalog-pg-depend">
@@ -3673,7 +3673,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-description">
+ <sect1 id="catalog-pg-description" xreflabel="pg_description">
   <title><structname>pg_description</structname></title>
 
   <indexterm zone="catalog-pg-description">
@@ -3757,7 +3757,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-enum">
+ <sect1 id="catalog-pg-enum" xreflabel="pg_enum">
   <title><structname>pg_enum</structname></title>
 
   <indexterm zone="catalog-pg-enum">
@@ -3848,7 +3848,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-event-trigger">
+ <sect1 id="catalog-pg-event-trigger" xreflabel="pg_event_trigger">
   <title><structname>pg_event_trigger</structname></title>
 
   <indexterm zone="catalog-pg-event-trigger">
@@ -3951,7 +3951,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-extension">
+ <sect1 id="catalog-pg-extension" xreflabel="pg_extension">
   <title><structname>pg_extension</structname></title>
 
   <indexterm zone="catalog-pg-extension">
@@ -4072,7 +4072,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-foreign-data-wrapper">
+ <sect1 id="catalog-pg-foreign-data-wrapper" xreflabel="pg_foreign_data_wrapper">
   <title><structname>pg_foreign_data_wrapper</structname></title>
 
   <indexterm zone="catalog-pg-foreign-data-wrapper">
@@ -4178,7 +4178,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-foreign-server">
+ <sect1 id="catalog-pg-foreign-server" xreflabel="pg_foreign_server">
   <title><structname>pg_foreign_server</structname></title>
 
   <indexterm zone="catalog-pg-foreign-server">
@@ -4286,7 +4286,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-foreign-table">
+ <sect1 id="catalog-pg-foreign-table" xreflabel="pg_foreign_table">
   <title><structname>pg_foreign_table</structname></title>
 
   <indexterm zone="catalog-pg-foreign-table">
@@ -4352,7 +4352,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-index">
+ <sect1 id="catalog-pg-index" xreflabel="pg_index">
   <title><structname>pg_index</structname></title>
 
   <indexterm zone="catalog-pg-index">
@@ -4622,7 +4622,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-inherits">
+ <sect1 id="catalog-pg-inherits" xreflabel="pg_inherits">
   <title><structname>pg_inherits</structname></title>
 
   <indexterm zone="catalog-pg-inherits">
@@ -4701,7 +4701,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-init-privs">
+ <sect1 id="catalog-pg-init-privs" xreflabel="pg_init_privs">
   <title><structname>pg_init_privs</structname></title>
 
   <indexterm zone="catalog-pg-init-privs">
@@ -4809,7 +4809,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-language">
+ <sect1 id="catalog-pg-language" xreflabel="pg_language">
   <title><structname>pg_language</structname></title>
 
   <indexterm zone="catalog-pg-language">
@@ -4944,7 +4944,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-largeobject">
+ <sect1 id="catalog-pg-largeobject" xreflabel="pg_largeobject">
   <title><structname>pg_largeobject</structname></title>
 
   <indexterm zone="catalog-pg-largeobject">
@@ -5030,7 +5030,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-largeobject-metadata">
+ <sect1 id="catalog-pg-largeobject-metadata" xreflabel="pg_largeobject_metadata">
   <title><structname>pg_largeobject_metadata</structname></title>
 
   <indexterm zone="catalog-pg-largeobject-metadata">
@@ -5092,7 +5092,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-namespace">
+ <sect1 id="catalog-pg-namespace" xreflabel="pg_namespace">
   <title><structname>pg_namespace</structname></title>
 
   <indexterm zone="catalog-pg-namespace">
@@ -5164,7 +5164,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-opclass">
+ <sect1 id="catalog-pg-opclass" xreflabel="pg_opclass">
   <title><structname>pg_opclass</structname></title>
 
   <indexterm zone="catalog-pg-opclass">
@@ -5302,7 +5302,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-operator">
+ <sect1 id="catalog-pg-operator" xreflabel="pg_operator">
   <title><structname>pg_operator</structname></title>
 
   <indexterm zone="catalog-pg-operator">
@@ -5486,7 +5486,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-opfamily">
+ <sect1 id="catalog-pg-opfamily" xreflabel="pg_opfamily">
   <title><structname>pg_opfamily</structname></title>
 
   <indexterm zone="catalog-pg-opfamily">
@@ -5586,7 +5586,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-parameter-acl">
+ <sect1 id="catalog-pg-parameter-acl" xreflabel="pg_parameter_acl">
   <title><structname>pg_parameter_acl</structname></title>
 
   <indexterm zone="catalog-pg-parameter-acl">
@@ -5654,7 +5654,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-partitioned-table">
+ <sect1 id="catalog-pg-partitioned-table" xreflabel="pg_partitioned_table">
   <title><structname>pg_partitioned_table</structname></title>
 
   <indexterm zone="catalog-pg-partitioned-table">
@@ -5779,7 +5779,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-policy">
+ <sect1 id="catalog-pg-policy" xreflabel="pg_policy">
   <title><structname>pg_policy</structname></title>
 
   <indexterm zone="catalog-pg-policy">
@@ -5905,7 +5905,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-proc">
+ <sect1 id="catalog-pg-proc" xreflabel="pg_proc">
   <title><structname>pg_proc</structname></title>
 
   <indexterm zone="catalog-pg-proc">
@@ -6308,7 +6308,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-publication">
+ <sect1 id="catalog-pg-publication" xreflabel="pg_publication">
   <title><structname>pg_publication</structname></title>
 
   <indexterm zone="catalog-pg-publication">
@@ -6453,7 +6453,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-publication-namespace">
+ <sect1 id="catalog-pg-publication-namespace" xreflabel="pg_publication_namespace">
   <title><structname>pg_publication_namespace</structname></title>
 
   <indexterm zone="catalog-pg-publication-namespace">
@@ -6514,7 +6514,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-publication-rel">
+ <sect1 id="catalog-pg-publication-rel" xreflabel="pg_publication_rel">
   <title><structname>pg_publication_rel</structname></title>
 
   <indexterm zone="catalog-pg-publication-rel">
@@ -6598,7 +6598,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-range">
+ <sect1 id="catalog-pg-range" xreflabel="pg_range">
   <title><structname>pg_range</structname></title>
 
   <indexterm zone="catalog-pg-range">
@@ -6711,7 +6711,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-replication-origin">
+ <sect1 id="catalog-pg-replication-origin" xreflabel="pg_replication_origin">
   <title><structname>pg_replication_origin</structname></title>
 
   <indexterm zone="catalog-pg-replication-origin">
@@ -6770,7 +6770,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-rewrite">
+ <sect1 id="catalog-pg-rewrite" xreflabel="pg_rewrite">
   <title><structname>pg_rewrite</structname></title>
 
   <indexterm zone="catalog-pg-rewrite">
@@ -6892,7 +6892,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-seclabel">
+ <sect1 id="catalog-pg-seclabel" xreflabel="pg_seclabel">
   <title><structname>pg_seclabel</structname></title>
 
   <indexterm zone="catalog-pg-seclabel">
@@ -6981,7 +6981,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-sequence">
+ <sect1 id="catalog-pg-sequence" xreflabel="pg_sequence">
   <title><structname>pg_sequence</structname></title>
 
   <indexterm zone="catalog-pg-sequence">
@@ -7088,7 +7088,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-shdepend">
+ <sect1 id="catalog-pg-shdepend" xreflabel="pg_shdepend">
   <title><structname>pg_shdepend</structname></title>
 
   <indexterm zone="catalog-pg-shdepend">
@@ -7283,7 +7283,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-shdescription">
+ <sect1 id="catalog-pg-shdescription" xreflabel="pg_shdescription">
   <title><structname>pg_shdescription</structname></title>
 
   <indexterm zone="catalog-pg-shdescription">
@@ -7359,7 +7359,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-shseclabel">
+ <sect1 id="catalog-pg-shseclabel" xreflabel="pg_shseclabel">
   <title><structname>pg_shseclabel</structname></title>
 
   <indexterm zone="catalog-pg-shseclabel">
@@ -7443,7 +7443,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-statistic">
+ <sect1 id="catalog-pg-statistic" xreflabel="pg_statistic">
   <title><structname>pg_statistic</structname></title>
 
   <indexterm zone="catalog-pg-statistic">
@@ -7651,7 +7651,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-statistic-ext">
+ <sect1 id="catalog-pg-statistic-ext" xreflabel="pg_statistic_ext">
   <title><structname>pg_statistic_ext</structname></title>
 
   <indexterm zone="catalog-pg-statistic-ext">
@@ -7799,7 +7799,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </para>
  </sect1>
 
- <sect1 id="catalog-pg-statistic-ext-data">
+ <sect1 id="catalog-pg-statistic-ext-data" xreflabel="pg_statistic_ext_data">
   <title><structname>pg_statistic_ext_data</structname></title>
 
   <indexterm zone="catalog-pg-statistic-ext">
@@ -7919,7 +7919,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
 
  </sect1>
 
- <sect1 id="catalog-pg-subscription">
+ <sect1 id="catalog-pg-subscription" xreflabel="pg_subscription">
   <title><structname>pg_subscription</structname></title>
 
   <indexterm zone="catalog-pg-subscription">
@@ -8191,7 +8191,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-subscription-rel">
+ <sect1 id="catalog-pg-subscription-rel" xreflabel="pg_subscription_rel">
   <title><structname>pg_subscription_rel</structname></title>
 
   <indexterm zone="catalog-pg-subscription-rel">
@@ -8286,7 +8286,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
   </table>
  </sect1>
 
- <sect1 id="catalog-pg-tablespace">
+ <sect1 id="catalog-pg-tablespace" xreflabel="pg_tablespace">
   <title><structname>pg_tablespace</structname></title>
 
   <indexterm zone="catalog-pg-tablespace">
@@ -8372,7 +8372,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-transform">
+ <sect1 id="catalog-pg-transform" xreflabel="pg_transform">
   <title><structname>pg_transform</structname></title>
 
   <indexterm zone="catalog-pg-transform">
@@ -8458,7 +8458,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-trigger">
+ <sect1 id="catalog-pg-trigger" xreflabel="pg_trigger">
   <title><structname>pg_trigger</structname></title>
 
   <indexterm zone="catalog-pg-trigger">
@@ -8715,7 +8715,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-ts-config">
+ <sect1 id="catalog-pg-ts-config" xreflabel="pg_ts_config">
   <title><structname>pg_ts_config</structname></title>
 
   <indexterm zone="catalog-pg-ts-config">
@@ -8805,7 +8805,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-ts-config-map">
+ <sect1 id="catalog-pg-ts-config-map" xreflabel="pg_ts_config_map">
   <title><structname>pg_ts_config_map</structname></title>
 
   <indexterm zone="catalog-pg-ts-config-map">
@@ -8883,7 +8883,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-ts-dict">
+ <sect1 id="catalog-pg-ts-dict" xreflabel="pg_ts_dict">
   <title><structname>pg_ts_dict</structname></title>
 
   <indexterm zone="catalog-pg-ts-dict">
@@ -8983,7 +8983,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-ts-parser">
+ <sect1 id="catalog-pg-ts-parser" xreflabel="pg_ts_parser">
   <title><structname>pg_ts_parser</structname></title>
 
   <indexterm zone="catalog-pg-ts-parser">
@@ -9101,7 +9101,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-ts-template">
+ <sect1 id="catalog-pg-ts-template" xreflabel="pg_ts_template">
   <title><structname>pg_ts_template</structname></title>
 
   <indexterm zone="catalog-pg-ts-template">
@@ -9189,7 +9189,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-type">
+ <sect1 id="catalog-pg-type" xreflabel="pg_type">
   <title><structname>pg_type</structname></title>
 
   <indexterm zone="catalog-pg-type">
@@ -9762,7 +9762,7 @@ SCRAM-SHA-256$<replaceable>&lt;iteration count&gt;</replaceable>:<replaceable>&l
  </sect1>
 
 
- <sect1 id="catalog-pg-user-mapping">
+ <sect1 id="catalog-pg-user-mapping" xreflabel="pg_user_mapping">
   <title><structname>pg_user_mapping</structname></title>
 
   <indexterm zone="catalog-pg-user-mapping">
diff --git a/doc/src/sgml/charset.sgml b/doc/src/sgml/charset.sgml
index 3aabc798012..fa41e4361f0 100644
--- a/doc/src/sgml/charset.sgml
+++ b/doc/src/sgml/charset.sgml
@@ -32,7 +32,7 @@
   </para>
 
 
- <sect1 id="locale">
+ <sect1 id="locale" xreflabel="Locale Support">
   <title>Locale Support</title>
 
   <indexterm zone="locale"><primary>locale</primary></indexterm>
@@ -46,7 +46,7 @@
    system.
   </para>
 
-  <sect2 id="locale-overview">
+  <sect2 id="locale-overview" xreflabel="Overview">
    <title>Overview</title>
 
    <para>
@@ -206,7 +206,7 @@ initdb --locale=sv_SE
    </para>
   </sect2>
 
-  <sect2 id="locale-behavior">
+  <sect2 id="locale-behavior" xreflabel="Behavior">
    <title>Behavior</title>
 
    <para>
@@ -276,7 +276,7 @@ initdb --locale=sv_SE
    </para>
   </sect2>
 
-  <sect2 id="locale-selecting-locales">
+  <sect2 id="locale-selecting-locales" xreflabel="Selecting Locales">
    <title>Selecting Locales</title>
 
    <para>
@@ -338,7 +338,7 @@ initdb --locale=sv_SE
    </orderedlist>
   </sect2>
 
-  <sect2 id="locale-providers">
+  <sect2 id="locale-providers" xreflabel="Locale Providers">
    <title>Locale Providers</title>
 
    <para>
@@ -450,10 +450,10 @@ initdb --locale-provider=icu --icu-locale=en
    </variablelist>
   </sect2>
 
-  <sect2 id="icu-locales">
+  <sect2 id="icu-locales" xreflabel="ICU Locales">
    <title>ICU Locales</title>
 
-   <sect3 id="icu-locale-names">
+   <sect3 id="icu-locale-names" xreflabel="ICU Locale Names">
     <title>ICU Locale Names</title>
 
     <para>
@@ -467,7 +467,7 @@ CREATE COLLATION mycollation2 (provider = icu, locale = 'fr');
     </para>
    </sect3>
 
-   <sect3 id="icu-canonicalization">
+   <sect3 id="icu-canonicalization" xreflabel="Locale Canonicalization and Validation">
     <title>Locale Canonicalization and Validation</title>
     <para>
      When defining a new ICU collation object or database with ICU as the
@@ -518,7 +518,7 @@ CREATE COLLATION
     </para>
    </sect3>
 
-   <sect3 id="icu-language-tag">
+   <sect3 id="icu-language-tag" xreflabel="Language Tag">
     <title>Language Tag</title>
 
     <para>
@@ -592,7 +592,7 @@ SELECT 'N-45' &lt; 'N-123' COLLATE mycollation5 AS result;
    </sect3>
   </sect2>
 
-  <sect2 id="locale-problems">
+  <sect2 id="locale-problems" xreflabel="Problems">
    <title>Problems</title>
 
    <para>
@@ -641,7 +641,7 @@ SELECT 'N-45' &lt; 'N-123' COLLATE mycollation5 AS result;
  </sect1>
 
 
- <sect1 id="collation">
+ <sect1 id="collation" xreflabel="Collation Support">
   <title>Collation Support</title>
 
   <indexterm zone="collation"><primary>collation</primary></indexterm>
@@ -654,7 +654,7 @@ SELECT 'N-45' &lt; 'N-123' COLLATE mycollation5 AS result;
    of a database cannot be changed after its creation.
   </para>
 
-  <sect2 id="collation-concepts">
+  <sect2 id="collation-concepts" xreflabel="Concepts">
    <title>Concepts</title>
 
    <para>
@@ -815,7 +815,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
    </para>
   </sect2>
 
-  <sect2 id="collation-managing">
+  <sect2 id="collation-managing" xreflabel="Managing Collations">
    <title>Managing Collations</title>
 
    <para>
@@ -856,7 +856,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
     a database.
    </para>
 
-   <sect3 id="collation-managing-standard">
+   <sect3 id="collation-managing-standard" xreflabel="Standard Collations">
     <title>Standard Collations</title>
 
    <para>
@@ -963,7 +963,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
    </para>
   </sect3>
 
-  <sect3 id="collation-managing-predefined">
+  <sect3 id="collation-managing-predefined" xreflabel="Predefined Collations">
    <title>Predefined Collations</title>
 
    <para>
@@ -982,7 +982,7 @@ SELECT * FROM test1 ORDER BY a || b COLLATE "fr_FR";
     in <application>psql</application>.
    </para>
 
-  <sect4 id="collation-managing-predefined-libc">
+  <sect4 id="collation-managing-predefined-libc" xreflabel="libc Collations">
    <title>libc Collations</title>
 
    <para>
@@ -1039,7 +1039,7 @@ SELECT a COLLATE "C" &lt; b COLLATE "POSIX" FROM test1;
    </para>
   </sect4>
 
-  <sect4 id="collation-managing-predefined-icu">
+  <sect4 id="collation-managing-predefined-icu" xreflabel="ICU Collations">
    <title>ICU Collations</title>
 
    <para>
@@ -1099,7 +1099,7 @@ SELECT a COLLATE "C" &lt; b COLLATE "POSIX" FROM test1;
   </sect4>
   </sect3>
 
-  <sect3 id="collation-create">
+  <sect3 id="collation-create" xreflabel="Creating New Collation Objects">
    <title>Creating New Collation Objects</title>
 
    <para>
@@ -1115,7 +1115,7 @@ SELECT a COLLATE "C" &lt; b COLLATE "POSIX" FROM test1;
     ensures that they are saved by <command>pg_dump</command>.
    </para>
 
-   <sect4 id="collation-managing-create-libc">
+   <sect4 id="collation-managing-create-libc" xreflabel="libc Collations">
     <title>libc Collations</title>
 
     <para>
@@ -1139,7 +1139,7 @@ CREATE COLLATION german (provider = libc, locale = 'de_DE');
     </para>
    </sect4>
 
-   <sect4 id="collation-managing-create-icu">
+   <sect4 id="collation-managing-create-icu" xreflabel="ICU Collations">
     <title>ICU Collations</title>
 
     <para>
@@ -1160,7 +1160,7 @@ CREATE COLLATION german (provider = icu, locale = 'de-DE');
      linkend="icu-custom-collations"/> for details and examples.
     </para>
    </sect4>
-   <sect4 id="collation-copy">
+   <sect4 id="collation-copy" xreflabel="Copying Collations">
    <title>Copying Collations</title>
 
    <para>
@@ -1177,7 +1177,7 @@ CREATE COLLATION french FROM "fr-x-icu";
    </sect4>
    </sect3>
 
-   <sect3 id="collation-nondeterministic">
+   <sect3 id="collation-nondeterministic" xreflabel="Nondeterministic Collations">
     <title>Nondeterministic Collations</title>
 
     <para>
@@ -1238,7 +1238,7 @@ CREATE COLLATION ignore_accents (provider = icu, locale = 'und-u-ks-level1-kc-tr
    </sect3>
   </sect2>
 
-  <sect2 id="icu-custom-collations">
+  <sect2 id="icu-custom-collations" xreflabel="ICU Custom Collations">
    <title>ICU Custom Collations</title>
 
    <para>
@@ -1268,7 +1268,7 @@ SELECT 'w;x*y-z' = 'wxyz' COLLATE num_ignore_punct; -- true
     linkend="icu-external-references"/> for more details.
    </para>
 
-   <sect3 id="icu-collation-comparison-levels">
+   <sect3 id="icu-collation-comparison-levels" xreflabel="ICU Comparison Levels">
     <title>ICU Comparison Levels</title>
 
     <para>
@@ -1380,7 +1380,7 @@ SELECT 'w;x*y-z' = 'wxyz' COLLATE num_ignore_punct; -- true
      <literal>true</literal>.
     </para>
 
-    <sect4 id="icu-collation-level-examples">
+    <sect4 id="icu-collation-level-examples" xreflabel="Collation Level Examples">
      <title>Collation Level Examples</title>
 
 <programlisting>
@@ -1400,7 +1400,7 @@ SELECT 'x-y' = 'x_y' COLLATE level4; -- false
     </sect4>
    </sect3>
 
-   <sect3 id="icu-collation-settings">
+   <sect3 id="icu-collation-settings" xreflabel="Collation Settings for an ICU Locale">
     <title>Collation Settings for an ICU Locale</title>
 
     <para>
@@ -1606,7 +1606,7 @@ SELECT 'x-y' = 'x_y' COLLATE level4; -- false
     </note>
    </sect3>
 
-   <sect3 id="icu-locale-examples">
+   <sect3 id="icu-locale-examples" xreflabel="Collation Settings Examples">
     <title>Collation Settings Examples</title>
 
      <variablelist>
@@ -1656,7 +1656,7 @@ SELECT 'x-y' = 'x_y' COLLATE level4; -- false
      </variablelist>
    </sect3>
 
-   <sect3 id="icu-tailoring-rules">
+   <sect3 id="icu-tailoring-rules" xreflabel="ICU Tailoring Rules">
     <title>ICU Tailoring Rules</title>
 
     <para>
@@ -1712,7 +1712,7 @@ ORDER BY c COLLATE ebcdic;
     </para>
    </sect3>
 
-   <sect3 id="icu-external-references">
+   <sect3 id="icu-external-references" xreflabel="External References for ICU">
     <title>External References for ICU</title>
 
     <para>
@@ -1752,7 +1752,7 @@ ORDER BY c COLLATE ebcdic;
   </sect2>
  </sect1>
 
- <sect1 id="multibyte">
+ <sect1 id="multibyte" xreflabel="Character Set Support">
   <title>Character Set Support</title>
 
   <indexterm zone="multibyte"><primary>character set</primary></indexterm>
@@ -1786,7 +1786,7 @@ ORDER BY c COLLATE ebcdic;
    with most but not all server-side encodings.
   </para>
 
-   <sect2 id="multibyte-charset-supported">
+   <sect2 id="multibyte-charset-supported" xreflabel="Supported Character Sets">
     <title>Supported Character Sets</title>
 
     <para>
@@ -2225,7 +2225,7 @@ ORDER BY c COLLATE ebcdic;
      </para>
     </sect2>
 
-   <sect2 id="multibyte-setting">
+   <sect2 id="multibyte-setting" xreflabel="Setting the Character Set">
     <title>Setting the Character Set</title>
 
     <para>
@@ -2313,7 +2313,7 @@ $ <userinput>psql -l</userinput>
     </important>
    </sect2>
 
-   <sect2 id="multibyte-automatic-conversion">
+   <sect2 id="multibyte-automatic-conversion" xreflabel="Automatic Character Set Conversion Between Server and Client">
     <title>Automatic Character Set Conversion Between Server and Client</title>
 
     <para>
@@ -2426,7 +2426,7 @@ RESET client_encoding;
     </para>
    </sect2>
 
-   <sect2 id="multibyte-conversions-supported">
+   <sect2 id="multibyte-conversions-supported" xreflabel="Available Character Set Conversions">
     <title>Available Character Set Conversions</title>
 
     <para>
@@ -3395,7 +3395,7 @@ RESET client_encoding;
     </table>
    </sect2>
 
-   <sect2 id="multibyte-further-reading">
+   <sect2 id="multibyte-further-reading" xreflabel="Further Reading">
     <title>Further Reading</title>
 
     <para>
diff --git a/doc/src/sgml/citext.sgml b/doc/src/sgml/citext.sgml
index 8322885661e..b9125c93cca 100644
--- a/doc/src/sgml/citext.sgml
+++ b/doc/src/sgml/citext.sgml
@@ -30,7 +30,7 @@
   on the current database.
  </para>
 
- <sect2 id="citext-rationale">
+ <sect2 id="citext-rationale" xreflabel="Rationale">
   <title>Rationale</title>
 
   <para>
@@ -84,7 +84,7 @@ SELECT * FROM tab WHERE lower(col) = LOWER(?);
 
  </sect2>
 
- <sect2 id="citext-how-to-use-it">
+ <sect2 id="citext-how-to-use-it" xreflabel="How to Use It">
   <title>How to Use It</title>
 
   <para>
@@ -111,7 +111,7 @@ SELECT * FROM users WHERE nick = 'Larry';
   </para>
  </sect2>
 
- <sect2 id="citext-string-comparison-behavior">
+ <sect2 id="citext-string-comparison-behavior" xreflabel="String Comparison Behavior">
   <title>String Comparison Behavior</title>
 
   <para>
@@ -196,7 +196,7 @@ SELECT * FROM users WHERE nick = 'Larry';
 
  </sect2>
 
- <sect2 id="citext-limitations">
+ <sect2 id="citext-limitations" xreflabel="Limitations">
   <title>Limitations</title>
 
    <itemizedlist>
@@ -277,7 +277,7 @@ SELECT * FROM users WHERE nick = 'Larry';
    </itemizedlist>
  </sect2>
 
- <sect2 id="citext-author">
+ <sect2 id="citext-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml
index a347ee18980..fe125d093d2 100644
--- a/doc/src/sgml/client-auth.sgml
+++ b/doc/src/sgml/client-auth.sgml
@@ -54,7 +54,7 @@
   database user names and OS user names.
  </para>
 
- <sect1 id="auth-pg-hba-conf">
+ <sect1 id="auth-pg-hba-conf" xreflabel="The pg_hba.conf File">
   <title>The <filename>pg_hba.conf</filename> File</title>
 
   <indexterm zone="auth-pg-hba-conf">
@@ -903,7 +903,7 @@ local   db1,db2,@demodbs  all                                   scram-sha-256
    </example>
  </sect1>
 
- <sect1 id="auth-username-maps">
+ <sect1 id="auth-username-maps" xreflabel="User Name Maps">
   <title>User Name Maps</title>
 
   <indexterm zone="auth-username-maps">
@@ -1070,7 +1070,7 @@ omicron         bryanh                  guest1
   </example>
  </sect1>
 
- <sect1 id="auth-methods">
+ <sect1 id="auth-methods" xreflabel="Authentication Methods">
   <title>Authentication Methods</title>
 
   <para>
@@ -1177,7 +1177,7 @@ omicron         bryanh                  guest1
   </para>
  </sect1>
 
-  <sect1 id="auth-trust">
+  <sect1 id="auth-trust" xreflabel="Trust Authentication">
    <title>Trust Authentication</title>
 
    <para>
@@ -1225,7 +1225,7 @@ omicron         bryanh                  guest1
 
   </sect1>
 
-  <sect1 id="auth-password">
+  <sect1 id="auth-password" xreflabel="Password Authentication">
    <title>Password Authentication</title>
 
    <indexterm>
@@ -1358,7 +1358,7 @@ omicron         bryanh                  guest1
    </para>
   </sect1>
 
-  <sect1 id="gssapi-auth">
+  <sect1 id="gssapi-auth" xreflabel="GSSAPI Authentication">
    <title>GSSAPI Authentication</title>
 
    <indexterm zone="gssapi-auth">
@@ -1524,7 +1524,7 @@ omicron         bryanh                  guest1
    </para>
   </sect1>
 
-  <sect1 id="sspi-auth">
+  <sect1 id="sspi-auth" xreflabel="SSPI Authentication">
    <title>SSPI Authentication</title>
 
    <indexterm zone="sspi-auth">
@@ -1644,7 +1644,7 @@ omicron         bryanh                  guest1
    </para>
   </sect1>
 
-  <sect1 id="auth-ident">
+  <sect1 id="auth-ident" xreflabel="Ident Authentication">
    <title>Ident Authentication</title>
 
    <indexterm>
@@ -1726,7 +1726,7 @@ omicron         bryanh                  guest1
    </para>
   </sect1>
 
-  <sect1 id="auth-peer">
+  <sect1 id="auth-peer" xreflabel="Peer Authentication">
    <title>Peer Authentication</title>
 
    <indexterm>
@@ -1767,7 +1767,7 @@ omicron         bryanh                  guest1
 
   </sect1>
 
-  <sect1 id="auth-ldap">
+  <sect1 id="auth-ldap" xreflabel="LDAP Authentication">
    <title>LDAP Authentication</title>
 
    <indexterm zone="auth-ldap">
@@ -2096,7 +2096,7 @@ host ... ldap ldapbasedn="dc=example,dc=net"
 
   </sect1>
 
-  <sect1 id="auth-radius">
+  <sect1 id="auth-radius" xreflabel="RADIUS Authentication">
    <title>RADIUS Authentication</title>
 
    <indexterm zone="auth-radius">
@@ -2208,7 +2208,7 @@ host ... radius radiusservers="server1,server2" radiussecrets="""secret one"",""
    </para>
   </sect1>
 
-  <sect1 id="auth-cert">
+  <sect1 id="auth-cert" xreflabel="Certificate Authentication">
    <title>Certificate Authentication</title>
 
    <indexterm zone="auth-cert">
@@ -2252,7 +2252,7 @@ host ... radius radiusservers="server1,server2" radiussecrets="""secret one"",""
    </para>
   </sect1>
 
-  <sect1 id="auth-pam">
+  <sect1 id="auth-pam" xreflabel="PAM Authentication">
    <title>PAM Authentication</title>
 
    <indexterm zone="auth-pam">
@@ -2310,7 +2310,7 @@ host ... radius radiusservers="server1,server2" radiussecrets="""secret one"",""
    </note>
   </sect1>
 
-  <sect1 id="auth-bsd">
+  <sect1 id="auth-bsd" xreflabel="BSD Authentication">
    <title>BSD Authentication</title>
 
    <indexterm zone="auth-bsd">
@@ -2345,7 +2345,7 @@ host ... radius radiusservers="server1,server2" radiussecrets="""secret one"",""
    </note>
   </sect1>
 
-  <sect1 id="auth-oauth">
+  <sect1 id="auth-oauth" xreflabel="OAuth Authorization/Authentication">
    <title>OAuth Authorization/Authentication</title>
 
    <indexterm zone="auth-oauth">
@@ -2581,7 +2581,7 @@ host ... radius radiusservers="server1,server2" radiussecrets="""secret one"",""
    </para>
   </sect1>
 
-  <sect1 id="client-authentication-problems">
+  <sect1 id="client-authentication-problems" xreflabel="Authentication Problems">
    <title>Authentication Problems</title>
 
    <para>
diff --git a/doc/src/sgml/color.sgml b/doc/src/sgml/color.sgml
index 5b782f7cc27..7a0756ebb4d 100644
--- a/doc/src/sgml/color.sgml
+++ b/doc/src/sgml/color.sgml
@@ -12,7 +12,7 @@
   output.  This appendix describes how that is configured.
  </para>
 
- <sect1 id="color-when">
+ <sect1 id="color-when" xreflabel="When Color is Used">
   <title>When Color is Used</title>
 
   <para>
@@ -43,7 +43,7 @@
   </para>
  </sect1>
 
- <sect1 id="color-which">
+ <sect1 id="color-which" xreflabel="Configuring the Colors">
   <title>Configuring the Colors</title>
 
   <para>
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 1c23538d3c5..db67f07000a 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -15,10 +15,10 @@
    discuss each parameter in detail.
   </para>
 
-  <sect1 id="config-setting">
+  <sect1 id="config-setting" xreflabel="Setting Parameters">
    <title>Setting Parameters</title>
 
-   <sect2 id="config-setting-names-values">
+   <sect2 id="config-setting-names-values" xreflabel="Parameter Names and Values">
     <title>Parameter Names and Values</title>
 
     <para>
@@ -129,7 +129,7 @@
     </itemizedlist>
    </sect2>
 
-   <sect2 id="config-setting-configuration-file">
+   <sect2 id="config-setting-configuration-file" xreflabel="Parameter Interaction via the Configuration File">
     <title>Parameter Interaction via the Configuration File</title>
 
     <para>
@@ -216,7 +216,7 @@ shared_buffers = 128MB
     </para>
    </sect2>
 
-   <sect2 id="config-setting-sql">
+   <sect2 id="config-setting-sql" xreflabel="Parameter Interaction via SQL">
     <title>Parameter Interaction via SQL</title>
 
      <para>
@@ -318,7 +318,7 @@ UPDATE pg_settings SET setting = reset_val WHERE name = 'configuration_parameter
 
    </sect2>
 
-   <sect2 id="config-setting-shell">
+   <sect2 id="config-setting-shell" xreflabel="Parameter Interaction via the Shell">
     <title>Parameter Interaction via the Shell</title>
 
      <para>
@@ -371,7 +371,7 @@ env PGOPTIONS="-c geqo=off --statement-timeout=5min" psql
 
    </sect2>
 
-   <sect2 id="config-includes">
+   <sect2 id="config-includes" xreflabel="Managing Configuration File Contents">
     <title>Managing Configuration File Contents</title>
 
      <para>
@@ -499,7 +499,7 @@ include_dir 'conf.d'
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-file-locations">
+   <sect1 id="runtime-config-file-locations" xreflabel="File Locations">
     <title>File Locations</title>
 
      <para>
@@ -633,10 +633,10 @@ include_dir 'conf.d'
      </para>
    </sect1>
 
-   <sect1 id="runtime-config-connection">
+   <sect1 id="runtime-config-connection" xreflabel="Connections and Authentication">
     <title>Connections and Authentication</title>
 
-    <sect2 id="runtime-config-connection-settings">
+    <sect2 id="runtime-config-connection-settings" xreflabel="Connection Settings">
      <title>Connection Settings</title>
 
      <variablelist>
@@ -946,7 +946,7 @@ include_dir 'conf.d'
      </variablelist>
      </sect2>
 
-     <sect2 id="runtime-config-tcp-settings">
+     <sect2 id="runtime-config-tcp-settings" xreflabel="TCP Settings">
      <title>TCP Settings</title>
 
      <variablelist>
@@ -1077,7 +1077,7 @@ include_dir 'conf.d'
      </variablelist>
      </sect2>
 
-     <sect2 id="runtime-config-connection-authentication">
+     <sect2 id="runtime-config-connection-authentication" xreflabel="Authentication">
      <title>Authentication</title>
 
      <variablelist>
@@ -1254,7 +1254,7 @@ include_dir 'conf.d'
      </variablelist>
      </sect2>
 
-     <sect2 id="runtime-config-connection-ssl">
+     <sect2 id="runtime-config-connection-ssl" xreflabel="SSL">
      <title>SSL</title>
 
      <para>
@@ -1704,10 +1704,10 @@ include_dir 'conf.d'
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-resource">
+   <sect1 id="runtime-config-resource" xreflabel="Resource Consumption">
     <title>Resource Consumption</title>
 
-    <sect2 id="runtime-config-resource-memory">
+    <sect2 id="runtime-config-resource-memory" xreflabel="Memory">
      <title>Memory</title>
 
      <variablelist>
@@ -2341,7 +2341,7 @@ include_dir 'conf.d'
      </variablelist>
      </sect2>
 
-     <sect2 id="runtime-config-resource-disk">
+     <sect2 id="runtime-config-resource-disk" xreflabel="Disk">
      <title>Disk</title>
 
      <variablelist>
@@ -2430,7 +2430,7 @@ include_dir 'conf.d'
      </variablelist>
      </sect2>
 
-     <sect2 id="runtime-config-resource-kernel">
+     <sect2 id="runtime-config-resource-kernel" xreflabel="Kernel Resource Usage">
      <title>Kernel Resource Usage</title>
 
      <variablelist>
@@ -2463,7 +2463,7 @@ include_dir 'conf.d'
     </sect2>
 
 
-    <sect2 id="runtime-config-resource-background-writer">
+    <sect2 id="runtime-config-resource-background-writer" xreflabel="Background Writer">
      <title>Background Writer</title>
 
      <para>
@@ -2601,7 +2601,7 @@ include_dir 'conf.d'
      </para>
     </sect2>
 
-    <sect2 id="runtime-config-resource-io">
+    <sect2 id="runtime-config-resource-io" xreflabel="I/O">
      <title>I/O</title>
 
      <variablelist>
@@ -2821,7 +2821,7 @@ include_dir 'conf.d'
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-resource-worker-processes">
+    <sect2 id="runtime-config-resource-worker-processes" xreflabel="Worker Processes">
      <title>Worker Processes</title>
 
      <variablelist>
@@ -2981,7 +2981,7 @@ include_dir 'conf.d'
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-wal">
+   <sect1 id="runtime-config-wal" xreflabel="Write Ahead Log">
     <title>Write Ahead Log</title>
 
    <para>
@@ -2989,7 +2989,7 @@ include_dir 'conf.d'
     see <xref linkend="wal-configuration"/>.
    </para>
 
-    <sect2 id="runtime-config-wal-settings">
+    <sect2 id="runtime-config-wal-settings" xreflabel="Settings">
      <title>Settings</title>
      <variablelist>
 
@@ -3632,7 +3632,7 @@ include_dir 'conf.d'
 
      </variablelist>
      </sect2>
-     <sect2 id="runtime-config-wal-checkpoints">
+     <sect2 id="runtime-config-wal-checkpoints" xreflabel="Checkpoints">
      <title>Checkpoints</title>
 
     <variablelist>
@@ -3779,7 +3779,7 @@ include_dir 'conf.d'
 
      </variablelist>
      </sect2>
-     <sect2 id="runtime-config-wal-archiving">
+     <sect2 id="runtime-config-wal-archiving" xreflabel="Archiving">
      <title>Archiving</title>
 
     <variablelist>
@@ -3919,7 +3919,7 @@ include_dir 'conf.d'
      </variablelist>
     </sect2>
 
-   <sect2 id="runtime-config-wal-recovery">
+   <sect2 id="runtime-config-wal-recovery" xreflabel="Recovery">
 
     <title>Recovery</title>
 
@@ -3983,7 +3983,7 @@ include_dir 'conf.d'
     </variablelist>
    </sect2>
 
-  <sect2 id="runtime-config-wal-archive-recovery">
+  <sect2 id="runtime-config-wal-archive-recovery" xreflabel="Archive Recovery">
 
     <title>Archive Recovery</title>
 
@@ -4159,7 +4159,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
 
   </sect2>
 
-  <sect2 id="runtime-config-wal-recovery-target">
+  <sect2 id="runtime-config-wal-recovery-target" xreflabel="Recovery Target">
 
     <title>Recovery Target</title>
 
@@ -4396,7 +4396,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
     </variablelist>
    </sect2>
 
-   <sect2 id="runtime-config-wal-summarization">
+   <sect2 id="runtime-config-wal-summarization" xreflabel="WAL Summarization">
     <title>WAL Summarization</title>
 
     <para>
@@ -4464,7 +4464,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
 
    </sect1>
 
-   <sect1 id="runtime-config-replication">
+   <sect1 id="runtime-config-replication" xreflabel="Replication">
     <title>Replication</title>
 
     <para>
@@ -4498,7 +4498,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
      <xref linkend="logical-replication-config"/>.
     </para>
 
-    <sect2 id="runtime-config-replication-sender">
+    <sect2 id="runtime-config-replication-sender" xreflabel="Sending Servers">
      <title>Sending Servers</title>
 
      <para>
@@ -4751,7 +4751,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-replication-primary">
+    <sect2 id="runtime-config-replication-primary" xreflabel="Primary Server">
      <title>Primary Server</title>
 
      <para>
@@ -4901,7 +4901,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-replication-standby">
+    <sect2 id="runtime-config-replication-standby" xreflabel="Standby Servers">
      <title>Standby Servers</title>
 
      <para>
@@ -5304,7 +5304,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-replication-subscriber">
+    <sect2 id="runtime-config-replication-subscriber" xreflabel="Subscribers">
      <title>Subscribers</title>
 
      <para>
@@ -5423,10 +5423,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
 
    </sect1>
 
-   <sect1 id="runtime-config-query">
+   <sect1 id="runtime-config-query" xreflabel="Query Planning">
     <title>Query Planning</title>
 
-    <sect2 id="runtime-config-query-enable">
+    <sect2 id="runtime-config-query-enable" xreflabel="Planner Method Configuration">
      <title>Planner Method Configuration</title>
 
       <para>
@@ -5873,7 +5873,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
 
      </variablelist>
      </sect2>
-     <sect2 id="runtime-config-query-constants">
+     <sect2 id="runtime-config-query-constants" xreflabel="Planner Cost Constants">
      <title>Planner Cost Constants</title>
 
     <para>
@@ -6203,7 +6203,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
      </variablelist>
 
     </sect2>
-     <sect2 id="runtime-config-query-geqo">
+     <sect2 id="runtime-config-query-geqo" xreflabel="Genetic Query Optimizer">
      <title>Genetic Query Optimizer</title>
 
      <para>
@@ -6357,7 +6357,7 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
 
      </variablelist>
     </sect2>
-     <sect2 id="runtime-config-query-other">
+     <sect2 id="runtime-config-query-other" xreflabel="Other Planner Options">
      <title>Other Planner Options</title>
 
      <variablelist>
@@ -6593,14 +6593,14 @@ SELECT * FROM parent WHERE key = 2400;
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-logging">
+   <sect1 id="runtime-config-logging" xreflabel="Error Reporting and Logging">
     <title>Error Reporting and Logging</title>
 
     <indexterm zone="runtime-config-logging">
      <primary>server log</primary>
     </indexterm>
 
-    <sect2 id="runtime-config-logging-where">
+    <sect2 id="runtime-config-logging-where" xreflabel="Where to Log">
      <title>Where to Log</title>
 
      <indexterm zone="runtime-config-logging-where">
@@ -7064,7 +7064,7 @@ local0.*    /var/log/postgresql
 
       </variablelist>
     </sect2>
-     <sect2 id="runtime-config-logging-when">
+     <sect2 id="runtime-config-logging-when" xreflabel="When to Log">
      <title>When to Log</title>
 
      <variablelist>
@@ -7396,7 +7396,7 @@ local0.*    /var/log/postgresql
     </table>
 
     </sect2>
-     <sect2 id="runtime-config-logging-what">
+     <sect2 id="runtime-config-logging-what" xreflabel="What to Log">
      <title>What to Log</title>
 
      <note>
@@ -8224,7 +8224,7 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
 
      </variablelist>
     </sect2>
-     <sect2 id="runtime-config-logging-csvlog">
+     <sect2 id="runtime-config-logging-csvlog" xreflabel="Using CSV-Format Log Output">
      <title>Using CSV-Format Log Output</title>
 
        <para>
@@ -8353,7 +8353,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
         </orderedlist>
       </para>
     </sect2>
-     <sect2 id="runtime-config-logging-jsonlog">
+     <sect2 id="runtime-config-logging-jsonlog" xreflabel="Using JSON-Format Log Output">
      <title>Using JSON-Format Log Output</title>
 
      <para>
@@ -8536,7 +8536,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      </table>
     </sect2>
 
-   <sect2 id="runtime-config-logging-proc-title">
+   <sect2 id="runtime-config-logging-proc-title" xreflabel="Process Title">
     <title>Process Title</title>
 
     <para>
@@ -8598,10 +8598,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
    </sect2>
   </sect1>
 
-   <sect1 id="runtime-config-statistics">
+   <sect1 id="runtime-config-statistics" xreflabel="Run-time Statistics">
     <title>Run-time Statistics</title>
 
-    <sect2 id="runtime-config-cumulative-statistics">
+    <sect2 id="runtime-config-cumulative-statistics" xreflabel="Cumulative Query and Index Statistics">
      <title>Cumulative Query and Index Statistics</title>
 
      <para>
@@ -8824,7 +8824,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-statistics-monitor">
+    <sect2 id="runtime-config-statistics-monitor" xreflabel="Statistics Monitoring">
      <title>Statistics Monitoring</title>
      <variablelist>
 
@@ -8907,7 +8907,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-vacuum">
+   <sect1 id="runtime-config-vacuum" xreflabel="Vacuuming">
     <title>Vacuuming</title>
 
     <indexterm>
@@ -8920,7 +8920,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      purpose and responsibilities of vacuum, see <xref linkend="routine-vacuuming"/>.
     </para>
 
-    <sect2 id="runtime-config-autovacuum">
+    <sect2 id="runtime-config-autovacuum" xreflabel="Automatic Vacuuming">
      <title>Automatic Vacuuming</title>
 
      <para>
@@ -9274,7 +9274,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-resource-vacuum-cost">
+    <sect2 id="runtime-config-resource-vacuum-cost" xreflabel="Cost-based Vacuum Delay">
      <title>Cost-based Vacuum Delay</title>
 
      <para>
@@ -9420,7 +9420,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      </note>
     </sect2>
 
-    <sect2 id="runtime-config-vacuum-default">
+    <sect2 id="runtime-config-vacuum-default" xreflabel="Default Behavior">
      <title>Default Behavior</title>
 
      <variablelist>
@@ -9450,7 +9450,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-vacuum-freezing">
+    <sect2 id="runtime-config-vacuum-freezing" xreflabel="Freezing">
      <title>Freezing</title>
 
      <para>
@@ -9673,10 +9673,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-client">
+   <sect1 id="runtime-config-client" xreflabel="Client Connection Defaults">
     <title>Client Connection Defaults</title>
 
-    <sect2 id="runtime-config-client-statement">
+    <sect2 id="runtime-config-client-statement" xreflabel="Statement Behavior">
      <title>Statement Behavior</title>
      <variablelist>
 
@@ -10516,7 +10516,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
 
      </variablelist>
     </sect2>
-     <sect2 id="runtime-config-client-format">
+     <sect2 id="runtime-config-client-format" xreflabel="Locale and Formatting">
      <title>Locale and Formatting</title>
 
      <variablelist>
@@ -10824,7 +10824,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
 
     </sect2>
 
-    <sect2 id="runtime-config-client-preload">
+    <sect2 id="runtime-config-client-preload" xreflabel="Shared Library Preloading">
      <title>Shared Library Preloading</title>
 
      <para>
@@ -11034,7 +11034,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
     </variablelist>
    </sect2>
 
-     <sect2 id="runtime-config-client-other">
+     <sect2 id="runtime-config-client-other" xreflabel="Other Defaults">
      <title>Other Defaults</title>
 
      <variablelist>
@@ -11187,7 +11187,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-locks">
+   <sect1 id="runtime-config-locks" xreflabel="Lock Management">
     <title>Lock Management</title>
 
      <variablelist>
@@ -11334,10 +11334,10 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
      </variablelist>
    </sect1>
 
-   <sect1 id="runtime-config-compatible">
+   <sect1 id="runtime-config-compatible" xreflabel="Version and Platform Compatibility">
     <title>Version and Platform Compatibility</title>
 
-    <sect2 id="runtime-config-compatible-version">
+    <sect2 id="runtime-config-compatible-version" xreflabel="Previous PostgreSQL Versions">
      <title>Previous PostgreSQL Versions</title>
 
      <variablelist>
@@ -11522,7 +11522,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
      </variablelist>
     </sect2>
 
-    <sect2 id="runtime-config-compatible-clients">
+    <sect2 id="runtime-config-compatible-clients" xreflabel="Platform and Client Compatibility">
      <title>Platform and Client Compatibility</title>
      <variablelist>
 
@@ -11626,7 +11626,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
     </sect2>
    </sect1>
 
-   <sect1 id="runtime-config-error-handling">
+   <sect1 id="runtime-config-error-handling" xreflabel="Error Handling">
     <title>Error Handling</title>
 
     <variablelist>
@@ -11746,7 +11746,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
 
    </sect1>
 
-   <sect1 id="runtime-config-preset">
+   <sect1 id="runtime-config-preset" xreflabel="Preset Options">
     <title>Preset Options</title>
 
     <para>
@@ -12113,7 +12113,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
     </variablelist>
    </sect1>
 
-   <sect1 id="runtime-config-custom">
+   <sect1 id="runtime-config-custom" xreflabel="Customized Options">
     <title>Customized Options</title>
 
     <para>
@@ -12142,7 +12142,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
     </para>
    </sect1>
 
-   <sect1 id="runtime-config-developer">
+   <sect1 id="runtime-config-developer" xreflabel="Developer Options">
     <title>Developer Options</title>
 
     <para>
@@ -12981,7 +12981,7 @@ LOG:  CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1)
 
     </variablelist>
   </sect1>
-  <sect1 id="runtime-config-short">
+  <sect1 id="runtime-config-short" xreflabel="Short Options">
    <title>Short Options</title>
 
    <para>
diff --git a/doc/src/sgml/contrib-spi.sgml b/doc/src/sgml/contrib-spi.sgml
index 6fa9479d1b9..e71963ec58c 100644
--- a/doc/src/sgml/contrib-spi.sgml
+++ b/doc/src/sgml/contrib-spi.sgml
@@ -24,7 +24,7 @@
   separately-installable extension.
  </para>
 
- <sect2 id="contrib-spi-refint">
+ <sect2 id="contrib-spi-refint" xreflabel="refint &mdash; Functions for Implementing Referential Integrity">
   <title>refint &mdash; Functions for Implementing Referential Integrity</title>
 
   <para>
@@ -75,7 +75,7 @@
   </para>
  </sect2>
 
- <sect2 id="contrib-spi-autoinc">
+ <sect2 id="contrib-spi-autoinc" xreflabel="autoinc &mdash; Functions for Autoincrementing Fields">
   <title>autoinc &mdash; Functions for Autoincrementing Fields</title>
 
   <para>
@@ -104,7 +104,7 @@
 
  </sect2>
 
- <sect2 id="contrib-spi-insert-username">
+ <sect2 id="contrib-spi-insert-username" xreflabel="insert_username &mdash; Functions for Tracking Who Changed a Table">
   <title>insert_username &mdash; Functions for Tracking Who Changed a Table</title>
 
   <para>
@@ -125,7 +125,7 @@
 
  </sect2>
 
- <sect2 id="contrib-spi-moddatetime">
+ <sect2 id="contrib-spi-moddatetime" xreflabel="moddatetime &mdash; Functions for Tracking Last Modification Time">
   <title>moddatetime &mdash; Functions for Tracking Last Modification Time</title>
 
   <para>
diff --git a/doc/src/sgml/contrib.sgml b/doc/src/sgml/contrib.sgml
index 24b706b29ad..34b5a48d085 100644
--- a/doc/src/sgml/contrib.sgml
+++ b/doc/src/sgml/contrib.sgml
@@ -207,7 +207,7 @@ pages.
   other program.
  </para>
 
- <sect1 id="contrib-prog-client">
+ <sect1 id="contrib-prog-client" xreflabel="Client Applications">
   <title>Client Applications</title>
 
   <para>
@@ -223,7 +223,7 @@ pages.
  &vacuumlo;
  </sect1>
 
- <sect1 id="contrib-prog-server">
+ <sect1 id="contrib-prog-server" xreflabel="Server Applications">
   <title>Server Applications</title>
 
   <para>
diff --git a/doc/src/sgml/cube.sgml b/doc/src/sgml/cube.sgml
index a11c0cbd767..141d8e55c7f 100644
--- a/doc/src/sgml/cube.sgml
+++ b/doc/src/sgml/cube.sgml
@@ -18,7 +18,7 @@
   on the current database.
  </para>
 
- <sect2 id="cube-syntax">
+ <sect2 id="cube-syntax" xreflabel="Syntax">
   <title>Syntax</title>
 
   <para>
@@ -99,7 +99,7 @@
   </para>
  </sect2>
 
- <sect2 id="cube-precision">
+ <sect2 id="cube-precision" xreflabel="Precision">
   <title>Precision</title>
 
   <para>
@@ -108,7 +108,7 @@
   </para>
  </sect2>
 
- <sect2 id="cube-usage">
+ <sect2 id="cube-usage" xreflabel="Usage">
   <title>Usage</title>
 
   <para>
@@ -533,7 +533,7 @@ SELECT c FROM test ORDER BY c ~&gt; 3 DESC LIMIT 5;
   </table>
  </sect2>
 
- <sect2 id="cube-defaults">
+ <sect2 id="cube-defaults" xreflabel="Defaults">
   <title>Defaults</title>
 
   <para>
@@ -587,7 +587,7 @@ t
 </programlisting>
  </sect2>
 
- <sect2 id="cube-notes">
+ <sect2 id="cube-notes" xreflabel="Notes">
   <title>Notes</title>
 
   <para>
@@ -601,7 +601,7 @@ t
   </para>
  </sect2>
 
- <sect2 id="cube-credits">
+ <sect2 id="cube-credits" xreflabel="Credits">
   <title>Credits</title>
 
   <para>
diff --git a/doc/src/sgml/custom-rmgr.sgml b/doc/src/sgml/custom-rmgr.sgml
index 3032b2dc0d2..e972f5c4bf2 100644
--- a/doc/src/sgml/custom-rmgr.sgml
+++ b/doc/src/sgml/custom-rmgr.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/custom-rmgr.sgml -->
 
-<sect1 id="custom-rmgr">
+<sect1 id="custom-rmgr" xreflabel="Custom WAL Resource Managers">
  <title>Custom WAL Resource Managers</title>
 
  <para>
diff --git a/doc/src/sgml/custom-scan.sgml b/doc/src/sgml/custom-scan.sgml
index a200d502cdd..dde182f224a 100644
--- a/doc/src/sgml/custom-scan.sgml
+++ b/doc/src/sgml/custom-scan.sgml
@@ -31,7 +31,7 @@
   the same relation.
  </para>
 
- <sect1 id="custom-scan-path">
+ <sect1 id="custom-scan-path" xreflabel="Creating Custom Scan Paths">
   <title>Creating Custom Scan Paths</title>
 
   <para>
@@ -131,7 +131,7 @@ extern PGDLLIMPORT set_join_pathlist_hook_type set_join_pathlist_hook;
    by the planner as the best path for the <literal>joinrel</literal>.
   </para>
 
-  <sect2 id="custom-scan-path-callbacks">
+  <sect2 id="custom-scan-path-callbacks" xreflabel="Custom Scan Path Callbacks">
   <title>Custom Scan Path Callbacks</title>
 
   <para>
@@ -167,7 +167,7 @@ List *(*ReparameterizeCustomPathByChild) (PlannerInfo *root,
   </sect2>
  </sect1>
 
- <sect1 id="custom-scan-plan">
+ <sect1 id="custom-scan-plan" xreflabel="Creating Custom Scan Plans">
   <title>Creating Custom Scan Plans</title>
 
   <para>
@@ -230,7 +230,7 @@ typedef struct CustomScan
    for a <structname>CustomPath</structname> or <structname>CustomScanState</structname>.
   </para>
 
-  <sect2 id="custom-scan-plan-callbacks">
+  <sect2 id="custom-scan-plan-callbacks" xreflabel="Custom Scan Plan Callbacks">
    <title>Custom Scan Plan Callbacks</title>
    <para>
 <programlisting>
@@ -249,7 +249,7 @@ Node *(*CreateCustomScanState) (CustomScan *cscan);
   </sect2>
  </sect1>
 
- <sect1 id="custom-scan-execution">
+ <sect1 id="custom-scan-execution" xreflabel="Executing Custom Scans">
   <title>Executing Custom Scans</title>
 
   <para>
@@ -279,7 +279,7 @@ typedef struct CustomScanState
    structure embedding the above as its first member.
   </para>
 
-  <sect2 id="custom-scan-execution-callbacks">
+  <sect2 id="custom-scan-execution-callbacks" xreflabel="Custom Scan Execution Callbacks">
    <title>Custom Scan Execution Callbacks</title>
 
    <para>
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index e5267a8e4be..b4c4db61f90 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -335,7 +335,7 @@
    the original input.
   </para>
 
-  <sect1 id="datatype-numeric">
+  <sect1 id="datatype-numeric" xreflabel="Numeric Types">
    <title>Numeric Types</title>
 
    <indexterm zone="datatype-numeric">
@@ -444,7 +444,7 @@
     information.  The following sections describe the types in detail.
    </para>
 
-   <sect2 id="datatype-int">
+   <sect2 id="datatype-int" xreflabel="Integer Types">
     <title>Integer Types</title>
 
     <indexterm zone="datatype-int">
@@ -500,7 +500,7 @@
 
    </sect2>
 
-   <sect2 id="datatype-numeric-decimal">
+   <sect2 id="datatype-numeric-decimal" xreflabel="Arbitrary Precision Numbers">
     <title>Arbitrary Precision Numbers</title>
 
     <indexterm>
@@ -735,7 +735,7 @@ FROM generate_series(-3.5, 3.5, 1) AS x;
    </sect2>
 
 
-   <sect2 id="datatype-float">
+   <sect2 id="datatype-float" xreflabel="Floating-Point Types">
     <title>Floating-Point Types</title>
 
     <indexterm zone="datatype-float">
@@ -915,7 +915,7 @@ FROM generate_series(-3.5, 3.5, 1) AS x;
 
    </sect2>
 
-   <sect2 id="datatype-serial">
+   <sect2 id="datatype-serial" xreflabel="Serial Types">
     <title>Serial Types</title>
 
     <indexterm zone="datatype-serial">
@@ -1038,7 +1038,7 @@ ALTER SEQUENCE <replaceable class="parameter">tablename</replaceable>_<replaceab
    </sect2>
   </sect1>
 
-  <sect1 id="datatype-money">
+  <sect1 id="datatype-money" xreflabel="Monetary Types">
    <title>Monetary Types</title>
 
    <para>
@@ -1122,7 +1122,7 @@ SELECT '52093.89'::money::numeric::float8;
   </sect1>
 
 
-  <sect1 id="datatype-character">
+  <sect1 id="datatype-character" xreflabel="Character Types">
    <title>Character Types</title>
 
    <indexterm zone="datatype-character">
@@ -1403,7 +1403,7 @@ SELECT b, char_length(b) FROM test2;
 
   </sect1>
 
- <sect1 id="datatype-binary">
+ <sect1 id="datatype-binary" xreflabel="Binary Data Types">
   <title>Binary Data Types</title>
 
   <indexterm zone="datatype-binary">
@@ -1478,7 +1478,7 @@ SELECT b, char_length(b) FROM test2;
     mostly the same.
    </para>
 
-  <sect2 id="datatype-binary-bytea-hex-format">
+  <sect2 id="datatype-binary-bytea-hex-format" xreflabel="bytea Hex Format">
    <title><type>bytea</type> Hex Format</title>
 
    <para>
@@ -1510,7 +1510,7 @@ SELECT '\xDEADBEEF'::bytea;
    </para>
   </sect2>
 
-  <sect2 id="datatype-binary-bytea-escape-format">
+  <sect2 id="datatype-binary-bytea-escape-format" xreflabel="bytea Escape Format">
    <title><type>bytea</type> Escape Format</title>
 
    <para>
@@ -1706,7 +1706,7 @@ SELECT 'abc \153\154\155 \052\251\124'::bytea;
  </sect1>
 
 
-  <sect1 id="datatype-datetime">
+  <sect1 id="datatype-datetime" xreflabel="Date/Time Types">
    <title>Date/Time Types</title>
 
    <indexterm zone="datatype-datetime">
@@ -1872,7 +1872,7 @@ MINUTE TO SECOND
     any application.
    </para>
 
-   <sect2 id="datatype-datetime-input">
+   <sect2 id="datatype-datetime-input" xreflabel="Date/Time Input">
     <title>Date/Time Input</title>
 
     <para>
@@ -1916,7 +1916,7 @@ MINUTE TO SECOND
      more than 6 digits).
     </para>
 
-    <sect3 id="datatype-datetime-input-dates">
+    <sect3 id="datatype-datetime-input-dates" xreflabel="Dates">
     <title>Dates</title>
 
     <indexterm>
@@ -2015,7 +2015,7 @@ MINUTE TO SECOND
      </table>
     </sect3>
 
-    <sect3 id="datatype-datetime-input-times">
+    <sect3 id="datatype-datetime-input-times" xreflabel="Times">
      <title>Times</title>
 
      <indexterm>
@@ -2178,7 +2178,7 @@ MINUTE TO SECOND
     </para>
     </sect3>
 
-    <sect3 id="datatype-datetime-input-time-stamps">
+    <sect3 id="datatype-datetime-input-time-stamps" xreflabel="Time Stamps">
     <title>Time Stamps</title>
 
     <indexterm>
@@ -2285,7 +2285,7 @@ TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
      </para>
     </sect3>
 
-    <sect3 id="datatype-datetime-special-values">
+    <sect3 id="datatype-datetime-special-values" xreflabel="Special Values">
      <title>Special Values</title>
 
      <indexterm>
@@ -2396,7 +2396,7 @@ TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
     </sect3>
    </sect2>
 
-   <sect2 id="datatype-datetime-output">
+   <sect2 id="datatype-datetime-output" xreflabel="Date/Time Output">
     <title>Date/Time Output</title>
 
     <indexterm>
@@ -2558,7 +2558,7 @@ TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
     </para>
    </sect2>
 
-   <sect2 id="datatype-timezones">
+   <sect2 id="datatype-timezones" xreflabel="Time Zones">
     <title>Time Zones</title>
 
     <indexterm zone="datatype-timezones">
@@ -2741,7 +2741,7 @@ TIMESTAMP WITH TIME ZONE '2004-10-19 10:23:54+02'
     </para>
    </sect2>
 
-   <sect2 id="datatype-interval-input">
+   <sect2 id="datatype-interval-input" xreflabel="Interval Input">
     <title>Interval Input</title>
 
     <indexterm>
@@ -2959,7 +2959,7 @@ SELECT '2 years 15 months 100 weeks 99 hours 123456789 milliseconds'::interval;
 
    </sect2>
 
-   <sect2 id="datatype-interval-output">
+   <sect2 id="datatype-interval-output" xreflabel="Interval Output">
     <title>Interval Output</title>
 
     <indexterm>
@@ -3023,7 +3023,7 @@ SELECT '2 years 15 months 100 weeks 99 hours 123456789 milliseconds'::interval;
      ISO 8601 standard.
     </para>
 
-     <table id="interval-style-output-table">
+     <table id="interval-style-output-table" xreflabel="Interval Output Style Examples">
        <title>Interval Output Style Examples</title>
        <tgroup cols="4">
         <thead>
@@ -3067,7 +3067,7 @@ SELECT '2 years 15 months 100 weeks 99 hours 123456789 milliseconds'::interval;
 
   </sect1>
 
-  <sect1 id="datatype-boolean">
+  <sect1 id="datatype-boolean" xreflabel="Boolean Type">
    <title>Boolean Type</title>
 
    <indexterm zone="datatype-boolean">
@@ -3188,7 +3188,7 @@ SELECT * FROM test1 WHERE a;
    </para>
   </sect1>
 
-  <sect1 id="datatype-enum">
+  <sect1 id="datatype-enum" xreflabel="Enumerated Types">
    <title>Enumerated Types</title>
 
    <indexterm zone="datatype-enum">
@@ -3209,7 +3209,7 @@ SELECT * FROM test1 WHERE a;
     a piece of data.
    </para>
 
-   <sect2 id="datatype-enum-declaration">
+   <sect2 id="datatype-enum-declaration" xreflabel="Declaration of Enumerated Types">
     <title>Declaration of Enumerated Types</title>
 
     <para>
@@ -3239,7 +3239,7 @@ SELECT * FROM person WHERE current_mood = 'happy';
     </para>
     </sect2>
 
-    <sect2 id="datatype-enum-ordering">
+    <sect2 id="datatype-enum-ordering" xreflabel="Ordering">
      <title>Ordering</title>
 
      <para>
@@ -3276,7 +3276,7 @@ WHERE current_mood = (SELECT MIN(current_mood) FROM person);
      </para>
    </sect2>
 
-   <sect2 id="datatype-enum-type-safety">
+   <sect2 id="datatype-enum-type-safety" xreflabel="Type Safety">
     <title>Type Safety</title>
 
     <para>
@@ -3316,7 +3316,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-enum-implementation-details">
+   <sect2 id="datatype-enum-implementation-details" xreflabel="Implementation Details">
     <title>Implementation Details</title>
 
     <para>
@@ -3350,7 +3350,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
    </sect2>
   </sect1>
 
-  <sect1 id="datatype-geometric">
+  <sect1 id="datatype-geometric" xreflabel="Geometric Types">
    <title>Geometric Types</title>
 
    <para>
@@ -3438,7 +3438,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     intersections.  They are explained in <xref linkend="functions-geometry"/>.
    </para>
 
-   <sect2 id="datatype-geometric-points">
+   <sect2 id="datatype-geometric-points" xreflabel="Points">
     <title>Points</title>
 
     <indexterm>
@@ -3464,7 +3464,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-line">
+   <sect2 id="datatype-line" xreflabel="Lines">
     <title>Lines</title>
 
     <indexterm>
@@ -3497,7 +3497,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-lseg">
+   <sect2 id="datatype-lseg" xreflabel="Line Segments">
     <title>Line Segments</title>
 
     <indexterm>
@@ -3532,7 +3532,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-geometric-boxes">
+   <sect2 id="datatype-geometric-boxes" xreflabel="Boxes">
     <title>Boxes</title>
 
     <indexterm>
@@ -3573,7 +3573,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-geometric-paths">
+   <sect2 id="datatype-geometric-paths" xreflabel="Paths">
     <title>Paths</title>
 
     <indexterm>
@@ -3612,7 +3612,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-polygon">
+   <sect2 id="datatype-polygon" xreflabel="Polygons">
     <title>Polygons</title>
 
     <indexterm>
@@ -3654,7 +3654,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-circle">
+   <sect2 id="datatype-circle" xreflabel="Circles">
     <title>Circles</title>
 
     <indexterm>
@@ -3686,7 +3686,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
 
   </sect1>
 
-  <sect1 id="datatype-net-types">
+  <sect1 id="datatype-net-types" xreflabel="Network Address Types">
    <title>Network Address Types</title>
 
    <indexterm zone="datatype-net-types">
@@ -3754,7 +3754,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
    </para>
 
 
-   <sect2 id="datatype-inet">
+   <sect2 id="datatype-inet" xreflabel="inet">
     <title><type>inet</type></title>
 
     <indexterm>
@@ -3792,7 +3792,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
     </para>
    </sect2>
 
-   <sect2 id="datatype-cidr">
+   <sect2 id="datatype-cidr" xreflabel="cidr">
     <title><type>cidr</type></title>
 
     <indexterm>
@@ -3916,7 +3916,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
      </table>
    </sect2>
 
-   <sect2 id="datatype-inet-vs-cidr">
+   <sect2 id="datatype-inet-vs-cidr" xreflabel="inet vs. cidr">
     <title><type>inet</type> vs. <type>cidr</type></title>
 
     <para>
@@ -3936,7 +3936,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
       </tip>
    </sect2>
 
-   <sect2 id="datatype-macaddr">
+   <sect2 id="datatype-macaddr" xreflabel="macaddr">
     <title><type>macaddr</type></title>
 
     <indexterm>
@@ -4062,7 +4062,7 @@ SELECT macaddr8_set7bit('08:00:2b:01:02:03');
 
   </sect1>
 
-  <sect1 id="datatype-bit">
+  <sect1 id="datatype-bit" xreflabel="Bit String Types">
    <title>Bit String Types</title>
 
    <indexterm zone="datatype-bit">
@@ -4138,7 +4138,7 @@ SELECT * FROM test;
    </para>
   </sect1>
 
-  <sect1 id="datatype-textsearch">
+  <sect1 id="datatype-textsearch" xreflabel="Text Search Types">
    <title>Text Search Types</title>
 
    <indexterm zone="datatype-textsearch">
@@ -4164,7 +4164,7 @@ SELECT * FROM test;
     related functions and operators.
    </para>
 
-   <sect2 id="datatype-tsvector">
+   <sect2 id="datatype-tsvector" xreflabel="tsvector">
     <title><type>tsvector</type></title>
 
     <indexterm>
@@ -4274,7 +4274,7 @@ SELECT to_tsvector('english', 'The Fat Rats');
 
    </sect2>
 
-   <sect2 id="datatype-tsquery">
+   <sect2 id="datatype-tsquery" xreflabel="tsquery">
     <title><type>tsquery</type></title>
 
     <indexterm>
@@ -4385,7 +4385,7 @@ SELECT to_tsvector( 'postgraduate' ), to_tsquery( 'postgres:*' );
 
   </sect1>
 
-  <sect1 id="datatype-uuid">
+  <sect1 id="datatype-uuid" xreflabel="UUID Type">
    <title><acronym>UUID</acronym> Type</title>
 
    <indexterm zone="datatype-uuid">
@@ -4445,7 +4445,7 @@ a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a11
    </para>
   </sect1>
 
-  <sect1 id="datatype-xml">
+  <sect1 id="datatype-xml" xreflabel="XML Type">
    <title><acronym>XML</acronym> Type</title>
 
    <indexterm zone="datatype-xml">
@@ -4481,7 +4481,7 @@ a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a11
     can be found in <xref linkend="xml-limits-conformance"/>.
    </para>
 
-   <sect2 id="datatype-xml-creating">
+   <sect2 id="datatype-xml-creating" xreflabel="Creating XML Values">
     <title>Creating XML Values</title>
    <para>
     To produce a value of type <type>xml</type> from character data,
@@ -4558,7 +4558,7 @@ SET xmloption TO { DOCUMENT | CONTENT };
 
    </sect2>
 
-   <sect2 id="datatype-xml-encoding-handling">
+   <sect2 id="datatype-xml-encoding-handling" xreflabel="Encoding Handling">
     <title>Encoding Handling</title>
    <para>
     Care must be taken when dealing with multiple character encodings
@@ -4616,7 +4616,7 @@ SET xmloption TO { DOCUMENT | CONTENT };
    </caution>
    </sect2>
 
-   <sect2 id="datatype-xml-accessing-xml-values">
+   <sect2 id="datatype-xml-accessing-xml-values" xreflabel="Accessing XML Values">
    <title>Accessing XML Values</title>
 
    <para>
@@ -4659,7 +4659,7 @@ SET xmloption TO { DOCUMENT | CONTENT };
 
   &rangetypes;
 
-  <sect1 id="domains">
+  <sect1 id="domains" xreflabel="Domain Types">
    <title>Domain Types</title>
 
    <indexterm zone="domains">
@@ -4712,7 +4712,7 @@ INSERT INTO mytable VALUES(-1);  -- fails
    </para>
   </sect1>
 
-  <sect1 id="datatype-oid">
+  <sect1 id="datatype-oid" xreflabel="Object Identifier Types">
    <title>Object Identifier Types</title>
 
    <indexterm zone="datatype-oid">
@@ -5093,7 +5093,7 @@ WHERE ...
    </para>
   </sect1>
 
-  <sect1 id="datatype-pg-lsn">
+  <sect1 id="datatype-pg-lsn" xreflabel="pg_lsn Type">
    <title><type>pg_lsn</type> Type</title>
 
    <indexterm zone="datatype-pg-lsn">
@@ -5125,7 +5125,7 @@ WHERE ...
    </para>
   </sect1>
 
-  <sect1 id="datatype-pseudo">
+  <sect1 id="datatype-pseudo" xreflabel="Pseudo-Types">
    <title>Pseudo-Types</title>
 
    <indexterm zone="datatype-pseudo">
diff --git a/doc/src/sgml/datetime.sgml b/doc/src/sgml/datetime.sgml
index 5905f5fa550..7dddfd006b1 100644
--- a/doc/src/sgml/datetime.sgml
+++ b/doc/src/sgml/datetime.sgml
@@ -20,7 +20,7 @@
    dates and times.
   </para>
 
-  <sect1 id="datetime-input-rules">
+  <sect1 id="datetime-input-rules" xreflabel="Date/Time Input Interpretation">
    <title>Date/Time Input Interpretation</title>
 
    <para>
@@ -177,7 +177,7 @@
   </sect1>
 
 
-  <sect1 id="datetime-invalid-input">
+  <sect1 id="datetime-invalid-input" xreflabel="Handling of Invalid or Ambiguous Timestamps">
    <title>Handling of Invalid or Ambiguous Timestamps</title>
 
    <para>
@@ -252,7 +252,7 @@
   </sect1>
 
 
-  <sect1 id="datetime-keywords">
+  <sect1 id="datetime-keywords" xreflabel="Date/Time Key Words">
    <title>Date/Time Key Words</title>
 
    <para>
@@ -413,7 +413,7 @@
     </table>
   </sect1>
 
-  <sect1 id="datetime-config-files">
+  <sect1 id="datetime-config-files" xreflabel="Date/Time Configuration Files">
   <title>Date/Time Configuration Files</title>
 
    <indexterm>
@@ -587,7 +587,7 @@
 
   </sect1>
 
-  <sect1 id="datetime-posix-timezone-specs">
+  <sect1 id="datetime-posix-timezone-specs" xreflabel="POSIX Time Zone Specifications">
   <title><acronym>POSIX</acronym> Time Zone Specifications</title>
 
   <indexterm zone="datetime-posix-timezone-specs">
@@ -789,7 +789,7 @@
 
   </sect1>
 
-  <sect1 id="datetime-units-history">
+  <sect1 id="datetime-units-history" xreflabel="History of Units">
   <title>History of Units</title>
 
   <indexterm zone="datetime-units-history">
@@ -899,7 +899,7 @@ $ <userinput>cal 9 1752</userinput>
 
   </sect1>
 
-  <sect1 id="datetime-julian-dates">
+  <sect1 id="datetime-julian-dates" xreflabel="Julian Dates">
   <title>Julian Dates</title>
 
   <indexterm zone="datetime-julian-dates">
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index cea28c00f8a..116a41d3f6c 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -16,7 +16,7 @@
   triggers.
  </para>
 
- <sect1 id="ddl-basics">
+ <sect1 id="ddl-basics" xreflabel="Table Basics">
   <title>Table Basics</title>
 
   <indexterm zone="ddl-basics">
@@ -168,7 +168,7 @@ DROP TABLE products;
   </para>
  </sect1>
 
- <sect1 id="ddl-default">
+ <sect1 id="ddl-default" xreflabel="Default Values">
   <title>Default Values</title>
 
   <indexterm zone="ddl-default">
@@ -233,7 +233,7 @@ CREATE TABLE products (
   </para>
  </sect1>
 
- <sect1 id="ddl-identity-columns">
+ <sect1 id="ddl-identity-columns" xreflabel="Identity Columns">
   <title>Identity Columns</title>
 
   <indexterm zone="ddl-identity-columns">
@@ -345,7 +345,7 @@ INSERT INTO people (id, name, address) VALUES (<emphasis>DEFAULT</emphasis>, 'C'
   </para>
  </sect1>
 
- <sect1 id="ddl-generated-columns">
+ <sect1 id="ddl-generated-columns" xreflabel="Generated Columns">
   <title>Generated Columns</title>
 
   <indexterm zone="ddl-generated-columns">
@@ -562,7 +562,7 @@ CREATE TABLE people (
   </para>
  </sect1>
 
- <sect1 id="ddl-constraints">
+ <sect1 id="ddl-constraints" xreflabel="Constraints">
   <title>Constraints</title>
 
   <indexterm zone="ddl-constraints">
@@ -588,7 +588,7 @@ CREATE TABLE people (
    even if the value came from the default value definition.
   </para>
 
-  <sect2 id="ddl-constraints-check-constraints">
+  <sect2 id="ddl-constraints-check-constraints" xreflabel="Check Constraints">
    <title>Check Constraints</title>
 
    <indexterm>
@@ -787,7 +787,7 @@ CREATE TABLE products (
    </note>
   </sect2>
 
-  <sect2 id="ddl-constraints-not-null">
+  <sect2 id="ddl-constraints-not-null" xreflabel="Not-Null Constraints">
    <title>Not-Null Constraints</title>
 
    <indexterm>
@@ -890,7 +890,7 @@ CREATE TABLE products (
    </tip>
   </sect2>
 
-  <sect2 id="ddl-constraints-unique-constraints">
+  <sect2 id="ddl-constraints-unique-constraints" xreflabel="Unique Constraints">
    <title>Unique Constraints</title>
 
    <indexterm>
@@ -999,7 +999,7 @@ CREATE TABLE products (
    </para>
   </sect2>
 
-  <sect2 id="ddl-constraints-primary-keys">
+  <sect2 id="ddl-constraints-primary-keys" xreflabel="Primary Keys">
    <title>Primary Keys</title>
 
    <indexterm>
@@ -1074,7 +1074,7 @@ CREATE TABLE example (
    </para>
   </sect2>
 
-  <sect2 id="ddl-constraints-fk">
+  <sect2 id="ddl-constraints-fk" xreflabel="Foreign Keys">
    <title>Foreign Keys</title>
 
    <indexterm>
@@ -1409,7 +1409,7 @@ CREATE TABLE posts (
    </para>
   </sect2>
 
-  <sect2 id="ddl-constraints-exclusion">
+  <sect2 id="ddl-constraints-exclusion" xreflabel="Exclusion Constraints">
    <title>Exclusion Constraints</title>
 
    <indexterm>
@@ -1446,7 +1446,7 @@ CREATE TABLE circles (
   </sect2>
  </sect1>
 
- <sect1 id="ddl-system-columns">
+ <sect1 id="ddl-system-columns" xreflabel="System Columns">
   <title>System Columns</title>
 
   <para>
@@ -1585,7 +1585,7 @@ CREATE TABLE circles (
    </para>
  </sect1>
 
- <sect1 id="ddl-temporal-tables">
+ <sect1 id="ddl-temporal-tables" xreflabel="Temporal Tables">
   <title>Temporal Tables</title>
 
   <indexterm zone="ddl-temporal-tables">
@@ -1601,7 +1601,7 @@ CREATE TABLE circles (
    to express and manage such histories in temporal tables.
   </para>
 
-  <sect2 id="ddl-application-time">
+  <sect2 id="ddl-application-time" xreflabel="Application Time">
    <title>Application Time</title>
 
    <indexterm zone="ddl-application-time">
@@ -1680,7 +1680,7 @@ CREATE TABLE products (
     <quote>versions</quote> persist for extended periods of time.
    </para>
 
-   <sect3 id="ddl-application-time-primary-keys">
+   <sect3 id="ddl-application-time-primary-keys" xreflabel="Temporal Primary Keys and Unique Constraints">
     <title>Temporal Primary Keys and Unique Constraints</title>
 
     <para>
@@ -1756,7 +1756,7 @@ CREATE TABLE products (
     </para>
    </sect3>
 
-   <sect3 id="ddl-application-time-foreign-keys">
+   <sect3 id="ddl-application-time-foreign-keys" xreflabel="Temporal Foreign Keys">
     <title>Temporal Foreign Keys</title>
 
     <para>
@@ -1855,7 +1855,7 @@ CREATE TABLE variants (
    </sect3>
   </sect2>
 
-  <sect2 id="ddl-system-time">
+  <sect2 id="ddl-system-time" xreflabel="System Time">
    <title>System Time</title>
 
    <indexterm zone="ddl-system-time">
@@ -1876,7 +1876,7 @@ CREATE TABLE variants (
   </sect2>
  </sect1>
 
- <sect1 id="ddl-alter">
+ <sect1 id="ddl-alter" xreflabel="Modifying Tables">
   <title>Modifying Tables</title>
 
   <indexterm zone="ddl-alter">
@@ -1932,7 +1932,7 @@ CREATE TABLE variants (
    here.
   </para>
 
-  <sect2 id="ddl-alter-adding-a-column">
+  <sect2 id="ddl-alter-adding-a-column" xreflabel="Adding a Column">
    <title>Adding a Column</title>
 
    <indexterm>
@@ -1986,7 +1986,7 @@ ALTER TABLE products ADD COLUMN description text CHECK (description &lt;&gt; '')
 
   </sect2>
 
-  <sect2 id="ddl-alter-removing-a-column">
+  <sect2 id="ddl-alter-removing-a-column" xreflabel="Removing a Column">
    <title>Removing a Column</title>
 
    <indexterm>
@@ -2013,7 +2013,7 @@ ALTER TABLE products DROP COLUMN description CASCADE;
    </para>
   </sect2>
 
-  <sect2 id="ddl-alter-adding-a-constraint">
+  <sect2 id="ddl-alter-adding-a-constraint" xreflabel="Adding a Constraint">
    <title>Adding a Constraint</title>
 
    <indexterm>
@@ -2046,7 +2046,7 @@ ALTER TABLE products ALTER COLUMN product_no SET NOT NULL;
    </para>
   </sect2>
 
-  <sect2 id="ddl-alter-removing-a-constraint">
+  <sect2 id="ddl-alter-removing-a-constraint" xreflabel="Removing a Constraint">
    <title>Removing a Constraint</title>
 
    <indexterm>
@@ -2087,7 +2087,7 @@ ALTER TABLE products ALTER COLUMN product_no DROP NOT NULL;
    </para>
   </sect2>
 
-  <sect2 id="ddl-alter-column-default">
+  <sect2 id="ddl-alter-column-default" xreflabel="Changing a Column's Default Value">
    <title>Changing a Column's Default Value</title>
 
    <indexterm>
@@ -2116,7 +2116,7 @@ ALTER TABLE products ALTER COLUMN price DROP DEFAULT;
    </para>
   </sect2>
 
-  <sect2 id="ddl-alter-column-type">
+  <sect2 id="ddl-alter-column-type" xreflabel="Changing a Column's Data Type">
    <title>Changing a Column's Data Type</title>
 
    <indexterm>
@@ -2145,7 +2145,7 @@ ALTER TABLE products ALTER COLUMN price TYPE numeric(10,2);
    </para>
   </sect2>
 
-  <sect2 id="ddl-alter-renaming-column">
+  <sect2 id="ddl-alter-renaming-column" xreflabel="Renaming a Column">
    <title>Renaming a Column</title>
 
    <indexterm>
@@ -2161,7 +2161,7 @@ ALTER TABLE products RENAME COLUMN product_no TO product_number;
    </para>
   </sect2>
 
-  <sect2 id="ddl-alter-renaming-table">
+  <sect2 id="ddl-alter-renaming-table" xreflabel="Renaming a Table">
    <title>Renaming a Table</title>
 
    <indexterm>
@@ -2178,7 +2178,7 @@ ALTER TABLE products RENAME TO items;
   </sect2>
  </sect1>
 
- <sect1 id="ddl-priv">
+ <sect1 id="ddl-priv" xreflabel="Privileges">
   <title>Privileges</title>
 
   <indexterm zone="ddl-priv">
@@ -2888,7 +2888,7 @@ GRANT SELECT (col1), UPDATE (col1) ON mytable TO miriam_rw;
   </para>
  </sect1>
 
- <sect1 id="ddl-rowsecurity">
+ <sect1 id="ddl-rowsecurity" xreflabel="Row Security Policies">
   <title>Row Security Policies</title>
 
   <indexterm zone="ddl-rowsecurity">
@@ -3354,7 +3354,7 @@ SELECT * FROM information WHERE group_id = 2 FOR UPDATE;
 
  </sect1>
 
- <sect1 id="ddl-schemas">
+ <sect1 id="ddl-schemas" xreflabel="Schemas">
   <title>Schemas</title>
 
   <indexterm zone="ddl-schemas">
@@ -3425,7 +3425,7 @@ SELECT * FROM information WHERE group_id = 2 FOR UPDATE;
    except that schemas cannot be nested.
   </para>
 
-  <sect2 id="ddl-schemas-create">
+  <sect2 id="ddl-schemas-create" xreflabel="Creating a Schema">
    <title>Creating a Schema</title>
 
    <indexterm zone="ddl-schemas-create">
@@ -3521,7 +3521,7 @@ CREATE SCHEMA <replaceable>schema_name</replaceable> AUTHORIZATION <replaceable>
    </para>
   </sect2>
 
-  <sect2 id="ddl-schemas-public">
+  <sect2 id="ddl-schemas-public" xreflabel="The Public Schema">
    <title>The Public Schema</title>
 
    <indexterm zone="ddl-schemas-public">
@@ -3544,7 +3544,7 @@ CREATE TABLE public.products ( ... );
    </para>
   </sect2>
 
-  <sect2 id="ddl-schemas-path">
+  <sect2 id="ddl-schemas-path" xreflabel="The Schema Search Path">
    <title>The Schema Search Path</title>
 
    <indexterm>
@@ -3678,7 +3678,7 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
    </para>
   </sect2>
 
-  <sect2 id="ddl-schemas-priv">
+  <sect2 id="ddl-schemas-priv" xreflabel="Schemas and Privileges">
    <title>Schemas and Privileges</title>
 
    <indexterm zone="ddl-schemas-priv">
@@ -3714,7 +3714,7 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
    </para>
   </sect2>
 
-  <sect2 id="ddl-schemas-catalog">
+  <sect2 id="ddl-schemas-catalog" xreflabel="The System Catalog Schema">
    <title>The System Catalog Schema</title>
 
    <indexterm zone="ddl-schemas-catalog">
@@ -3748,7 +3748,7 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
    </para>
   </sect2>
 
-  <sect2 id="ddl-schemas-patterns">
+  <sect2 id="ddl-schemas-patterns" xreflabel="Usage Patterns">
    <title>Usage Patterns</title>
 
    <para>
@@ -3837,7 +3837,7 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
    </para>
   </sect2>
 
-  <sect2 id="ddl-schemas-portability">
+  <sect2 id="ddl-schemas-portability" xreflabel="Portability">
    <title>Portability</title>
 
    <para>
@@ -3870,7 +3870,7 @@ REVOKE CREATE ON SCHEMA public FROM PUBLIC;
   </sect2>
  </sect1>
 
- <sect1 id="ddl-inherit">
+ <sect1 id="ddl-inherit" xreflabel="Inheritance">
   <title>Inheritance</title>
 
   <indexterm>
@@ -4154,7 +4154,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
    the foreign table are not supported on the whole hierarchy either.
   </para>
 
- <sect2 id="ddl-inherit-caveats">
+ <sect2 id="ddl-inherit-caveats" xreflabel="Caveats">
   <title>Caveats</title>
 
   <para>
@@ -4227,7 +4227,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
    </sect2>
   </sect1>
 
-  <sect1 id="ddl-partitioning">
+  <sect1 id="ddl-partitioning" xreflabel="Table Partitioning">
    <title>Table Partitioning</title>
 
    <indexterm>
@@ -4249,7 +4249,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
     partitioning as part of your database design.
    </para>
 
-   <sect2 id="ddl-partitioning-overview">
+   <sect2 id="ddl-partitioning-overview" xreflabel="Overview">
      <title>Overview</title>
 
     <para>
@@ -4362,7 +4362,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
     </para>
    </sect2>
 
-  <sect2 id="ddl-partitioning-declarative">
+  <sect2 id="ddl-partitioning-declarative" xreflabel="Declarative Partitioning">
    <title>Declarative Partitioning</title>
 
    <para>
@@ -4419,7 +4419,7 @@ VALUES ('Albany', NULL, NULL, 'NY');
     information.
    </para>
 
-   <sect3 id="ddl-partitioning-declarative-example">
+   <sect3 id="ddl-partitioning-declarative-example" xreflabel="Example">
     <title>Example</title>
 
    <para>
@@ -4587,7 +4587,7 @@ CREATE INDEX ON measurement (logdate);
    </para>
    </sect3>
 
-   <sect3 id="ddl-partitioning-declarative-maintenance">
+   <sect3 id="ddl-partitioning-declarative-maintenance" xreflabel="Partition Maintenance">
     <title>Partition Maintenance</title>
 
     <para>
@@ -4785,7 +4785,7 @@ ALTER TABLE measurement SPLIT PARTITION measurement_y2006q1 INTO
 
    </sect3>
 
-   <sect3 id="ddl-partitioning-declarative-limitations">
+   <sect3 id="ddl-partitioning-declarative-limitations" xreflabel="Limitations">
     <title>Limitations</title>
 
    <para>
@@ -4901,7 +4901,7 @@ ALTER TABLE measurement SPLIT PARTITION measurement_y2006q1 INTO
     </sect3>
    </sect2>
 
-   <sect2 id="ddl-partitioning-using-inheritance">
+   <sect2 id="ddl-partitioning-using-inheritance" xreflabel="Partitioning Using Inheritance">
     <title>Partitioning Using Inheritance</title>
 
     <para>
@@ -4938,7 +4938,7 @@ ALTER TABLE measurement SPLIT PARTITION measurement_y2006q1 INTO
      </itemizedlist>
     </para>
 
-    <sect3 id="ddl-partitioning-inheritance-example">
+    <sect3 id="ddl-partitioning-inheritance-example" xreflabel="Example">
      <title>Example</title>
 
      <para>
@@ -5195,7 +5195,7 @@ DO INSTEAD
      </para>
     </sect3>
 
-    <sect3 id="ddl-partitioning-inheritance-maintenance">
+    <sect3 id="ddl-partitioning-inheritance-maintenance" xreflabel="Maintenance for Inheritance Partitioning">
      <title>Maintenance for Inheritance Partitioning</title>
      <para>
       To remove old data quickly, simply drop the child table that is no longer
@@ -5241,7 +5241,7 @@ ALTER TABLE measurement_y2008m02 INHERIT measurement;
     </para>
    </sect3>
 
-   <sect3 id="ddl-partitioning-inheritance-caveats">
+   <sect3 id="ddl-partitioning-inheritance-caveats" xreflabel="Caveats">
     <title>Caveats</title>
 
     <para>
@@ -5314,7 +5314,7 @@ ANALYZE ONLY measurement;
    </sect3>
   </sect2>
 
-  <sect2 id="ddl-partition-pruning">
+  <sect2 id="ddl-partition-pruning" xreflabel="Partition Pruning">
    <title>Partition Pruning</title>
 
    <indexterm>
@@ -5452,7 +5452,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate &gt;= DATE '2008-01-01';
    </para>
   </sect2>
 
-  <sect2 id="ddl-partitioning-constraint-exclusion">
+  <sect2 id="ddl-partitioning-constraint-exclusion" xreflabel="Partitioning and Constraint Exclusion">
    <title>Partitioning and Constraint Exclusion</title>
 
    <indexterm>
@@ -5545,7 +5545,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate &gt;= DATE '2008-01-01';
    </para>
   </sect2>
 
-  <sect2 id="ddl-partitioning-declarative-best-practices">
+  <sect2 id="ddl-partitioning-declarative-best-practices" xreflabel="Best Practices for Declarative Partitioning">
    <title>Best Practices for Declarative Partitioning</title>
 
    <para>
@@ -5629,7 +5629,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate &gt;= DATE '2008-01-01';
 
  </sect1>
 
- <sect1 id="ddl-foreign-data">
+ <sect1 id="ddl-foreign-data" xreflabel="Foreign Data">
   <title>Foreign Data</title>
 
    <indexterm>
@@ -5693,7 +5693,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate &gt;= DATE '2008-01-01';
    </para>
  </sect1>
 
- <sect1 id="ddl-others">
+ <sect1 id="ddl-others" xreflabel="Other Database Objects">
   <title>Other Database Objects</title>
 
   <para>
@@ -5737,7 +5737,7 @@ EXPLAIN SELECT count(*) FROM measurement WHERE logdate &gt;= DATE '2008-01-01';
   </para>
  </sect1>
 
- <sect1 id="ddl-depend">
+ <sect1 id="ddl-depend" xreflabel="Dependency Tracking">
   <title>Dependency Tracking</title>
 
   <indexterm zone="ddl-depend">
diff --git a/doc/src/sgml/dfunc.sgml b/doc/src/sgml/dfunc.sgml
index 3778efc83eb..f6561091579 100644
--- a/doc/src/sgml/dfunc.sgml
+++ b/doc/src/sgml/dfunc.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/dfunc.sgml -->
 
-<sect2 id="dfunc">
+<sect2 id="dfunc" xreflabel="Compiling and Linking Dynamically-Loaded Functions">
  <title>Compiling and Linking Dynamically-Loaded Functions</title>
 
  <para>
diff --git a/doc/src/sgml/dict-int.sgml b/doc/src/sgml/dict-int.sgml
index b4ce5484823..3cc064a0e64 100644
--- a/doc/src/sgml/dict-int.sgml
+++ b/doc/src/sgml/dict-int.sgml
@@ -22,7 +22,7 @@
   on the current database.
  </para>
 
- <sect2 id="dict-int-config">
+ <sect2 id="dict-int-config" xreflabel="Configuration">
   <title>Configuration</title>
 
   <para>
@@ -59,7 +59,7 @@
   </itemizedlist>
  </sect2>
 
- <sect2 id="dict-int-usage">
+ <sect2 id="dict-int-usage" xreflabel="Usage">
   <title>Usage</title>
 
   <para>
diff --git a/doc/src/sgml/dict-xsyn.sgml b/doc/src/sgml/dict-xsyn.sgml
index a94c6430ed4..6da50a856c6 100644
--- a/doc/src/sgml/dict-xsyn.sgml
+++ b/doc/src/sgml/dict-xsyn.sgml
@@ -14,7 +14,7 @@
   search for a word using any of its synonyms.
  </para>
 
- <sect2 id="dict-xsyn-config">
+ <sect2 id="dict-xsyn-config" xreflabel="Configuration">
   <title>Configuration</title>
 
   <para>
@@ -83,7 +83,7 @@ word syn1 syn2 syn3
   </para>
  </sect2>
 
- <sect2 id="dict-xsyn-usage">
+ <sect2 id="dict-xsyn-usage" xreflabel="Usage">
   <title>Usage</title>
 
   <para>
diff --git a/doc/src/sgml/dml.sgml b/doc/src/sgml/dml.sgml
index 61c64cf6c49..a06e329f96b 100644
--- a/doc/src/sgml/dml.sgml
+++ b/doc/src/sgml/dml.sgml
@@ -12,7 +12,7 @@
   from the database.
  </para>
 
- <sect1 id="dml-insert">
+ <sect1 id="dml-insert" xreflabel="Inserting Data">
   <title>Inserting Data</title>
 
   <indexterm zone="dml-insert">
@@ -122,7 +122,7 @@ INSERT INTO products (product_no, name, price)
   </tip>
  </sect1>
 
- <sect1 id="dml-update">
+ <sect1 id="dml-update" xreflabel="Updating Data">
   <title>Updating Data</title>
 
   <indexterm zone="dml-update">
@@ -217,7 +217,7 @@ UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a &gt; 0;
   </para>
  </sect1>
 
- <sect1 id="dml-delete">
+ <sect1 id="dml-delete" xreflabel="Deleting Data">
   <title>Deleting Data</title>
 
   <indexterm zone="dml-delete">
@@ -261,7 +261,7 @@ DELETE FROM products;
   </para>
  </sect1>
 
- <sect1 id="dml-returning">
+ <sect1 id="dml-returning" xreflabel="Returning Data from Modified Rows">
   <title>Returning Data from Modified Rows</title>
 
   <indexterm zone="dml-returning">
diff --git a/doc/src/sgml/docguide.sgml b/doc/src/sgml/docguide.sgml
index 7b61b4841aa..2c8954a191c 100644
--- a/doc/src/sgml/docguide.sgml
+++ b/doc/src/sgml/docguide.sgml
@@ -42,7 +42,7 @@
   download.
  </para>
 
- <sect1 id="docguide-docbook">
+ <sect1 id="docguide-docbook" xreflabel="DocBook">
   <title>DocBook</title>
   <para>
    The documentation sources are written in
@@ -69,7 +69,7 @@
  </sect1>
 
 
- <sect1 id="docguide-toolsets">
+ <sect1 id="docguide-toolsets" xreflabel="Tool Sets">
   <title>Tool Sets</title>
 
   <para>
@@ -150,7 +150,7 @@
    here.
   </para>
 
-  <sect2 id="docguide-toolsets-inst-fedora-et-al">
+  <sect2 id="docguide-toolsets-inst-fedora-et-al" xreflabel="Installation on Fedora, RHEL, and Derivatives">
    <title>Installation on Fedora, RHEL, and Derivatives</title>
 
    <para>
@@ -161,7 +161,7 @@ yum install docbook-dtds docbook-style-xsl libxslt fop
    </para>
   </sect2>
 
-  <sect2 id="docguide-toolsets-inst-freebsd">
+  <sect2 id="docguide-toolsets-inst-freebsd" xreflabel="Installation on FreeBSD">
    <title>Installation on FreeBSD</title>
 
    <para>
@@ -178,7 +178,7 @@ pkg install docbook-xml docbook-xsl libxslt fop
    </para>
   </sect2>
 
-  <sect2 id="docguide-toolsets-inst-debian">
+  <sect2 id="docguide-toolsets-inst-debian" xreflabel="Debian Packages">
    <title>Debian Packages</title>
 
    <para>
@@ -191,7 +191,7 @@ apt-get install docbook-xml docbook-xsl libxml2-utils xsltproc fop
    </para>
   </sect2>
 
-  <sect2 id="docguide-toolsets-inst-macos">
+  <sect2 id="docguide-toolsets-inst-macos" xreflabel="macOS">
    <title>macOS</title>
 
    <para>
@@ -232,7 +232,7 @@ postgres.sgml:21: warning: failed to load external entity "http://www.oasis-open
    </para>
   </sect2>
 
-  <sect2 id="docguide-toolsets-configure">
+  <sect2 id="docguide-toolsets-configure" xreflabel="Detection by configure">
    <title>Detection by <command>configure</command></title>
 
   <para>
@@ -272,7 +272,7 @@ checking for dbtoepub... dbtoepub
   </sect2>
  </sect1>
 
- <sect1 id="docguide-build">
+ <sect1 id="docguide-build" xreflabel="Building the Documentation with Make">
   <title>Building the Documentation with Make</title>
 
   <para>
@@ -282,7 +282,7 @@ checking for dbtoepub... dbtoepub
    documentation. (Remember to use GNU make.)
   </para>
 
-  <sect2 id="docguide-build-html">
+  <sect2 id="docguide-build-html" xreflabel="HTML">
    <title>HTML</title>
 
    <para>
@@ -311,7 +311,7 @@ checking for dbtoepub... dbtoepub
    </para>
  </sect2>
 
- <sect2 id="docguide-build-manpages">
+ <sect2 id="docguide-build-manpages" xreflabel="Manpages">
   <title>Manpages</title>
 
   <para>
@@ -325,7 +325,7 @@ checking for dbtoepub... dbtoepub
   </para>
  </sect2>
 
-  <sect2 id="docguide-build-pdf">
+  <sect2 id="docguide-build-pdf" xreflabel="PDF">
    <title>PDF</title>
 
    <para>
@@ -391,7 +391,7 @@ LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN
    </para>
   </sect2>
 
-  <sect2 id="docguide-build-syntax-check">
+  <sect2 id="docguide-build-syntax-check" xreflabel="Syntax Check">
    <title>Syntax Check</title>
 
    <para>
@@ -406,7 +406,7 @@ LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN
  </sect1>
 
 
- <sect1 id="docguide-build-meson">
+ <sect1 id="docguide-build-meson" xreflabel="Building the Documentation with Meson">
   <title>Building the Documentation with Meson</title>
 
    <para>
@@ -429,7 +429,7 @@ LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN
  </sect1>
 
 
- <sect1 id="docguide-authoring">
+ <sect1 id="docguide-authoring" xreflabel="Documentation Authoring">
   <title>Documentation Authoring</title>
 
    <para>
@@ -446,7 +446,7 @@ LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN
     correct mode.
    </para>
 
-   <sect2 id="docguide-authoring-emacs">
+   <sect2 id="docguide-authoring-emacs" xreflabel="Emacs">
     <title>Emacs</title>
 
     <para>
@@ -469,10 +469,10 @@ LOGLEVEL=-Dorg.apache.commons.logging.simplelog.defaultlog=WARN
  </sect1>
 
 
- <sect1 id="docguide-style">
+ <sect1 id="docguide-style" xreflabel="Style Guide">
   <title>Style Guide</title>
 
-  <sect2 id="docguide-style-ref-pages">
+  <sect2 id="docguide-style-ref-pages" xreflabel="Reference Pages">
    <title>Reference Pages</title>
 
    <para>
diff --git a/doc/src/sgml/earthdistance.sgml b/doc/src/sgml/earthdistance.sgml
index 5a709e3d476..b0414b13129 100644
--- a/doc/src/sgml/earthdistance.sgml
+++ b/doc/src/sgml/earthdistance.sgml
@@ -44,7 +44,7 @@
   </para>
  </caution>
 
- <sect2 id="earthdistance-cube-based">
+ <sect2 id="earthdistance-cube-based" xreflabel="Cube-Based Earth Distances">
   <title>Cube-Based Earth Distances</title>
 
   <para>
@@ -202,7 +202,7 @@
 
  </sect2>
 
- <sect2 id="earthdistance-point-based">
+ <sect2 id="earthdistance-point-based" xreflabel="Point-Based Earth Distances">
   <title>Point-Based Earth Distances</title>
 
   <para>
diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml
index 807dadcb4a3..802315850f0 100644
--- a/doc/src/sgml/ecpg.sgml
+++ b/doc/src/sgml/ecpg.sgml
@@ -22,7 +22,7 @@
   many resources about SQL.
  </para>
 
- <sect1 id="ecpg-concept">
+ <sect1 id="ecpg-concept" xreflabel="The Concept">
   <title>The Concept</title>
 
   <para>
@@ -86,7 +86,7 @@ EXEC SQL ...;
   </para>
  </sect1>
 
- <sect1 id="ecpg-connect">
+ <sect1 id="ecpg-connect" xreflabel="Managing Database Connections">
   <title>Managing Database Connections</title>
 
   <para>
@@ -94,7 +94,7 @@ EXEC SQL ...;
    connections.
   </para>
 
-  <sect2 id="ecpg-connecting">
+  <sect2 id="ecpg-connecting" xreflabel="Connecting to the Database Server">
    <title>Connecting to the Database Server</title>
 
   <para>
@@ -271,7 +271,7 @@ EXEC SQL CONNECT TO :target USER :user USING :passwd;
   </para>
   </sect2>
 
-  <sect2 id="ecpg-set-connection">
+  <sect2 id="ecpg-set-connection" xreflabel="Choosing a Connection">
    <title>Choosing a Connection</title>
 
   <para>
@@ -394,7 +394,7 @@ postgres
   </para>
   </sect2>
 
-  <sect2 id="ecpg-disconnect">
+  <sect2 id="ecpg-disconnect" xreflabel="Closing a Connection">
    <title>Closing a Connection</title>
 
   <para>
@@ -437,7 +437,7 @@ EXEC SQL DISCONNECT <optional><replaceable>connection</replaceable></optional>;
 
  </sect1>
 
- <sect1 id="ecpg-commands">
+ <sect1 id="ecpg-commands" xreflabel="Running SQL Commands">
   <title>Running SQL Commands</title>
 
   <para>
@@ -445,7 +445,7 @@ EXEC SQL DISCONNECT <optional><replaceable>connection</replaceable></optional>;
    Below are some examples of how to do that.
   </para>
 
-  <sect2 id="ecpg-executing">
+  <sect2 id="ecpg-executing" xreflabel="Executing SQL Statements">
    <title>Executing SQL Statements</title>
 
   <para>
@@ -517,7 +517,7 @@ EXEC SQL SHOW search_path INTO :var;
   </para>
   </sect2>
 
-  <sect2 id="ecpg-cursors">
+  <sect2 id="ecpg-cursors" xreflabel="Using Cursors">
    <title>Using Cursors</title>
 
   <para>
@@ -558,7 +558,7 @@ EXEC SQL COMMIT;
    </note>
   </sect2>
 
-  <sect2 id="ecpg-transactions">
+  <sect2 id="ecpg-transactions" xreflabel="Managing Transactions">
    <title>Managing Transactions</title>
 
   <para>
@@ -644,7 +644,7 @@ EXEC SQL COMMIT;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-prepared">
+  <sect2 id="ecpg-prepared" xreflabel="Prepared Statements">
    <title>Prepared Statements</title>
 
    <para>
@@ -714,7 +714,7 @@ EXEC SQL DEALLOCATE PREPARE <replaceable>name</replaceable>;
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-variables">
+ <sect1 id="ecpg-variables" xreflabel="Using Host Variables">
   <title>Using Host Variables</title>
 
   <para>
@@ -739,7 +739,7 @@ EXEC SQL DEALLOCATE PREPARE <replaceable>name</replaceable>;
    in <xref linkend="ecpg-descriptors"/>.
   </para>
 
-  <sect2 id="ecpg-variables-overview">
+  <sect2 id="ecpg-variables-overview" xreflabel="Overview">
    <title>Overview</title>
 
    <para>
@@ -764,7 +764,7 @@ EXEC SQL INSERT INTO sometable VALUES (:v1, 'foo', :v2);
    </para>
   </sect2>
 
-  <sect2 id="ecpg-declare-sections">
+  <sect2 id="ecpg-declare-sections" xreflabel="Declare Sections">
    <title>Declare Sections</title>
 
    <para>
@@ -815,7 +815,7 @@ EXEC SQL int i = 4;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-retrieving">
+  <sect2 id="ecpg-retrieving" xreflabel="Retrieving Query Results">
    <title>Retrieving Query Results</title>
 
    <para>
@@ -882,7 +882,7 @@ do
 
   </sect2>
 
-  <sect2 id="ecpg-variables-type-mapping">
+  <sect2 id="ecpg-variables-type-mapping" xreflabel="Type Mapping">
    <title>Type Mapping</title>
 
    <para>
@@ -1017,7 +1017,7 @@ do
     </tgroup>
    </table>
 
-   <sect3 id="ecpg-char">
+   <sect3 id="ecpg-char" xreflabel="Handling Character Strings">
     <title>Handling Character Strings</title>
 
     <para>
@@ -1077,7 +1077,7 @@ struct varchar_var { int len; char arr[180]; } var;
     </para>
    </sect3>
 
-   <sect3 id="ecpg-special-types">
+   <sect3 id="ecpg-special-types" xreflabel="Accessing Special Data Types">
     <title>Accessing Special Data Types</title>
 
     <para>
@@ -1104,7 +1104,7 @@ struct varchar_var { int len; char arr[180]; } var;
      see <xref linkend="ecpg-pgtypes"/>.
     </para>
 
-    <sect4 id="ecpg-special-types-timestamp-date">
+    <sect4 id="ecpg-special-types-timestamp-date" xreflabel="timestamp, date">
      <title>timestamp, date</title>
 
      <para>
@@ -1156,7 +1156,7 @@ ts = 2010-06-27 18:03:56.949343
      </para>
     </sect4>
 
-    <sect4 id="ecpg-type-interval">
+    <sect4 id="ecpg-type-interval" xreflabel="interval">
      <title>interval</title>
 
      <para>
@@ -1198,7 +1198,7 @@ EXEC SQL END DECLARE SECTION;
      </para>
     </sect4>
 
-    <sect4 id="ecpg-type-numeric-decimal">
+    <sect4 id="ecpg-type-numeric-decimal" xreflabel="numeric, decimal">
      <title>numeric, decimal</title>
 
      <para>
@@ -1269,7 +1269,7 @@ EXEC SQL END DECLARE SECTION;
      </para>
     </sect4>
 
-    <sect4 id="ecpg-special-types-bytea">
+    <sect4 id="ecpg-special-types-bytea" xreflabel="bytea">
      <title>bytea</title>
 
      <para>
@@ -1300,7 +1300,7 @@ struct bytea_var { int len; char arr[180]; } var;
     </sect4>
    </sect3>
 
-   <sect3 id="ecpg-variables-nonprimitive-c">
+   <sect3 id="ecpg-variables-nonprimitive-c" xreflabel="Host Variables with Nonprimitive Types">
     <title>Host Variables with Nonprimitive Types</title>
 
     <para>
@@ -1308,7 +1308,7 @@ struct bytea_var { int len; char arr[180]; } var;
      pointers.
     </para>
 
-    <sect4 id="ecpg-variables-arrays">
+    <sect4 id="ecpg-variables-arrays" xreflabel="Arrays">
      <title>Arrays</title>
 
      <para>
@@ -1371,7 +1371,7 @@ oid=0, dbname=
      </para>
     </sect4>
 
-    <sect4 id="ecpg-variables-struct">
+    <sect4 id="ecpg-variables-struct" xreflabel="Structures">
      <title>Structures</title>
 
      <para>
@@ -1475,7 +1475,7 @@ EXEC SQL END DECLARE SECTION;
      </para>
     </sect4>
 
-    <sect4 id="ecpg-variables-nonprimitive-c-typedefs">
+    <sect4 id="ecpg-variables-nonprimitive-c-typedefs" xreflabel="Typedefs">
      <title>Typedefs</title>
      <indexterm>
       <primary>typedef</primary>
@@ -1532,7 +1532,7 @@ EXEC SQL START TRANSACTION;
      </note>
     </sect4>
 
-    <sect4 id="ecpg-variables-nonprimitive-c-pointers">
+    <sect4 id="ecpg-variables-nonprimitive-c-pointers" xreflabel="Pointers">
      <title>Pointers</title>
 
      <para>
@@ -1554,7 +1554,7 @@ EXEC SQL END DECLARE SECTION;
    </sect3>
   </sect2>
 
-  <sect2 id="ecpg-variables-nonprimitive-sql">
+  <sect2 id="ecpg-variables-nonprimitive-sql" xreflabel="Handling Nonprimitive SQL Data Types">
    <title>Handling Nonprimitive SQL Data Types</title>
 
    <para>
@@ -1564,7 +1564,7 @@ EXEC SQL END DECLARE SECTION;
     nonprimitive types, described in the previous section.
    </para>
 
-   <sect3 id="ecpg-variables-nonprimitive-sql-arrays">
+   <sect3 id="ecpg-variables-nonprimitive-sql-arrays" xreflabel="Arrays">
     <title>Arrays</title>
 
     <para>
@@ -1687,7 +1687,7 @@ while (1)
     </para>
    </sect3>
 
-   <sect3 id="ecpg-variables-nonprimitive-sql-composite">
+   <sect3 id="ecpg-variables-nonprimitive-sql-composite" xreflabel="Composite Types">
     <title>Composite Types</title>
 
     <para>
@@ -1807,7 +1807,7 @@ while (1)
     </para>
    </sect3>
 
-   <sect3 id="ecpg-variables-nonprimitive-sql-user-defined-base-types">
+   <sect3 id="ecpg-variables-nonprimitive-sql-user-defined-base-types" xreflabel="User-Defined Base Types">
     <title>User-Defined Base Types</title>
 
     <para>
@@ -1895,7 +1895,7 @@ EXEC SQL INSERT INTO test_complex VALUES ('(1,2)', '(3,4)');
    </sect3>
   </sect2>
 
-  <sect2 id="ecpg-indicators">
+  <sect2 id="ecpg-indicators" xreflabel="Indicators">
    <title>Indicators</title>
 
    <para>
@@ -1943,7 +1943,7 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-dynamic">
+ <sect1 id="ecpg-dynamic" xreflabel="Dynamic SQL">
   <title>Dynamic SQL</title>
 
   <para>
@@ -1956,7 +1956,7 @@ EXEC SQL SELECT b INTO :val :val_ind FROM test1;
    provide in a string variable.
   </para>
 
-  <sect2 id="ecpg-dynamic-without-result">
+  <sect2 id="ecpg-dynamic-without-result" xreflabel="Executing Statements without a Result Set">
    <title>Executing Statements without a Result Set</title>
 
    <para>
@@ -1978,7 +1978,7 @@ EXEC SQL EXECUTE IMMEDIATE :stmt;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-dynamic-input">
+  <sect2 id="ecpg-dynamic-input" xreflabel="Executing a Statement with Input Parameters">
    <title>Executing a Statement with Input Parameters</title>
 
    <para>
@@ -2009,7 +2009,7 @@ EXEC SQL DEALLOCATE PREPARE <replaceable>name</replaceable>;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-dynamic-with-result">
+  <sect2 id="ecpg-dynamic-with-result" xreflabel="Executing a Statement with a Result Set">
    <title>Executing a Statement with a Result Set</title>
 
    <para>
@@ -2072,7 +2072,7 @@ EXEC SQL DISCONNECT ALL;
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-pgtypes">
+ <sect1 id="ecpg-pgtypes" xreflabel="pgtypes Library">
   <title>pgtypes Library</title>
 
   <para>
@@ -2099,7 +2099,7 @@ PGTYPESchar_free(out);
 </programlisting>
   </para>
 
-  <sect2 id="ecpg-pgtypes-cstrings">
+  <sect2 id="ecpg-pgtypes-cstrings" xreflabel="Character Strings">
    <title>Character Strings</title>
    <para>
    Some functions such as <function>PGTYPESnumeric_to_asc</function> return
@@ -2111,7 +2111,7 @@ PGTYPESchar_free(out);
    </para>
   </sect2>
 
-  <sect2 id="ecpg-pgtypes-numeric">
+  <sect2 id="ecpg-pgtypes-numeric" xreflabel="The numeric Type">
    <title>The numeric Type</title>
    <para>
     The numeric type offers to do calculations with arbitrary precision. See
@@ -2436,7 +2436,7 @@ int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst);
    </para>
   </sect2>
 
-  <sect2 id="ecpg-pgtypes-date">
+  <sect2 id="ecpg-pgtypes-date" xreflabel="The date Type">
    <title>The date Type</title>
    <para>
     The date type in C enables your programs to deal with data of the SQL type
@@ -2914,7 +2914,7 @@ int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str);
    </para>
   </sect2>
 
-  <sect2 id="ecpg-pgtypes-timestamp">
+  <sect2 id="ecpg-pgtypes-timestamp" xreflabel="The timestamp Type">
    <title>The timestamp Type</title>
    <para>
     The timestamp type in C enables your programs to deal with data of the SQL
@@ -3444,7 +3444,7 @@ int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tou
    </para>
   </sect2>
 
-  <sect2 id="ecpg-pgtypes-interval">
+  <sect2 id="ecpg-pgtypes-interval" xreflabel="The interval Type">
    <title>The interval Type</title>
    <para>
     The interval type in C enables your programs to deal with data of the SQL
@@ -3532,7 +3532,7 @@ int PGTYPESinterval_copy(interval *intvlsrc, interval *intvldest);
    </para>
   </sect2>
 
-  <sect2 id="ecpg-pgtypes-decimal">
+  <sect2 id="ecpg-pgtypes-decimal" xreflabel="The decimal Type">
    <title>The decimal Type</title>
    <para>
      The decimal type is similar to the numeric type. However it is limited to
@@ -3576,7 +3576,7 @@ void PGTYPESdecimal_free(decimal *var);
    </para>
   </sect2>
 
-   <sect2 id="ecpg-pgtypes-errno">
+   <sect2 id="ecpg-pgtypes-errno" xreflabel="errno Values of pgtypeslib">
     <title>errno Values of pgtypeslib</title>
    <para>
     <variablelist>
@@ -3718,7 +3718,7 @@ void PGTYPESdecimal_free(decimal *var);
    </para>
   </sect2>
 
-   <sect2 id="ecpg-pgtypes-constants">
+   <sect2 id="ecpg-pgtypes-constants" xreflabel="Special Constants of pgtypeslib">
     <title>Special Constants of pgtypeslib</title>
    <para>
     <variablelist>
@@ -3744,7 +3744,7 @@ void PGTYPESdecimal_free(decimal *var);
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-descriptors">
+ <sect1 id="ecpg-descriptors" xreflabel="Using Descriptor Areas">
   <title>Using Descriptor Areas</title>
 
   <para>
@@ -3759,7 +3759,7 @@ void PGTYPESdecimal_free(decimal *var);
    SQLDAs.
   </para>
 
-  <sect2 id="ecpg-named-descriptors">
+  <sect2 id="ecpg-named-descriptors" xreflabel="Named SQL Descriptor Areas">
    <title>Named SQL Descriptor Areas</title>
 
    <para>
@@ -4017,7 +4017,7 @@ EXEC SQL GET DESCRIPTOR mydesc VALUE 1 :id = DATA;
 
   </sect2>
 
-  <sect2 id="ecpg-sqlda-descriptors">
+  <sect2 id="ecpg-sqlda-descriptors" xreflabel="SQLDA Descriptor Areas">
    <title>SQLDA Descriptor Areas</title>
 
    <para>
@@ -4054,7 +4054,7 @@ EXEC SQL DESCRIBE prepared_statement INTO mysqlda;
      <step><simpara>Free the memory area allocated for the input SQLDA.</simpara></step>
     </procedure>
 
-   <sect3 id="ecpg-sqlda-descriptors-sqlda">
+   <sect3 id="ecpg-sqlda-descriptors-sqlda" xreflabel="SQLDA Data Structure">
     <title>SQLDA Data Structure</title>
 
     <para>
@@ -4071,7 +4071,7 @@ EXEC SQL DESCRIBE prepared_statement INTO mysqlda;
      </para>
     </tip>
 
-    <sect4 id="ecpg-sqlda-sqlda">
+    <sect4 id="ecpg-sqlda-sqlda" xreflabel="sqlda_t Structure">
      <title>sqlda_t Structure</title>
 
      <para>
@@ -4169,7 +4169,7 @@ typedef struct sqlda_struct sqlda_t;
      </para>
     </sect4>
 
-    <sect4 id="ecpg-sqlda-sqlvar">
+    <sect4 id="ecpg-sqlda-sqlvar" xreflabel="sqlvar_t Structure">
      <title>sqlvar_t Structure</title>
 
      <para>
@@ -4244,7 +4244,7 @@ typedef struct sqlvar_struct sqlvar_t;
      </para>
     </sect4>
 
-    <sect4 id="ecpg-sqlda-sqlname">
+    <sect4 id="ecpg-sqlda-sqlname" xreflabel="struct sqlname Structure">
      <title>struct sqlname Structure</title>
 
      <para>
@@ -4283,7 +4283,7 @@ struct sqlname
     </sect4>
    </sect3>
 
-   <sect3 id="ecpg-sqlda-output">
+   <sect3 id="ecpg-sqlda-output" xreflabel="Retrieving a Result Set Using an SQLDA">
     <title>Retrieving a Result Set Using an SQLDA</title>
 
     <procedure>
@@ -4372,7 +4372,7 @@ switch (v.sqltype)
     </para>
    </sect3>
 
-   <sect3 id="ecpg-sqlda-input">
+   <sect3 id="ecpg-sqlda-input" xreflabel="Passing Query Parameters Using an SQLDA">
     <title>Passing Query Parameters Using an SQLDA</title>
 
     <procedure>
@@ -4458,7 +4458,7 @@ free(sqlda2);
     </para>
    </sect3>
 
-   <sect3 id="ecpg-sqlda-example">
+   <sect3 id="ecpg-sqlda-example" xreflabel="A Sample Application Using SQLDA">
     <title>A Sample Application Using SQLDA</title>
 
     <para>
@@ -4813,7 +4813,7 @@ tup_deleted = 0 (type: 9)
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-errors">
+ <sect1 id="ecpg-errors" xreflabel="Error Handling">
   <title>Error Handling</title>
 
   <para>
@@ -4838,7 +4838,7 @@ tup_deleted = 0 (type: 9)
    </itemizedlist>
   </para>
 
-  <sect2 id="ecpg-whenever">
+  <sect2 id="ecpg-whenever" xreflabel="Setting Callbacks">
    <title>Setting Callbacks</title>
 
    <para>
@@ -5029,7 +5029,7 @@ static void set_error_handler(void)
    </para>
   </sect2>
 
-  <sect2 id="ecpg-sqlca">
+  <sect2 id="ecpg-sqlca" xreflabel="sqlca">
    <title>sqlca</title>
 
    <para>
@@ -5172,7 +5172,7 @@ sqlstate: 42P01
    </para>
   </sect2>
 
-  <sect2 id="ecpg-sqlstate-sqlcode">
+  <sect2 id="ecpg-sqlstate-sqlcode" xreflabel="SQLSTATE vs. SQLCODE">
    <title><literal>SQLSTATE</literal> vs. <literal>SQLCODE</literal></title>
 
    <para>
@@ -5684,7 +5684,7 @@ while (1)
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-preproc">
+ <sect1 id="ecpg-preproc" xreflabel="Preprocessor Directives">
   <title>Preprocessor Directives</title>
 
   <para>
@@ -5693,7 +5693,7 @@ while (1)
    file.
   </para>
 
-  <sect2 id="ecpg-include">
+  <sect2 id="ecpg-include" xreflabel="Including Files">
    <title>Including Files</title>
 
    <para>
@@ -5752,7 +5752,7 @@ EXEC SQL INCLUDE "<replaceable>filename</replaceable>";
    </note>
   </sect2>
 
-  <sect2 id="ecpg-define">
+  <sect2 id="ecpg-define" xreflabel="The define and undef Directives">
    <title>The define and undef Directives</title>
    <para>
     Similar to the directive <literal>#define</literal> that is known from C,
@@ -5803,7 +5803,7 @@ EXEC SQL UPDATE Tbl SET col = MYNUMBER;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-ifdef">
+  <sect2 id="ecpg-ifdef" xreflabel="ifdef, ifndef, elif, else, and endif Directives">
    <title>ifdef, ifndef, elif, else, and endif Directives</title>
    <para>
    You can use the following directives to compile code sections conditionally:
@@ -5898,7 +5898,7 @@ EXEC SQL endif;
   </sect2>
  </sect1>
 
-  <sect1 id="ecpg-process">
+  <sect1 id="ecpg-process" xreflabel="Processing Embedded SQL Programs">
   <title>Processing Embedded SQL Programs</title>
 
   <para>
@@ -5986,7 +5986,7 @@ ECPG = ecpg
   </para>
  </sect1>
 
- <sect1 id="ecpg-library">
+ <sect1 id="ecpg-library" xreflabel="Library Functions">
   <title>Library Functions</title>
 
   <para>
@@ -6060,7 +6060,7 @@ ECPG = ecpg
   </itemizedlist>
  </sect1>
 
- <sect1 id="ecpg-lo">
+ <sect1 id="ecpg-lo" xreflabel="Large Objects">
   <title>Large Objects</title>
 
   <para>
@@ -6175,7 +6175,7 @@ main(void)
   </example>
  </sect1>
 
- <sect1 id="ecpg-cpp">
+ <sect1 id="ecpg-cpp" xreflabel="C++ Applications">
   <title><acronym>C++</acronym> Applications</title>
 
   <para>
@@ -6211,7 +6211,7 @@ main(void)
    about that.
   </para>
 
-  <sect2 id="ecpg-cpp-scope">
+  <sect2 id="ecpg-cpp-scope" xreflabel="Scope for Host Variables">
    <title>Scope for Host Variables</title>
 
    <para>
@@ -6290,7 +6290,7 @@ void TestCpp::test()
    </para>
   </sect2>
 
-  <sect2 id="ecpg-cpp-and-c">
+  <sect2 id="ecpg-cpp-and-c" xreflabel="C++ Application Development with External C Module">
    <title>C++ Application Development with External C Module</title>
 
    <para>
@@ -6458,7 +6458,7 @@ c++ test_cpp.o test_mod.o -lecpg -o test_cpp
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-sql-commands">
+ <sect1 id="ecpg-sql-commands" xreflabel="Embedded SQL Commands">
   <title>Embedded SQL Commands</title>
 
   <para>
@@ -8215,7 +8215,7 @@ main(void)
   </refentry>
  </sect1>
 
- <sect1 id="ecpg-informix-compat">
+ <sect1 id="ecpg-informix-compat" xreflabel="Informix Compatibility Mode">
   <title><productname>Informix</productname> Compatibility Mode</title>
   <para>
    <command>ecpg</command> can be run in a so-called <firstterm>Informix compatibility mode</firstterm>. If
@@ -8269,7 +8269,7 @@ $COMMIT;
    find support in ECPG for that either.
   </para>
 
-  <sect2 id="ecpg-informix-types">
+  <sect2 id="ecpg-informix-types" xreflabel="Additional Types">
    <title>Additional Types</title>
    <para>
     The Informix-special "string" pseudo-type for storing right-trimmed character string data is now
@@ -8285,7 +8285,7 @@ EXEC SQL FETCH MYCUR INTO :userid;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-informix-statements">
+  <sect2 id="ecpg-informix-statements" xreflabel="Additional/Missing Embedded SQL Statements">
    <title>Additional/Missing Embedded SQL Statements</title>
    <para>
     <variablelist>
@@ -8327,7 +8327,7 @@ EXEC SQL CLOSE DATABASE;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-informix-sqlda">
+  <sect2 id="ecpg-informix-sqlda" xreflabel="Informix-compatible SQLDA Descriptor Areas">
    <title>Informix-compatible SQLDA Descriptor Areas</title>
    <para>
     Informix-compatible mode supports a different structure than the one described in
@@ -8604,7 +8604,7 @@ EXEC SQL INCLUDE sqlda.h;
    </para>
   </sect2>
 
-  <sect2 id="ecpg-informix-functions">
+  <sect2 id="ecpg-informix-functions" xreflabel="Additional Functions">
    <title>Additional Functions</title>
    <para>
     <variablelist>
@@ -9662,7 +9662,7 @@ risnull(CINTTYPE, (char *) &i);
    </para>
   </sect2>
 
-  <sect2 id="ecpg-informix-constants">
+  <sect2 id="ecpg-informix-constants" xreflabel="Additional Constants">
    <title>Additional Constants</title>
    <para>
     Note that all constants here describe errors and all of them are defined
@@ -9830,7 +9830,7 @@ risnull(CINTTYPE, (char *) &i);
   </sect2>
  </sect1>
 
- <sect1 id="ecpg-oracle-compat">
+ <sect1 id="ecpg-oracle-compat" xreflabel="Oracle Compatibility Mode">
   <title><productname>Oracle</productname> Compatibility Mode</title>
   <para>
    <command>ecpg</command> can be run in a so-called <firstterm>Oracle
@@ -9866,7 +9866,7 @@ risnull(CINTTYPE, (char *) &i);
   </para>
  </sect1>
 
- <sect1 id="ecpg-develop">
+ <sect1 id="ecpg-develop" xreflabel="Internals">
   <title>Internals</title>
 
   <para>
diff --git a/doc/src/sgml/event-trigger.sgml b/doc/src/sgml/event-trigger.sgml
index c10627554bd..c82d8d8f116 100644
--- a/doc/src/sgml/event-trigger.sgml
+++ b/doc/src/sgml/event-trigger.sgml
@@ -21,7 +21,7 @@
    SQL.
   </para>
 
-  <sect1 id="event-trigger-definition">
+  <sect1 id="event-trigger-definition" xreflabel="Overview of Event Trigger Behavior">
    <title>Overview of Event Trigger Behavior</title>
 
    <para>
@@ -36,7 +36,7 @@
      Support for additional events may be added in future releases.
    </para>
 
-   <sect2 id="event-trigger-login">
+   <sect2 id="event-trigger-login" xreflabel="login">
     <title>login</title>
 
    <para>
@@ -161,7 +161,7 @@
    </para>
    </sect2>
 
-   <sect2 id="event-trigger-aborted-transactions">
+   <sect2 id="event-trigger-aborted-transactions" xreflabel="Event Triggers in Aborted Transactions">
     <title>Event Triggers in Aborted Transactions</title>
 
    <para>
@@ -177,7 +177,7 @@
    </para>
    </sect2>
 
-   <sect2 id="event-trigger-creating">
+   <sect2 id="event-trigger-creating" xreflabel="Creating Event Triggers">
     <title>Creating Event Triggers</title>
 
    <para>
@@ -203,7 +203,7 @@
    </sect2>
   </sect1>
 
-  <sect1 id="event-trigger-interface">
+  <sect1 id="event-trigger-interface" xreflabel="Writing Event Trigger Functions in C">
    <title>Writing Event Trigger Functions in C</title>
 
    <indexterm zone="event-trigger-interface">
@@ -317,7 +317,7 @@ typedef struct EventTriggerData
    </para>
   </sect1>
 
-  <sect1 id="event-trigger-example">
+  <sect1 id="event-trigger-example" xreflabel="A Complete Event Trigger Example">
    <title>A Complete Event Trigger Example</title>
 
    <para>
@@ -410,7 +410,7 @@ COMMIT;
    </para>
   </sect1>
 
-  <sect1 id="event-trigger-table-rewrite-example">
+  <sect1 id="event-trigger-table-rewrite-example" xreflabel="A Table Rewrite Event Trigger Example">
    <title>A Table Rewrite Event Trigger Example</title>
 
    <para>
@@ -464,7 +464,7 @@ CREATE EVENT TRIGGER no_rewrite_allowed
    </para>
  </sect1>
 
-  <sect1 id="event-trigger-database-login-example">
+  <sect1 id="event-trigger-database-login-example" xreflabel="A Database Login Event Trigger Example">
     <title>A Database Login Event Trigger Example</title>
 
     <para>
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 63c5ec6d1eb..d4ae0553539 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -46,7 +46,7 @@
    </itemizedlist>
   </para>
 
-  <sect1 id="extend-how">
+  <sect1 id="extend-how" xreflabel="How Extensibility Works">
    <title>How Extensibility Works</title>
 
    <para>
@@ -85,7 +85,7 @@
    </para>
   </sect1>
 
-  <sect1 id="extend-type-system">
+  <sect1 id="extend-type-system" xreflabel="The PostgreSQL Type System">
    <title>The <productname>PostgreSQL</productname> Type System</title>
 
    <indexterm zone="extend-type-system">
@@ -120,7 +120,7 @@
     types, container types, domains, and pseudo-types.
    </para>
 
-   <sect2 id="extend-type-system-base">
+   <sect2 id="extend-type-system-base" xreflabel="Base Types">
     <title>Base Types</title>
 
     <para>
@@ -143,7 +143,7 @@
     </para>
    </sect2>
 
-   <sect2 id="extend-type-system-container">
+   <sect2 id="extend-type-system-container" xreflabel="Container Types">
     <title>Container Types</title>
 
     <para>
@@ -180,7 +180,7 @@
     </para>
    </sect2>
 
-   <sect2 id="extend-type-system-domains">
+   <sect2 id="extend-type-system-domains" xreflabel="Domains">
     <title>Domains</title>
 
     <para>
@@ -193,7 +193,7 @@
     </para>
    </sect2>
 
-   <sect2 id="extend-type-system-pseudo">
+   <sect2 id="extend-type-system-pseudo" xreflabel="Pseudo-Types">
     <title>Pseudo-Types</title>
 
     <para>
@@ -207,7 +207,7 @@
     </para>
    </sect2>
 
-   <sect2 id="extend-types-polymorphic">
+   <sect2 id="extend-types-polymorphic" xreflabel="Polymorphic Types">
     <title>Polymorphic Types</title>
 
    <indexterm zone="extend-types-polymorphic">
@@ -515,7 +515,7 @@ RETURNS anycompatible AS ...
   &xindex;
 
 
-  <sect1 id="extend-extensions">
+  <sect1 id="extend-extensions" xreflabel="Packaging Related Objects into an Extension">
    <title>Packaging Related Objects into an Extension</title>
 
    <indexterm zone="extend-extensions">
@@ -628,7 +628,7 @@ RETURNS anycompatible AS ...
     dropping the whole extension.
    </para>
 
-   <sect2 id="extend-extensions-files">
+   <sect2 id="extend-extensions-files" xreflabel="Extension Files">
     <title>Extension Files</title>
 
    <indexterm>
@@ -887,7 +887,7 @@ RETURNS anycompatible AS ...
 
    </sect2>
 
-   <sect2 id="extend-extensions-relocation">
+   <sect2 id="extend-extensions-relocation" xreflabel="Extension Relocatability">
     <title>Extension Relocatability</title>
 
     <para>
@@ -1015,7 +1015,7 @@ SET LOCAL search_path TO @extschema@, pg_temp;
     </para>
    </sect2>
 
-   <sect2 id="extend-extensions-config-tables">
+   <sect2 id="extend-extensions-config-tables" xreflabel="Extension Configuration Tables">
     <title>Extension Configuration Tables</title>
 
     <para>
@@ -1107,7 +1107,7 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr
     </para>
    </sect2>
 
-   <sect2 id="extend-extensions-updates">
+   <sect2 id="extend-extensions-updates" xreflabel="Extension Updates">
     <title>Extension Updates</title>
 
     <para>
@@ -1188,7 +1188,7 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl
     </para>
    </sect2>
 
-   <sect2 id="extend-extensions-update-scripts">
+   <sect2 id="extend-extensions-update-scripts" xreflabel="Installing Extensions Using Update Scripts">
     <title>Installing Extensions Using Update Scripts</title>
 
     <para>
@@ -1229,7 +1229,7 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl
     </para>
    </sect2>
 
-   <sect2 id="extend-extensions-security">
+   <sect2 id="extend-extensions-security" xreflabel="Security Considerations for Extensions">
     <title>Security Considerations for Extensions</title>
 
     <para>
@@ -1264,7 +1264,7 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl
      <xref linkend="extend-extensions-security-scripts"/>.
     </para>
 
-    <sect3 id="extend-extensions-security-funcs">
+    <sect3 id="extend-extensions-security-funcs" xreflabel="Security Considerations for Extension Functions">
      <title>Security Considerations for Extension Functions</title>
 
      <para>
@@ -1316,7 +1316,7 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl
      </para>
     </sect3>
 
-    <sect3 id="extend-extensions-security-scripts">
+    <sect3 id="extend-extensions-security-scripts" xreflabel="Security Considerations for Extension Scripts">
      <title>Security Considerations for Extension Scripts</title>
 
      <para>
@@ -1362,7 +1362,7 @@ SELECT * FROM pg_extension_update_paths('<replaceable>extension_name</replaceabl
     </sect3>
    </sect2>
 
-   <sect2 id="extend-extensions-example">
+   <sect2 id="extend-extensions-example" xreflabel="Extension Example">
     <title>Extension Example</title>
 
     <para>
@@ -1439,7 +1439,7 @@ include $(PGXS)
    </sect2>
   </sect1>
 
-  <sect1 id="extend-pgxs">
+  <sect1 id="extend-pgxs" xreflabel="Extension Building Infrastructure">
    <title>Extension Building Infrastructure</title>
 
    <indexterm zone="extend-pgxs">
diff --git a/doc/src/sgml/external-projects.sgml b/doc/src/sgml/external-projects.sgml
index 50872dfd88e..850943ba7b6 100644
--- a/doc/src/sgml/external-projects.sgml
+++ b/doc/src/sgml/external-projects.sgml
@@ -10,7 +10,7 @@
    efficiently developed separately from the core project.
   </para>
 
- <sect1 id="external-interfaces">
+ <sect1 id="external-interfaces" xreflabel="Client Interfaces">
   <title>Client Interfaces</title>
 
   <indexterm>
@@ -53,7 +53,7 @@
   </para>
  </sect1>
 
- <sect1 id="external-admin-tools">
+ <sect1 id="external-admin-tools" xreflabel="Administration Tools">
  <title>Administration Tools</title>
 
   <indexterm>
@@ -69,7 +69,7 @@
   </para>
  </sect1>
 
- <sect1 id="external-pl">
+ <sect1 id="external-pl" xreflabel="Procedural Languages">
   <title>Procedural Languages</title>
 
   <indexterm>
@@ -102,7 +102,7 @@
   </para>
  </sect1>
 
- <sect1 id="external-extensions">
+ <sect1 id="external-extensions" xreflabel="Extensions">
  <title>Extensions</title>
 
   <indexterm>
diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml
index c6d66414b8e..faccdbd3faa 100644
--- a/doc/src/sgml/fdwhandler.sgml
+++ b/doc/src/sgml/fdwhandler.sgml
@@ -35,7 +35,7 @@
     </para>
    </note>
 
-   <sect1 id="fdw-functions">
+   <sect1 id="fdw-functions" xreflabel="Foreign Data Wrapper Functions">
     <title>Foreign Data Wrapper Functions</title>
 
     <para>
@@ -83,7 +83,7 @@
 
    </sect1>
 
-   <sect1 id="fdw-callbacks">
+   <sect1 id="fdw-callbacks" xreflabel="Foreign Data Wrapper Callback Routines">
     <title>Foreign Data Wrapper Callback Routines</title>
 
     <para>
@@ -98,7 +98,7 @@
      details.
     </para>
 
-   <sect2 id="fdw-callbacks-scan">
+   <sect2 id="fdw-callbacks-scan" xreflabel="FDW Routines for Scanning Foreign Tables">
     <title>FDW Routines for Scanning Foreign Tables</title>
 
     <para>
@@ -297,7 +297,7 @@ EndForeignScan(ForeignScanState *node);
 
    </sect2>
 
-   <sect2 id="fdw-callbacks-join-scan">
+   <sect2 id="fdw-callbacks-join-scan" xreflabel="FDW Routines for Scanning Foreign Joins">
     <title>FDW Routines for Scanning Foreign Joins</title>
 
     <para>
@@ -381,7 +381,7 @@ GetForeignJoinPaths(PlannerInfo *root,
     </para>
    </sect2>
 
-   <sect2 id="fdw-callbacks-upper-planning">
+   <sect2 id="fdw-callbacks-upper-planning" xreflabel="FDW Routines for Planning Post-Scan/Join Processing">
     <title>FDW Routines for Planning Post-Scan/Join Processing</title>
 
     <para>
@@ -437,7 +437,7 @@ GetForeignUpperPaths(PlannerInfo *root,
     </para>
    </sect2>
 
-   <sect2 id="fdw-callbacks-update">
+   <sect2 id="fdw-callbacks-update" xreflabel="FDW Routines for Updating Foreign Tables">
     <title>FDW Routines for Updating Foreign Tables</title>
 
     <para>
@@ -1092,7 +1092,7 @@ EndDirectModify(ForeignScanState *node);
 
    </sect2>
 
-   <sect2 id="fdw-callbacks-truncate">
+   <sect2 id="fdw-callbacks-truncate" xreflabel="FDW Routines for TRUNCATE">
     <title>FDW Routines for <command>TRUNCATE</command></title>
 
     <para>
@@ -1147,7 +1147,7 @@ ExecForeignTruncate(List *rels,
     </para>
    </sect2>
 
-   <sect2 id="fdw-callbacks-row-locking">
+   <sect2 id="fdw-callbacks-row-locking" xreflabel="FDW Routines for Row Locking">
     <title>FDW Routines for Row Locking</title>
 
     <para>
@@ -1288,7 +1288,7 @@ RecheckForeignScan(ForeignScanState *node,
     </para>
    </sect2>
 
-   <sect2 id="fdw-callbacks-explain">
+   <sect2 id="fdw-callbacks-explain" xreflabel="FDW Routines for EXPLAIN">
     <title>FDW Routines for <command>EXPLAIN</command></title>
 
     <para>
@@ -1364,7 +1364,7 @@ ExplainDirectModify(ForeignScanState *node,
 
    </sect2>
 
-   <sect2 id="fdw-callbacks-analyze">
+   <sect2 id="fdw-callbacks-analyze" xreflabel="FDW Routines for ANALYZE">
     <title>FDW Routines for <command>ANALYZE</command></title>
 
     <para>
@@ -1411,7 +1411,7 @@ AcquireSampleRowsFunc(Relation relation,
 
    </sect2>
 
-   <sect2 id="fdw-callbacks-import">
+   <sect2 id="fdw-callbacks-import" xreflabel="FDW Routines for IMPORT FOREIGN SCHEMA">
     <title>FDW Routines for <command>IMPORT FOREIGN SCHEMA</command></title>
 
     <para>
@@ -1471,7 +1471,7 @@ ImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid);
 
    </sect2>
 
-   <sect2 id="fdw-callbacks-parallel">
+   <sect2 id="fdw-callbacks-parallel" xreflabel="FDW Routines for Parallel Execution">
     <title>FDW Routines for Parallel Execution</title>
     <para>
      A <structname>ForeignScan</structname> node can, optionally, support parallel
@@ -1574,7 +1574,7 @@ ShutdownForeignScan(ForeignScanState *node);
    </para>
    </sect2>
 
-   <sect2 id="fdw-callbacks-async">
+   <sect2 id="fdw-callbacks-async" xreflabel="FDW Routines for Asynchronous Execution">
     <title>FDW Routines for Asynchronous Execution</title>
     <para>
      A <structname>ForeignScan</structname> node can, optionally, support
@@ -1664,7 +1664,7 @@ ForeignAsyncNotify(AsyncRequest *areq);
     </para>
    </sect2>
 
-   <sect2 id="fdw-callbacks-reparameterize-paths">
+   <sect2 id="fdw-callbacks-reparameterize-paths" xreflabel="FDW Routines for Reparameterization of Paths">
     <title>FDW Routines for Reparameterization of Paths</title>
 
     <para>
@@ -1686,7 +1686,7 @@ ReparameterizeForeignPathByChild(PlannerInfo *root, List *fdw_private,
 
    </sect1>
 
-   <sect1 id="fdw-helpers">
+   <sect1 id="fdw-helpers" xreflabel="Foreign Data Wrapper Helper Functions">
     <title>Foreign Data Wrapper Helper Functions</title>
 
     <para>
@@ -1825,7 +1825,7 @@ GetForeignServerByName(const char *name, bool missing_ok);
 
    </sect1>
 
-   <sect1 id="fdw-planning">
+   <sect1 id="fdw-planning" xreflabel="Foreign Data Wrapper Query Planning">
     <title>Foreign Data Wrapper Query Planning</title>
 
     <para>
@@ -2051,7 +2051,7 @@ GetForeignServerByName(const char *name, bool missing_ok);
 
    </sect1>
 
-   <sect1 id="fdw-row-locking">
+   <sect1 id="fdw-row-locking" xreflabel="Row Locking in Foreign Data Wrappers">
     <title>Row Locking in Foreign Data Wrappers</title>
 
     <para>
diff --git a/doc/src/sgml/features.sgml b/doc/src/sgml/features.sgml
index 966fd398827..93ab8f15f91 100644
--- a/doc/src/sgml/features.sgml
+++ b/doc/src/sgml/features.sgml
@@ -106,7 +106,7 @@
   </para>
  </note>
 
-  <sect1 id="features-sql-standard">
+  <sect1 id="features-sql-standard" xreflabel="Supported Features">
    <title>Supported Features</title>
 
    <para>
@@ -132,7 +132,7 @@
    </para>
   </sect1>
 
-  <sect1 id="unsupported-features-sql-standard">
+  <sect1 id="unsupported-features-sql-standard" xreflabel="Unsupported Features">
    <title>Unsupported Features</title>
 
    <para>
@@ -163,7 +163,7 @@
    </para>
   </sect1>
 
-  <sect1 id="xml-limits-conformance">
+  <sect1 id="xml-limits-conformance" xreflabel="XML Limits and Conformance to SQL/XML">
    <title>XML Limits and Conformance to SQL/XML</title>
 
    <indexterm>
@@ -398,7 +398,7 @@
      </para>
     </sect3>
 
-    <sect3 id="functions-xml-limits-casts">
+    <sect3 id="functions-xml-limits-casts" xreflabel="Mappings between SQL and XML Data Types and Values">
      <title>Mappings between SQL and XML Data Types and Values</title>
 
      <para>
@@ -428,7 +428,7 @@
     </sect3>
    </sect2>
 
-   <sect2 id="functions-xml-limits-postgresql">
+   <sect2 id="functions-xml-limits-postgresql" xreflabel="Incidental Limits of the Implementation">
     <title>Incidental Limits of the Implementation</title>
 
     <para>
@@ -437,7 +437,7 @@
      implementation in <productname>PostgreSQL</productname>.
     </para>
 
-    <sect3 id="functions-xml-limits-postgresql-by-value-only">
+    <sect3 id="functions-xml-limits-postgresql-by-value-only" xreflabel="Only BY VALUE Passing Mechanism Is Supported">
      <title>Only <literal>BY VALUE</literal> Passing Mechanism Is Supported</title>
 
      <para>
@@ -473,7 +473,7 @@ SELECT XMLQUERY('$a is $b' PASSING BY VALUE <replaceable>x</replaceable> AS a, <
      </para>
     </sect3>
 
-    <sect3 id="functions-xml-limits-postgresql-named-parameters">
+    <sect3 id="functions-xml-limits-postgresql-named-parameters" xreflabel="Cannot Pass Named Parameters to Queries">
      <title>Cannot Pass Named Parameters to Queries</title>
 
      <para>
@@ -483,7 +483,7 @@ SELECT XMLQUERY('$a is $b' PASSING BY VALUE <replaceable>x</replaceable> AS a, <
      </para>
     </sect3>
 
-    <sect3 id="functions-xml-limits-postgresql-no-xml-sequence">
+    <sect3 id="functions-xml-limits-postgresql-no-xml-sequence" xreflabel="No XML(SEQUENCE) Type">
      <title>No <type>XML(SEQUENCE)</type> Type</title>
 
      <para>
diff --git a/doc/src/sgml/fuzzystrmatch.sgml b/doc/src/sgml/fuzzystrmatch.sgml
index bcadc440e39..f8053a8fa95 100644
--- a/doc/src/sgml/fuzzystrmatch.sgml
+++ b/doc/src/sgml/fuzzystrmatch.sgml
@@ -28,7 +28,7 @@
   on the current database.
  </para>
 
- <sect2 id="fuzzystrmatch-soundex">
+ <sect2 id="fuzzystrmatch-soundex" xreflabel="Soundex">
   <title>Soundex</title>
 
   <para>
@@ -90,7 +90,7 @@ SELECT * FROM s WHERE difference(s.nm, 'john') &gt; 2;
 </programlisting>
  </sect2>
 
- <sect2 id="fuzzystrmatch-daitch-mokotoff">
+ <sect2 id="fuzzystrmatch-daitch-mokotoff" xreflabel="Daitch-Mokotoff Soundex">
   <title>Daitch-Mokotoff Soundex</title>
 
   <para>
@@ -243,7 +243,7 @@ SELECT * FROM s WHERE soundex_tsvector(nm) @@ soundex_tsquery('Jameson John');
   </para>
  </sect2>
 
- <sect2 id="fuzzystrmatch-levenshtein">
+ <sect2 id="fuzzystrmatch-levenshtein" xreflabel="Levenshtein">
   <title>Levenshtein</title>
 
   <para>
@@ -314,7 +314,7 @@ test=# SELECT levenshtein_less_equal('extensive', 'exhaustive', 4);
 </screen>
  </sect2>
 
- <sect2 id="fuzzystrmatch-metaphone">
+ <sect2 id="fuzzystrmatch-metaphone" xreflabel="Metaphone">
   <title>Metaphone</title>
 
   <para>
@@ -355,7 +355,7 @@ test=# SELECT metaphone('GUMBO', 4);
 </screen>
  </sect2>
 
- <sect2 id="fuzzystrmatch-double-metaphone">
+ <sect2 id="fuzzystrmatch-double-metaphone" xreflabel="Double Metaphone">
   <title>Double Metaphone</title>
 
   <para>
diff --git a/doc/src/sgml/generic-wal.sgml b/doc/src/sgml/generic-wal.sgml
index 41f97ad7dc8..0bcaf48604c 100644
--- a/doc/src/sgml/generic-wal.sgml
+++ b/doc/src/sgml/generic-wal.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/generic-wal.sgml -->
 
-<sect1 id="generic-wal">
+<sect1 id="generic-wal" xreflabel="Generic WAL Records">
  <title>Generic WAL Records</title>
 
   <para>
diff --git a/doc/src/sgml/geqo.sgml b/doc/src/sgml/geqo.sgml
index 82bf3b690d8..da6cb62ee36 100644
--- a/doc/src/sgml/geqo.sgml
+++ b/doc/src/sgml/geqo.sgml
@@ -13,7 +13,7 @@
    </note>
   </para>
 
-  <sect1 id="geqo-intro">
+  <sect1 id="geqo-intro" xreflabel="Query Handling as a Complex Optimization Problem">
    <title>Query Handling as a Complex Optimization Problem</title>
 
    <para>
@@ -59,7 +59,7 @@
    </para>
   </sect1>
 
-  <sect1 id="geqo-intro2">
+  <sect1 id="geqo-intro2" xreflabel="Genetic Algorithms">
    <title>Genetic Algorithms</title>
 
    <para>
@@ -106,7 +106,7 @@
 
   </sect1>
 
-  <sect1 id="geqo-pg-intro">
+  <sect1 id="geqo-pg-intro" xreflabel="Genetic Query Optimization (GEQO) in PostgreSQL">
    <title>Genetic Query Optimization (<acronym>GEQO</acronym>) in PostgreSQL</title>
 
    <para>
@@ -173,7 +173,7 @@
     non-exhaustive search.
    </para>
 
-  <sect2 id="geqo-pg-intro-gen-possible-plans">
+  <sect2 id="geqo-pg-intro-gen-possible-plans" xreflabel="Generating Possible Plans with GEQO">
    <title>Generating Possible Plans with <acronym>GEQO</acronym></title>
 
    <para>
@@ -213,7 +213,7 @@
 
   </sect2>
 
-  <sect2 id="geqo-future">
+  <sect2 id="geqo-future" xreflabel="Future Implementation Tasks for PostgreSQL GEQO">
    <title>Future Implementation Tasks for
     <productname>PostgreSQL</productname> <acronym>GEQO</acronym></title>
 
@@ -261,7 +261,7 @@
    </sect2>
   </sect1>
 
- <sect1 id="geqo-biblio">
+ <sect1 id="geqo-biblio" xreflabel="Further Reading">
   <title>Further Reading</title>
 
   <para>
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index 82410b1fbdf..baac344075f 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/gin.sgml -->
 
-<sect1 id="gin">
+<sect1 id="gin" xreflabel="GIN Indexes">
 <title>GIN Indexes</title>
 
    <indexterm>
@@ -8,7 +8,7 @@
     <secondary>GIN</secondary>
    </indexterm>
 
-<sect2 id="gin-intro">
+<sect2 id="gin-intro" xreflabel="Introduction">
  <title>Introduction</title>
 
  <para>
@@ -62,7 +62,7 @@
  </para>
 </sect2>
 
-<sect2 id="gin-builtin-opclasses">
+<sect2 id="gin-builtin-opclasses" xreflabel="Built-in Operator Classes">
  <title>Built-in Operator Classes</title>
 
  <para>
@@ -142,7 +142,7 @@
 
 </sect2>
 
-<sect2 id="gin-extensibility">
+<sect2 id="gin-extensibility" xreflabel="Extensibility">
  <title>Extensibility</title>
 
  <para>
@@ -464,7 +464,7 @@
 
 </sect2>
 
-<sect2 id="gin-implementation">
+<sect2 id="gin-implementation" xreflabel="Implementation">
  <title>Implementation</title>
 
  <para>
@@ -501,7 +501,7 @@
   </mediaobject>
  </figure>
 
- <sect3 id="gin-fast-update">
+ <sect3 id="gin-fast-update" xreflabel="GIN Fast Update Technique">
   <title>GIN Fast Update Technique</title>
 
   <para>
@@ -541,7 +541,7 @@
   </para>
  </sect3>
 
- <sect3 id="gin-partial-match">
+ <sect3 id="gin-partial-match" xreflabel="Partial Match Algorithm">
   <title>Partial Match Algorithm</title>
 
   <para>
@@ -562,7 +562,7 @@
 
 </sect2>
 
-<sect2 id="gin-tips">
+<sect2 id="gin-tips" xreflabel="GIN Tips and Tricks">
 <title>GIN Tips and Tricks</title>
 
  <variablelist>
@@ -659,7 +659,7 @@
 
 </sect2>
 
-<sect2 id="gin-limit">
+<sect2 id="gin-limit" xreflabel="Limitations">
  <title>Limitations</title>
 
  <para>
@@ -673,7 +673,7 @@
  </para>
 </sect2>
 
-<sect2 id="gin-examples">
+<sect2 id="gin-examples" xreflabel="Examples">
  <title>Examples</title>
 
  <para>
diff --git a/doc/src/sgml/gist.sgml b/doc/src/sgml/gist.sgml
index 1871f742721..d6d2fa85ea2 100644
--- a/doc/src/sgml/gist.sgml
+++ b/doc/src/sgml/gist.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/gist.sgml -->
 
-<sect1 id="gist">
+<sect1 id="gist" xreflabel="GiST Indexes">
 <title>GiST Indexes</title>
 
    <indexterm>
@@ -8,7 +8,7 @@
     <secondary>GiST</secondary>
    </indexterm>
 
-<sect2 id="gist-intro">
+<sect2 id="gist-intro" xreflabel="Introduction">
  <title>Introduction</title>
 
  <para>
@@ -40,7 +40,7 @@
 
 </sect2>
 
-<sect2 id="gist-builtin-opclasses">
+<sect2 id="gist-builtin-opclasses" xreflabel="Built-in Operator Classes">
  <title>Built-in Operator Classes</title>
 
  <para>
@@ -218,7 +218,7 @@ CREATE INDEX ON my_table USING GIST (my_inet_column inet_ops);
 
 </sect2>
 
-<sect2 id="gist-extensibility">
+<sect2 id="gist-extensibility" xreflabel="Extensibility">
  <title>Extensibility</title>
 
  <para>
@@ -1270,10 +1270,10 @@ my_translate_cmptype(PG_FUNCTION_ARGS)
 
 </sect2>
 
-<sect2 id="gist-implementation">
+<sect2 id="gist-implementation" xreflabel="Implementation">
  <title>Implementation</title>
 
- <sect3 id="gist-buffering-build">
+ <sect3 id="gist-buffering-build" xreflabel="GiST Index Build Methods">
   <title>GiST Index Build Methods</title>
 
   <para>
@@ -1325,7 +1325,7 @@ my_translate_cmptype(PG_FUNCTION_ARGS)
  </sect3>
 </sect2>
 
-<sect2 id="gist-examples">
+<sect2 id="gist-examples" xreflabel="Examples">
  <title>Examples</title>
 
  <para>
diff --git a/doc/src/sgml/hash.sgml b/doc/src/sgml/hash.sgml
index 34f3b2cb0c1..15690b25513 100644
--- a/doc/src/sgml/hash.sgml
+++ b/doc/src/sgml/hash.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/hash.sgml -->
 
-<sect1 id="hash-index">
+<sect1 id="hash-index" xreflabel="Hash Indexes">
 <title>Hash Indexes</title>
 
    <indexterm>
@@ -8,7 +8,7 @@
     <secondary>Hash</secondary>
    </indexterm>
 
-<sect2 id="hash-intro">
+<sect2 id="hash-intro" xreflabel="Overview">
  <title>Overview</title>
 
  <para>
@@ -110,7 +110,7 @@
 
 </sect2>
 
-<sect2 id="hash-implementation">
+<sect2 id="hash-implementation" xreflabel="Implementation">
  <title>Implementation</title>
 
  <para>
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 33ca3f0286c..d2f51a8a477 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -79,7 +79,7 @@
   and load balancing solutions.
  </para>
 
- <sect1 id="different-replication-solutions">
+ <sect1 id="different-replication-solutions" xreflabel="Comparison of Different Solutions">
  <title>Comparison of Different Solutions</title>
 
  <variablelist>
@@ -489,7 +489,7 @@ protocol to make nodes agree on a serializable transactional order.
  </sect1>
 
 
- <sect1 id="warm-standby">
+ <sect1 id="warm-standby" xreflabel="Log-Shipping Standby Servers">
  <title>Log-Shipping Standby Servers</title>
 
 
@@ -576,7 +576,7 @@ protocol to make nodes agree on a serializable transactional order.
    <primary>STONITH</primary>
   </indexterm>
 
-  <sect2 id="standby-planning">
+  <sect2 id="standby-planning" xreflabel="Planning">
    <title>Planning</title>
 
    <para>
@@ -660,7 +660,7 @@ protocol to make nodes agree on a serializable transactional order.
    </para>
   </sect2>
 
-  <sect2 id="preparing-primary-for-standby">
+  <sect2 id="preparing-primary-for-standby" xreflabel="Preparing the Primary for Standby Servers">
    <title>Preparing the Primary for Standby Servers</title>
 
    <para>
@@ -690,7 +690,7 @@ protocol to make nodes agree on a serializable transactional order.
    </para>
   </sect2>
 
-  <sect2 id="standby-server-setup">
+  <sect2 id="standby-server-setup" xreflabel="Setting Up a Standby Server">
    <title>Setting Up a Standby Server</title>
 
    <para>
@@ -758,7 +758,7 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive "%r"'
 
   </sect2>
 
-  <sect2 id="streaming-replication">
+  <sect2 id="streaming-replication" xreflabel="Streaming Replication">
    <title>Streaming Replication</title>
 
    <indexterm zone="high-availability">
@@ -836,7 +836,7 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive "%r"'
     a corresponding <literal>walsender</literal> process in the primary.
    </para>
 
-   <sect3 id="streaming-replication-authentication">
+   <sect3 id="streaming-replication-authentication" xreflabel="Authentication">
     <title>Authentication</title>
     <para>
      It is very important that the access privileges for replication be set up
@@ -888,7 +888,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
     </para>
    </sect3>
 
-   <sect3 id="streaming-replication-monitoring">
+   <sect3 id="streaming-replication-monitoring" xreflabel="Monitoring">
     <title>Monitoring</title>
     <para>
      An important health indicator of streaming replication is the amount
@@ -925,7 +925,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
    </sect3>
   </sect2>
 
-  <sect2 id="streaming-replication-slots">
+  <sect2 id="streaming-replication-slots" xreflabel="Replication Slots">
    <title>Replication Slots</title>
    <indexterm>
     <primary>replication slot</primary>
@@ -966,7 +966,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
     </para>
    </caution>
 
-   <sect3 id="streaming-replication-slots-manipulation">
+   <sect3 id="streaming-replication-slots-manipulation" xreflabel="Querying and Manipulating Replication Slots">
     <title>Querying and Manipulating Replication Slots</title>
     <para>
      Each replication slot has a name, which can contain lower-case letters,
@@ -983,7 +983,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
      functions (see <xref linkend="functions-replication"/>).
     </para>
    </sect3>
-   <sect3 id="streaming-replication-slots-config">
+   <sect3 id="streaming-replication-slots-config" xreflabel="Configuration Example">
     <title>Configuration Example</title>
     <para>
      You can create a physical replication slot on the primary like this:
@@ -1009,7 +1009,7 @@ primary_slot_name = 'node_a_slot'
    </sect3>
   </sect2>
 
-  <sect2 id="cascading-replication">
+  <sect2 id="cascading-replication" xreflabel="Cascading Replication">
    <title>Cascading Replication</title>
 
    <indexterm zone="high-availability">
@@ -1066,7 +1066,7 @@ primary_slot_name = 'node_a_slot'
    </para>
   </sect2>
 
-  <sect2 id="synchronous-replication">
+  <sect2 id="synchronous-replication" xreflabel="Synchronous Replication">
    <title>Synchronous Replication</title>
 
    <indexterm zone="high-availability">
@@ -1127,7 +1127,7 @@ primary_slot_name = 'node_a_slot'
     support.
    </para>
 
-   <sect3 id="synchronous-replication-config">
+   <sect3 id="synchronous-replication-config" xreflabel="Basic Configuration">
     <title>Basic Configuration</title>
 
    <para>
@@ -1198,7 +1198,7 @@ primary_slot_name = 'node_a_slot'
 
    </sect3>
 
-   <sect3 id="synchronous-replication-multiple-standbys">
+   <sect3 id="synchronous-replication-multiple-standbys" xreflabel="Multiple Synchronous Standbys">
     <title>Multiple Synchronous Standbys</title>
 
    <para>
@@ -1260,7 +1260,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
    </para>
    </sect3>
 
-   <sect3 id="synchronous-replication-performance">
+   <sect3 id="synchronous-replication-performance" xreflabel="Planning for Performance">
     <title>Planning for Performance</title>
 
    <para>
@@ -1301,7 +1301,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
 
    </sect3>
 
-   <sect3 id="synchronous-replication-ha">
+   <sect3 id="synchronous-replication-ha" xreflabel="Planning for High Availability">
     <title>Planning for High Availability</title>
 
    <para>
@@ -1384,7 +1384,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
    </sect3>
   </sect2>
 
-  <sect2 id="read-your-writes-consistency">
+  <sect2 id="read-your-writes-consistency" xreflabel="Read-Your-Writes Consistency">
    <title>Read-Your-Writes Consistency</title>
 
    <para>
@@ -1438,7 +1438,7 @@ postgres=# WAIT FOR LSN '0/306EE20';
    </para>
   </sect2>
 
-  <sect2 id="continuous-archiving-in-standby">
+  <sect2 id="continuous-archiving-in-standby" xreflabel="Continuous Archiving in Standby">
    <title>Continuous Archiving in Standby</title>
 
    <indexterm>
@@ -1480,7 +1480,7 @@ postgres=# WAIT FOR LSN '0/306EE20';
   </sect2>
   </sect1>
 
-  <sect1 id="warm-standby-failover">
+  <sect1 id="warm-standby-failover" xreflabel="Failover">
    <title>Failover</title>
 
    <para>
@@ -1567,7 +1567,7 @@ postgres=# WAIT FOR LSN '0/306EE20';
    </para>
   </sect1>
 
- <sect1 id="hot-standby">
+ <sect1 id="hot-standby" xreflabel="Hot Standby">
   <title>Hot Standby</title>
 
   <indexterm zone="high-availability">
@@ -1591,7 +1591,7 @@ postgres=# WAIT FOR LSN '0/306EE20';
     explained below.
    </para>
 
-  <sect2 id="hot-standby-users">
+  <sect2 id="hot-standby-users" xreflabel="User's Overview">
    <title>User's Overview</title>
 
    <para>
@@ -1807,7 +1807,7 @@ postgres=# WAIT FOR LSN '0/306EE20';
    </para>
   </sect2>
 
-  <sect2 id="hot-standby-conflict">
+  <sect2 id="hot-standby-conflict" xreflabel="Handling Query Conflicts">
    <title>Handling Query Conflicts</title>
 
    <para>
@@ -2009,7 +2009,7 @@ postgres=# WAIT FOR LSN '0/306EE20';
    </para>
   </sect2>
 
-  <sect2 id="hot-standby-admin">
+  <sect2 id="hot-standby-admin" xreflabel="Administrator's Overview">
    <title>Administrator's Overview</title>
 
    <para>
@@ -2325,7 +2325,7 @@ HINT:  You can then restart the server after making the necessary configuration
    </para>
   </sect2>
 
-  <sect2 id="hot-standby-parameters">
+  <sect2 id="hot-standby-parameters" xreflabel="Hot Standby Parameter Reference">
    <title>Hot Standby Parameter Reference</title>
 
    <para>
@@ -2348,7 +2348,7 @@ HINT:  You can then restart the server after making the necessary configuration
    </para>
   </sect2>
 
-  <sect2 id="hot-standby-caveats">
+  <sect2 id="hot-standby-caveats" xreflabel="Caveats">
    <title>Caveats</title>
 
    <para>
diff --git a/doc/src/sgml/history.sgml b/doc/src/sgml/history.sgml
index 8bfa1db670d..a051b816b4b 100644
--- a/doc/src/sgml/history.sgml
+++ b/doc/src/sgml/history.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/history.sgml -->
 
-<sect1 id="history">
+<sect1 id="history" xreflabel="A Brief History of PostgreSQL">
  <title>A Brief History of <productname>PostgreSQL</productname></title>
 
  <indexterm zone="history">
@@ -23,7 +23,7 @@
   <xref linkend="hell18"/>.
  </para>
 
- <sect2 id="history-berkeley">
+ <sect2 id="history-berkeley" xreflabel="The Berkeley POSTGRES Project">
   <title>The Berkeley <productname>POSTGRES</productname> Project</title>
 
   <indexterm zone="history-berkeley">
@@ -90,7 +90,7 @@
   </para>
  </sect2>
 
- <sect2 id="history-postgres95">
+ <sect2 id="history-postgres95" xreflabel="Postgres95">
   <title><productname>Postgres95</productname></title>
 
   <indexterm zone="history-postgres95">
@@ -188,7 +188,7 @@
   </para>
  </sect2>
 
- <sect2 id="history-postgresql">
+ <sect2 id="history-postgresql" xreflabel="PostgreSQL">
   <title><productname>PostgreSQL</productname></title>
 
   <para>
diff --git a/doc/src/sgml/hstore.sgml b/doc/src/sgml/hstore.sgml
index 5f8d1d1ff43..bae5a68b898 100644
--- a/doc/src/sgml/hstore.sgml
+++ b/doc/src/sgml/hstore.sgml
@@ -21,7 +21,7 @@
   on the current database.
  </para>
 
- <sect2 id="hstore-external-rep">
+ <sect2 id="hstore-external-rep" xreflabel="hstore External Representation">
   <title><type>hstore</type> External Representation</title>
 
   <para>
@@ -88,7 +88,7 @@ key =&gt; NULL
 
  </sect2>
 
- <sect2 id="hstore-ops-funcs">
+ <sect2 id="hstore-ops-funcs" xreflabel="hstore Operators and Functions">
   <title><type>hstore</type> Operators and Functions</title>
 
   <para>
@@ -738,7 +738,7 @@ SELECT h FROM mytable;
   </para>
  </sect2>
 
- <sect2 id="hstore-indexes">
+ <sect2 id="hstore-indexes" xreflabel="Indexes">
   <title>Indexes</title>
 
   <para>
@@ -784,7 +784,7 @@ CREATE INDEX hidx ON testhstore USING HASH (h);
 </programlisting>
  </sect2>
 
- <sect2 id="hstore-examples">
+ <sect2 id="hstore-examples" xreflabel="Examples">
   <title>Examples</title>
 
   <para>
@@ -853,7 +853,7 @@ SELECT (r).* FROM (SELECT t #= '"col3"=&gt;"baz"' AS r FROM test t) s;
   </para>
  </sect2>
 
- <sect2 id="hstore-statistics">
+ <sect2 id="hstore-statistics" xreflabel="Statistics">
   <title>Statistics</title>
 
   <para>
@@ -900,7 +900,7 @@ SELECT key, count(*) FROM
   </para>
  </sect2>
 
- <sect2 id="hstore-compatibility">
+ <sect2 id="hstore-compatibility" xreflabel="Compatibility">
   <title>Compatibility</title>
 
   <para>
@@ -933,7 +933,7 @@ ALTER TABLE tablename ALTER hstorecol TYPE hstore USING hstorecol || '';
 
  </sect2>
 
- <sect2 id="hstore-transforms">
+ <sect2 id="hstore-transforms" xreflabel="Transforms">
   <title>Transforms</title>
 
   <para>
@@ -948,7 +948,7 @@ ALTER TABLE tablename ALTER hstorecol TYPE hstore USING hstorecol || '';
   </para>
  </sect2>
 
- <sect2 id="hstore-authors">
+ <sect2 id="hstore-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml
index 63d7e376f19..521279f33a6 100644
--- a/doc/src/sgml/indexam.sgml
+++ b/doc/src/sgml/indexam.sgml
@@ -52,7 +52,7 @@
    are reclaimed.
   </para>
 
- <sect1 id="index-api">
+ <sect1 id="index-api" xreflabel="Basic API Structure for Indexes">
   <title>Basic API Structure for Indexes</title>
 
   <para>
@@ -276,7 +276,7 @@ typedef struct IndexAmRoutine
 
  </sect1>
 
- <sect1 id="index-functions">
+ <sect1 id="index-functions" xreflabel="Index Access Method Functions">
   <title>Index Access Method Functions</title>
 
   <para>
@@ -911,7 +911,7 @@ amtranslatecmptype (CompareType cmptype, Oid opfamily, Oid opcintype);
 
  </sect1>
 
- <sect1 id="index-scanning">
+ <sect1 id="index-scanning" xreflabel="Index Scanning">
   <title>Index Scanning</title>
 
   <para>
@@ -1066,7 +1066,7 @@ amtranslatecmptype (CompareType cmptype, Oid opfamily, Oid opcintype);
 
  </sect1>
 
- <sect1 id="index-locking">
+ <sect1 id="index-locking" xreflabel="Index Locking Considerations">
   <title>Index Locking Considerations</title>
 
   <para>
@@ -1182,7 +1182,7 @@ amtranslatecmptype (CompareType cmptype, Oid opfamily, Oid opcintype);
 
  </sect1>
 
- <sect1 id="index-unique-checks">
+ <sect1 id="index-unique-checks" xreflabel="Index Uniqueness Checks">
   <title>Index Uniqueness Checks</title>
 
   <para>
@@ -1331,7 +1331,7 @@ amtranslatecmptype (CompareType cmptype, Oid opfamily, Oid opcintype);
 
  </sect1>
 
- <sect1 id="index-cost-estimation">
+ <sect1 id="index-cost-estimation" xreflabel="Index Cost Estimation Functions">
   <title>Index Cost Estimation Functions</title>
 
   <para>
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml
index 55f39b0df2f..93f9617b4c1 100644
--- a/doc/src/sgml/indices.sgml
+++ b/doc/src/sgml/indices.sgml
@@ -16,7 +16,7 @@
  </para>
 
 
- <sect1 id="indexes-intro">
+ <sect1 id="indexes-intro" xreflabel="Introduction">
   <title>Introduction</title>
 
   <para>
@@ -145,7 +145,7 @@ CREATE INDEX test1_id_index ON test1 (id);
  </sect1>
 
 
- <sect1 id="indexes-types">
+ <sect1 id="indexes-types" xreflabel="Index Types">
   <title>Index Types</title>
 
   <para>
@@ -165,7 +165,7 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
 </programlisting>
   </para>
 
-  <sect2 id="indexes-types-btree">
+  <sect2 id="indexes-types-btree" xreflabel="B-Tree">
    <title>B-Tree</title>
 
    <indexterm>
@@ -217,7 +217,7 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
   </para>
   </sect2>
 
-  <sect2 id="indexes-types-hash">
+  <sect2 id="indexes-types-hash" xreflabel="Hash">
    <title>Hash</title>
 
    <indexterm>
@@ -243,7 +243,7 @@ CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable>
   </para>
   </sect2>
 
-  <sect2 id="indexes-type-gist">
+  <sect2 id="indexes-type-gist" xreflabel="GiST">
    <title>GiST</title>
 
    <indexterm>
@@ -292,7 +292,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
   </para>
   </sect2>
 
-  <sect2 id="indexes-type-spgist">
+  <sect2 id="indexes-type-spgist" xreflabel="SP-GiST">
    <title>SP-GiST</title>
 
    <indexterm>
@@ -332,7 +332,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
   </para>
   </sect2>
 
-  <sect2 id="indexes-types-gin">
+  <sect2 id="indexes-types-gin" xreflabel="GIN">
    <title>GIN</title>
 
    <indexterm>
@@ -375,7 +375,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
   </para>
   </sect2>
 
-  <sect2 id="indexes-types-brin">
+  <sect2 id="indexes-types-brin" xreflabel="BRIN">
    <title>BRIN</title>
 
    <indexterm>
@@ -413,7 +413,7 @@ SELECT * FROM places ORDER BY location <-> point '(101,456)' LIMIT 10;
  </sect1>
 
 
- <sect1 id="indexes-multicolumn">
+ <sect1 id="indexes-multicolumn" xreflabel="Multicolumn Indexes">
   <title>Multicolumn Indexes</title>
 
   <indexterm zone="indexes-multicolumn">
@@ -555,7 +555,7 @@ CREATE INDEX test2_mm_idx ON test2 (major, minor);
  </sect1>
 
 
- <sect1 id="indexes-ordering">
+ <sect1 id="indexes-ordering" xreflabel="Indexes and ORDER BY">
   <title>Indexes and <literal>ORDER BY</literal></title>
 
   <indexterm zone="indexes-ordering">
@@ -639,7 +639,7 @@ CREATE INDEX test3_desc_index ON test3 (id DESC NULLS LAST);
  </sect1>
 
 
- <sect1 id="indexes-bitmap-scans">
+ <sect1 id="indexes-bitmap-scans" xreflabel="Combining Multiple Indexes">
   <title>Combining Multiple Indexes</title>
 
   <indexterm zone="indexes-bitmap-scans">
@@ -725,7 +725,7 @@ CREATE INDEX test3_desc_index ON test3 (id DESC NULLS LAST);
  </sect1>
 
 
- <sect1 id="indexes-unique">
+ <sect1 id="indexes-unique" xreflabel="Unique Indexes">
   <title>Unique Indexes</title>
 
   <indexterm zone="indexes-unique">
@@ -769,7 +769,7 @@ CREATE UNIQUE INDEX <replaceable>name</replaceable> ON <replaceable>table</repla
  </sect1>
 
 
- <sect1 id="indexes-expressional">
+ <sect1 id="indexes-expressional" xreflabel="Indexes on Expressions">
   <title>Indexes on Expressions</title>
 
   <indexterm zone="indexes-expressional">
@@ -838,7 +838,7 @@ CREATE INDEX people_names ON people ((first_name || ' ' || last_name));
  </sect1>
 
 
- <sect1 id="indexes-partial">
+ <sect1 id="indexes-partial" xreflabel="Partial Indexes">
   <title>Partial Indexes</title>
 
   <indexterm zone="indexes-partial">
@@ -1118,7 +1118,7 @@ CREATE INDEX mytable_cat_data ON mytable (category, data);
  </sect1>
 
 
- <sect1 id="indexes-index-only-scans">
+ <sect1 id="indexes-index-only-scans" xreflabel="Index-Only Scans and Covering Indexes">
   <title>Index-Only Scans and Covering Indexes</title>
 
   <indexterm zone="indexes-index-only-scans">
@@ -1378,7 +1378,7 @@ SELECT target FROM tests WHERE subject = 'some-subject' AND success;
  </sect1>
 
 
- <sect1 id="indexes-opclass">
+ <sect1 id="indexes-opclass" xreflabel="Operator Classes and Operator Families">
   <title>Operator Classes and Operator Families</title>
 
   <indexterm zone="indexes-opclass">
@@ -1516,7 +1516,7 @@ SELECT am.amname AS index_method,
  </sect1>
 
 
- <sect1 id="indexes-collations">
+ <sect1 id="indexes-collations" xreflabel="Indexes and Collations">
   <title>Indexes and Collations</title>
 
   <para>
@@ -1554,7 +1554,7 @@ CREATE INDEX test1c_content_y_index ON test1c (content COLLATE "y");
  </sect1>
 
 
- <sect1 id="indexes-examine">
+ <sect1 id="indexes-examine" xreflabel="Examining Index Usage">
   <title>Examining Index Usage</title>
 
   <indexterm zone="indexes-examine">
diff --git a/doc/src/sgml/info.sgml b/doc/src/sgml/info.sgml
index 6b9f1b5d814..9f6aef4014f 100644
--- a/doc/src/sgml/info.sgml
+++ b/doc/src/sgml/info.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/info.sgml -->
 
-<sect1 id="resources">
+<sect1 id="resources" xreflabel="Further Information">
  <title>Further Information</title>
 
  <para>
diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml
index 60b4c4ae8c0..1b847d04aa7 100644
--- a/doc/src/sgml/information_schema.sgml
+++ b/doc/src/sgml/information_schema.sgml
@@ -45,7 +45,7 @@
  </note>
 
 
- <sect1 id="infoschema-schema">
+ <sect1 id="infoschema-schema" xreflabel="The Schema">
   <title>The Schema</title>
 
   <para>
@@ -67,7 +67,7 @@
   </para>
  </sect1>
 
- <sect1 id="infoschema-datatypes">
+ <sect1 id="infoschema-datatypes" xreflabel="Data Types">
   <title>Data Types</title>
 
   <para>
@@ -141,7 +141,7 @@
   </para>
  </sect1>
 
- <sect1 id="infoschema-information-schema-catalog-name">
+ <sect1 id="infoschema-information-schema-catalog-name" xreflabel="information_schema_catalog_name">
   <title><literal>information_schema_catalog_name</literal></title>
 
   <para>
@@ -178,7 +178,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-administrable-role-authorizations">
+ <sect1 id="infoschema-administrable-role-authorizations" xreflabel="administrable_role_authorizations">
   <title><literal>administrable_role_&zwsp;authorizations</literal></title>
 
   <para>
@@ -235,7 +235,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-applicable-roles">
+ <sect1 id="infoschema-applicable-roles" xreflabel="applicable_roles">
   <title><literal>applicable_roles</literal></title>
 
   <para>
@@ -297,7 +297,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-attributes">
+ <sect1 id="infoschema-attributes" xreflabel="attributes">
   <title><literal>attributes</literal></title>
 
   <para>
@@ -666,7 +666,7 @@
   </para>
  </sect1>
 
- <sect1 id="infoschema-character-sets">
+ <sect1 id="infoschema-character-sets" xreflabel="character_sets">
   <title><literal>character_sets</literal></title>
 
   <para>
@@ -824,7 +824,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-check-constraint-routine-usage">
+ <sect1 id="infoschema-check-constraint-routine-usage" xreflabel="check_constraint_routine_usage">
   <title><literal>check_constraint_routine_usage</literal></title>
 
   <para>
@@ -907,7 +907,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-check-constraints">
+ <sect1 id="infoschema-check-constraints" xreflabel="check_constraints">
   <title><literal>check_constraints</literal></title>
 
   <para>
@@ -979,7 +979,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-collations">
+ <sect1 id="infoschema-collations" xreflabel="collations">
   <title><literal>collations</literal></title>
 
   <para>
@@ -1043,7 +1043,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-collation-character-set-applicab"> <!-- max 44 characters -->
+ <sect1 id="infoschema-collation-character-set-applicab" xreflabel="collation_character_set_&zwsp;applicability">
   <title><literal>collation_character_set_&zwsp;applicability</literal></title>
 
   <para>
@@ -1128,7 +1128,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-column-column-usage">
+ <sect1 id="infoschema-column-column-usage" xreflabel="column_column_usage">
   <title><literal>column_column_usage</literal></title>
 
   <para>
@@ -1201,7 +1201,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-column-domain-usage">
+ <sect1 id="infoschema-column-domain-usage" xreflabel="column_domain_usage">
   <title><literal>column_domain_usage</literal></title>
 
   <para>
@@ -1292,7 +1292,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-column-options">
+ <sect1 id="infoschema-column-options" xreflabel="column_options">
   <title><literal>column_options</literal></title>
 
   <para>
@@ -1375,7 +1375,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-column-privileges">
+ <sect1 id="infoschema-column-privileges" xreflabel="column_privileges">
   <title><literal>column_privileges</literal></title>
 
   <para>
@@ -1486,7 +1486,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-column-udt-usage">
+ <sect1 id="infoschema-column-udt-usage" xreflabel="column_udt_usage">
   <title><literal>column_udt_usage</literal></title>
 
   <para>
@@ -1583,7 +1583,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-columns">
+ <sect1 id="infoschema-columns" xreflabel="columns">
   <title><literal>columns</literal></title>
 
   <para>
@@ -2115,7 +2115,7 @@
   </para>
  </sect1>
 
- <sect1 id="infoschema-constraint-column-usage">
+ <sect1 id="infoschema-constraint-column-usage" xreflabel="constraint_column_usage">
   <title><literal>constraint_column_usage</literal></title>
 
   <para>
@@ -2217,7 +2217,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-constraint-table-usage">
+ <sect1 id="infoschema-constraint-table-usage" xreflabel="constraint_table_usage">
   <title><literal>constraint_table_usage</literal></title>
 
   <para>
@@ -2308,7 +2308,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-data-type-privileges">
+ <sect1 id="infoschema-data-type-privileges" xreflabel="data_type_privileges">
   <title><literal>data_type_privileges</literal></title>
 
   <para>
@@ -2397,7 +2397,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-domain-constraints">
+ <sect1 id="infoschema-domain-constraints" xreflabel="domain_constraints">
   <title><literal>domain_constraints</literal></title>
 
   <para>
@@ -2498,7 +2498,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-domain-udt-usage">
+ <sect1 id="infoschema-domain-udt-usage" xreflabel="domain_udt_usage">
   <title><literal>domain_udt_usage</literal></title>
 
   <para>
@@ -2582,7 +2582,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-domains">
+ <sect1 id="infoschema-domains" xreflabel="domains">
   <title><literal>domains</literal></title>
 
   <para>
@@ -2904,7 +2904,7 @@
   </table>
  </sect1>
 
- <sect1 id="infoschema-element-types">
+ <sect1 id="infoschema-element-types" xreflabel="element_types">
   <title><literal>element_types</literal></title>
 
   <para>
@@ -3222,7 +3222,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-enabled-roles">
+ <sect1 id="infoschema-enabled-roles" xreflabel="enabled_roles">
   <title><literal>enabled_roles</literal></title>
 
   <para>
@@ -3273,7 +3273,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-foreign-data-wrapper-options">
+ <sect1 id="infoschema-foreign-data-wrapper-options" xreflabel="foreign_data_wrapper_options">
   <title><literal>foreign_data_wrapper_options</literal></title>
 
   <para>
@@ -3339,7 +3339,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-foreign-data-wrappers">
+ <sect1 id="infoschema-foreign-data-wrappers" xreflabel="foreign_data_wrappers">
   <title><literal>foreign_data_wrappers</literal></title>
 
   <para>
@@ -3414,7 +3414,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-foreign-server-options">
+ <sect1 id="infoschema-foreign-server-options" xreflabel="foreign_server_options">
   <title><literal>foreign_server_options</literal></title>
 
   <para>
@@ -3479,7 +3479,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-foreign-servers">
+ <sect1 id="infoschema-foreign-servers" xreflabel="foreign_servers">
   <title><literal>foreign_servers</literal></title>
 
   <para>
@@ -3572,7 +3572,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-foreign-table-options">
+ <sect1 id="infoschema-foreign-table-options" xreflabel="foreign_table_options">
   <title><literal>foreign_table_options</literal></title>
 
   <para>
@@ -3646,7 +3646,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-foreign-tables">
+ <sect1 id="infoschema-foreign-tables" xreflabel="foreign_tables">
   <title><literal>foreign_tables</literal></title>
 
   <para>
@@ -3720,7 +3720,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-key-column-usage">
+ <sect1 id="infoschema-key-column-usage" xreflabel="key_column_usage">
   <title><literal>key_column_usage</literal></title>
 
   <para>
@@ -3838,7 +3838,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-parameters">
+ <sect1 id="infoschema-parameters" xreflabel="parameters">
   <title><literal>parameters</literal></title>
 
   <para>
@@ -4171,7 +4171,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-referential-constraints">
+ <sect1 id="infoschema-referential-constraints" xreflabel="referential_constraints">
   <title><literal>referential_constraints</literal></title>
 
   <para>
@@ -4295,7 +4295,7 @@ ORDER BY c.ordinal_position;
 
  </sect1>
 
- <sect1 id="infoschema-role-column-grants">
+ <sect1 id="infoschema-role-column-grants" xreflabel="role_column_grants">
   <title><literal>role_column_grants</literal></title>
 
   <para>
@@ -4402,7 +4402,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-role-routine-grants">
+ <sect1 id="infoschema-role-routine-grants" xreflabel="role_routine_grants">
   <title><literal>role_routine_grants</literal></title>
 
   <para>
@@ -4525,7 +4525,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-role-table-grants">
+ <sect1 id="infoschema-role-table-grants" xreflabel="role_table_grants">
   <title><literal>role_table_grants</literal></title>
 
   <para>
@@ -4638,7 +4638,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-role-udt-grants">
+ <sect1 id="infoschema-role-udt-grants" xreflabel="role_udt_grants">
   <title><literal>role_udt_grants</literal></title>
 
   <para>
@@ -4736,7 +4736,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-role-usage-grants">
+ <sect1 id="infoschema-role-usage-grants" xreflabel="role_usage_grants">
   <title><literal>role_usage_grants</literal></title>
 
   <para>
@@ -4842,7 +4842,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-routine-column-usage">
+ <sect1 id="infoschema-routine-column-usage" xreflabel="routine_column_usage">
   <title><literal>routine_column_usage</literal></title>
 
   <para>
@@ -4964,7 +4964,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-routine-privileges">
+ <sect1 id="infoschema-routine-privileges" xreflabel="routine_privileges">
   <title><literal>routine_privileges</literal></title>
 
   <para>
@@ -5083,7 +5083,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-routine-routine-usage">
+ <sect1 id="infoschema-routine-routine-usage" xreflabel="routine_routine_usage">
   <title><literal>routine_routine_usage</literal></title>
 
   <para>
@@ -5182,7 +5182,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-routine-sequence-usage">
+ <sect1 id="infoschema-routine-sequence-usage" xreflabel="routine_sequence_usage">
   <title><literal>routine_sequence_usage</literal></title>
 
   <para>
@@ -5295,7 +5295,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-routine-table-usage">
+ <sect1 id="infoschema-routine-table-usage" xreflabel="routine_table_usage">
   <title><literal>routine_table_usage</literal></title>
 
   <para>
@@ -5406,7 +5406,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-routines">
+ <sect1 id="infoschema-routines" xreflabel="routines">
   <title><literal>routines</literal></title>
 
   <para>
@@ -6215,7 +6215,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-schemata">
+ <sect1 id="infoschema-schemata" xreflabel="schemata">
   <title><literal>schemata</literal></title>
 
   <para>
@@ -6306,7 +6306,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-sequences">
+ <sect1 id="infoschema-sequences" xreflabel="sequences">
   <title><literal>sequences</literal></title>
 
   <para>
@@ -6460,7 +6460,7 @@ ORDER BY c.ordinal_position;
   </para>
  </sect1>
 
- <sect1 id="infoschema-sql-features">
+ <sect1 id="infoschema-sql-features" xreflabel="sql_features">
   <title><structname>sql_features</structname></title>
 
   <para>
@@ -6555,7 +6555,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-sql-implementation-info">
+ <sect1 id="infoschema-sql-implementation-info" xreflabel="sql_implementation_info">
   <title><structname>sql_implementation_info</structname></title>
 
   <para>
@@ -6637,7 +6637,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-sql-parts">
+ <sect1 id="infoschema-sql-parts" xreflabel="sql_parts">
   <title><structname>sql_parts</structname></title>
 
   <para>
@@ -6713,7 +6713,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-sql-sizing">
+ <sect1 id="infoschema-sql-sizing" xreflabel="sql_sizing">
   <title><structname>sql_sizing</structname></title>
 
   <para>
@@ -6784,7 +6784,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-table-constraints">
+ <sect1 id="infoschema-table-constraints" xreflabel="table_constraints">
   <title><literal>table_constraints</literal></title>
 
   <para>
@@ -6916,7 +6916,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-table-privileges">
+ <sect1 id="infoschema-table-privileges" xreflabel="table_privileges">
   <title><literal>table_privileges</literal></title>
 
   <para>
@@ -7025,7 +7025,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-tables">
+ <sect1 id="infoschema-tables" xreflabel="tables">
   <title><literal>tables</literal></title>
 
   <para>
@@ -7172,7 +7172,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-transforms">
+ <sect1 id="infoschema-transforms" xreflabel="transforms">
   <title><literal>transforms</literal></title>
 
   <para>
@@ -7276,7 +7276,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-triggered-update-columns">
+ <sect1 id="infoschema-triggered-update-columns" xreflabel="triggered_update_columns">
   <title><literal>triggered_update_columns</literal></title>
 
   <para>
@@ -7372,7 +7372,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-triggers">
+ <sect1 id="infoschema-triggers" xreflabel="triggers">
   <title><literal>triggers</literal></title>
 
   <para>
@@ -7613,7 +7613,7 @@ ORDER BY c.ordinal_position;
   </note>
  </sect1>
 
- <sect1 id="infoschema-udt-privileges">
+ <sect1 id="infoschema-udt-privileges" xreflabel="udt_privileges">
   <title><literal>udt_privileges</literal></title>
 
   <para>
@@ -7708,7 +7708,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-usage-privileges">
+ <sect1 id="infoschema-usage-privileges" xreflabel="usage_privileges">
   <title><literal>usage_privileges</literal></title>
 
   <para>
@@ -7827,7 +7827,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-user-defined-types">
+ <sect1 id="infoschema-user-defined-types" xreflabel="user_defined_types">
   <title><literal>user_defined_types</literal></title>
 
   <para>
@@ -8130,7 +8130,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-user-mapping-options">
+ <sect1 id="infoschema-user-mapping-options" xreflabel="user_mapping_options">
   <title><literal>user_mapping_options</literal></title>
 
   <para>
@@ -8212,7 +8212,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-user-mappings">
+ <sect1 id="infoschema-user-mappings" xreflabel="user_mappings">
   <title><literal>user_mappings</literal></title>
 
   <para>
@@ -8271,7 +8271,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-view-column-usage">
+ <sect1 id="infoschema-view-column-usage" xreflabel="view_column_usage">
   <title><literal>view_column_usage</literal></title>
 
   <para>
@@ -8374,7 +8374,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-view-routine-usage">
+ <sect1 id="infoschema-view-routine-usage" xreflabel="view_routine_usage">
   <title><literal>view_routine_usage</literal></title>
 
   <para>
@@ -8458,7 +8458,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-view-table-usage">
+ <sect1 id="infoschema-view-table-usage" xreflabel="view_table_usage">
   <title><literal>view_table_usage</literal></title>
 
   <para>
@@ -8550,7 +8550,7 @@ ORDER BY c.ordinal_position;
   </table>
  </sect1>
 
- <sect1 id="infoschema-views">
+ <sect1 id="infoschema-views" xreflabel="views">
   <title><literal>views</literal></title>
 
   <para>
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index fe8d73e1f8c..caa818a61f3 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -15,7 +15,7 @@
   and see <xref linkend="install-binaries" /> instead.
  </para>
 
- <sect1 id="install-requirements">
+ <sect1 id="install-requirements" xreflabel="Requirements">
   <title>Requirements</title>
 
   <para>
@@ -357,7 +357,7 @@
   </para>
  </sect1>
 
- <sect1 id="install-getsource">
+ <sect1 id="install-getsource" xreflabel="Getting the Source">
   <title>Getting the Source</title>
 
   <para>
@@ -383,10 +383,10 @@
   </para>
  </sect1>
 
- <sect1 id="install-make">
+ <sect1 id="install-make" xreflabel="Building and Installation with Autoconf and Make">
   <title>Building and Installation with Autoconf and Make</title>
 
- <sect2 id="install-short-make">
+ <sect2 id="install-short-make" xreflabel="Short Version">
   <title>Short Version</title>
 
   <para>
@@ -410,7 +410,7 @@ su - postgres
  </sect2>
 
 
- <sect2 id="install-procedure-make">
+ <sect2 id="install-procedure-make" xreflabel="Installation Procedure">
   <title>Installation Procedure</title>
 
   <procedure>
@@ -661,7 +661,7 @@ build-postgresql:
   </para>
   </sect2>
 
-  <sect2 id="configure-options">
+  <sect2 id="configure-options" xreflabel="configure Options">
    <title><filename>configure</filename> Options</title>
 
    <indexterm zone="configure-options">
@@ -676,7 +676,7 @@ build-postgresql:
     the standard Autoconf documentation.
    </para>
 
-   <sect3 id="configure-options-locations">
+   <sect3 id="configure-options-locations" xreflabel="Installation Locations">
     <title>Installation Locations</title>
 
      <para>
@@ -866,7 +866,7 @@ build-postgresql:
 
    </sect3>
 
-   <sect3 id="configure-options-features">
+   <sect3 id="configure-options-features" xreflabel="PostgreSQL Features">
     <title><productname>PostgreSQL</productname> Features</title>
 
     <para>
@@ -1251,7 +1251,7 @@ build-postgresql:
 
    </sect3>
 
-   <sect3 id="configure-options-anti-features">
+   <sect3 id="configure-options-anti-features" xreflabel="Anti-Features">
     <title>Anti-Features</title>
 
     <para>
@@ -1319,7 +1319,7 @@ build-postgresql:
 
    </sect3>
 
-   <sect3 id="configure-options-build-process">
+   <sect3 id="configure-options-build-process" xreflabel="Build Process Details">
     <title>Build Process Details</title>
 
      <variablelist>
@@ -1433,7 +1433,7 @@ build-postgresql:
 
    </sect3>
 
-   <sect3 id="configure-options-misc">
+   <sect3 id="configure-options-misc" xreflabel="Miscellaneous">
     <title>Miscellaneous</title>
 
     <para>
@@ -1535,7 +1535,7 @@ build-postgresql:
 
    </sect3>
 
-   <sect3 id="configure-options-devel">
+   <sect3 id="configure-options-devel" xreflabel="Developer Options">
     <title>Developer Options</title>
 
     <para>
@@ -1715,7 +1715,7 @@ build-postgresql:
 
   </sect2>
 
-  <sect2 id="configure-envvars">
+  <sect2 id="configure-envvars" xreflabel="configure Environment Variables">
    <title><filename>configure</filename> Environment Variables</title>
 
    <indexterm zone="configure-envvars">
@@ -1999,10 +1999,10 @@ build-postgresql:
   </sect2>
  </sect1>
 
- <sect1 id="install-meson">
+ <sect1 id="install-meson" xreflabel="Building and Installation with Meson">
   <title>Building and Installation with Meson</title>
 
- <sect2 id="install-short-meson">
+ <sect2 id="install-short-meson" xreflabel="Short Version">
   <title>Short Version</title>
 
   <para>
@@ -2026,7 +2026,7 @@ su - postgres
   </para>
  </sect2>
 
- <sect2 id="install-procedure-meson">
+ <sect2 id="install-procedure-meson" xreflabel="Installation Procedure">
   <title>Installation Procedure</title>
 
   <procedure>
@@ -2204,7 +2204,7 @@ ninja install
   </formalpara>
   </sect2>
 
-  <sect2 id="meson-options">
+  <sect2 id="meson-options" xreflabel="meson setup Options">
    <title><literal>meson setup</literal> Options</title>
 
    <para>
@@ -2217,7 +2217,7 @@ ninja install
     setup</command> as well.
    </para>
 
-   <sect3 id="meson-options-locations">
+   <sect3 id="meson-options-locations" xreflabel="Installation Locations">
     <title>Installation Locations</title>
 
      <para>
@@ -2356,7 +2356,7 @@ ninja install
      </note>
     </sect3>
 
-   <sect3 id="meson-options-features">
+   <sect3 id="meson-options-features" xreflabel="PostgreSQL Features">
     <title><productname>PostgreSQL</productname> Features</title>
 
     <para>
@@ -2712,7 +2712,7 @@ ninja install
     </variablelist>
    </sect3>
 
-   <sect3 id="meson-options-anti-features">
+   <sect3 id="meson-options-anti-features" xreflabel="Anti-Features">
     <title>Anti-Features</title>
 
     <variablelist>
@@ -2759,7 +2759,7 @@ ninja install
     </variablelist>
    </sect3>
 
-   <sect3 id="meson-options-build-process">
+   <sect3 id="meson-options-build-process" xreflabel="Build Process Details">
     <title>Build Process Details</title>
 
     <variablelist>
@@ -2929,7 +2929,7 @@ ninja install
     </variablelist>
    </sect3>
 
-   <sect3 id="meson-options-docs">
+   <sect3 id="meson-options-docs" xreflabel="Documentation">
     <title>Documentation</title>
 
     <para>
@@ -2974,7 +2974,7 @@ ninja install
     </variablelist>
    </sect3>
 
-   <sect3 id="meson-options-misc">
+   <sect3 id="meson-options-misc" xreflabel="Miscellaneous">
     <title>Miscellaneous</title>
 
     <variablelist>
@@ -3057,7 +3057,7 @@ ninja install
     </variablelist>
    </sect3>
 
-   <sect3 id="meson-options-devel">
+   <sect3 id="meson-options-devel" xreflabel="Developer Options">
     <title>Developer Options</title>
 
     <para>
@@ -3248,7 +3248,7 @@ ninja install
    </sect3>
   </sect2>
 
-  <sect2 id="targets-meson">
+  <sect2 id="targets-meson" xreflabel="meson Build Targets">
    <title><literal>meson</literal> Build Targets</title>
 
    <para>
@@ -3264,10 +3264,10 @@ ninja install
 
  </sect1>
 
- <sect1 id="install-post">
+ <sect1 id="install-post" xreflabel="Post-Installation Setup">
   <title>Post-Installation Setup</title>
 
-  <sect2 id="install-post-shlibs">
+  <sect2 id="install-post-shlibs" xreflabel="Shared Libraries">
    <title>Shared Libraries</title>
 
    <indexterm>
@@ -3355,7 +3355,7 @@ libpq.so.2.1: cannot open shared object file: No such file or directory
    </para>
   </sect2>
 
-  <sect2 id="install-post-env-vars">
+  <sect2 id="install-post-env-vars" xreflabel="Environment Variables">
    <title>Environment Variables</title>
 
    <indexterm>
@@ -3412,7 +3412,7 @@ export MANPATH
   </sect2>
  </sect1>
 
- <sect1 id="supported-platforms">
+ <sect1 id="supported-platforms" xreflabel="Supported Platforms">
   <title>Supported Platforms</title>
 
   <para>
@@ -3467,7 +3467,7 @@ export MANPATH
   </para>
  </sect1>
 
- <sect1 id="installation-platform-notes">
+ <sect1 id="installation-platform-notes" xreflabel="Platform-Specific Notes">
   <title>Platform-Specific Notes</title>
 
   <para>
@@ -3484,7 +3484,7 @@ export MANPATH
    installation issues.
   </para>
 
-  <sect2 id="installation-notes-cygwin">
+  <sect2 id="installation-notes-cygwin" xreflabel="Cygwin">
    <title>Cygwin</title>
 
    <indexterm zone="installation-notes-cygwin">
@@ -3585,7 +3585,7 @@ make MAX_CONNECTIONS=5 check
    </para>
   </sect2>
 
-  <sect2 id="installation-notes-macos">
+  <sect2 id="installation-notes-macos" xreflabel="macOS">
    <title>macOS</title>
 
    <indexterm zone="installation-notes-macos">
@@ -3660,7 +3660,7 @@ xcrun --show-sdk-path
    </para>
   </sect2>
 
-  <sect2 id="installation-notes-mingw">
+  <sect2 id="installation-notes-mingw" xreflabel="MinGW">
    <title>MinGW</title>
 
    <indexterm zone="installation-notes-mingw">
@@ -3675,7 +3675,7 @@ xcrun --show-sdk-path
     to install any prerequisite packages.
    </para>
 
-   <sect3 id="mingw-crash-dumps">
+   <sect3 id="mingw-crash-dumps" xreflabel="Collecting Crash Dumps">
     <title>Collecting Crash Dumps</title>
 
     <para>
@@ -3692,7 +3692,7 @@ xcrun --show-sdk-path
    </sect3>
   </sect2>
 
-  <sect2 id="installation-notes-solaris">
+  <sect2 id="installation-notes-solaris" xreflabel="Solaris">
    <title>Solaris</title>
 
    <indexterm zone="installation-notes-solaris">
@@ -3705,7 +3705,7 @@ xcrun --show-sdk-path
     operating system, the fewer issues you will experience.
    </para>
 
-   <sect3 id="installation-notes-solaris-req-tools">
+   <sect3 id="installation-notes-solaris-req-tools" xreflabel="Required Tools">
     <title>Required Tools</title>
 
     <para>
@@ -3719,7 +3719,7 @@ xcrun --show-sdk-path
     </para>
    </sect3>
 
-   <sect3 id="installation-notes-solaris-configure-complains">
+   <sect3 id="installation-notes-solaris-configure-complains" xreflabel="configure Complains About a Failed Test Program">
     <title>configure Complains About a Failed Test Program</title>
 
     <para>
@@ -3738,7 +3738,7 @@ configure ... LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
     </para>
    </sect3>
 
-   <sect3 id="installation-notes-solaris-using-dtrace">
+   <sect3 id="installation-notes-solaris-using-dtrace" xreflabel="Using DTrace for Tracing PostgreSQL">
     <title>Using DTrace for Tracing PostgreSQL</title>
 
     <para>
@@ -3748,7 +3748,7 @@ configure ... LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
    </sect3>
   </sect2>
 
-  <sect2 id="installation-notes-visual-studio">
+  <sect2 id="installation-notes-visual-studio" xreflabel="Visual Studio">
    <title>Visual Studio</title>
 
    <indexterm zone="installation-notes-visual-studio">
@@ -3825,7 +3825,7 @@ configure ... LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
     complete command-line build environment.
    </para>
 
-   <sect3 id="windows-requirements">
+   <sect3 id="windows-requirements" xreflabel="Requirements">
     <title>Requirements</title>
     <para>
      The following additional products are required to build
@@ -3985,7 +3985,7 @@ configure ... LDFLAGS="-R /usr/sfw/lib:/opt/sfw/lib:/usr/local/lib"
     </para>
    </sect3>
 
-   <sect3 id="windows-crash-dumps">
+   <sect3 id="windows-crash-dumps" xreflabel="Collecting Crash Dumps">
     <title>Collecting Crash Dumps</title>
 
     <para>
diff --git a/doc/src/sgml/intagg.sgml b/doc/src/sgml/intagg.sgml
index 29e74ce146c..f7d2076a079 100644
--- a/doc/src/sgml/intagg.sgml
+++ b/doc/src/sgml/intagg.sgml
@@ -15,7 +15,7 @@
   the built-in functions.
  </para>
 
- <sect2 id="intagg-functions">
+ <sect2 id="intagg-functions" xreflabel="Functions">
   <title>Functions</title>
 
  <indexterm>
@@ -50,7 +50,7 @@
 
  </sect2>
 
- <sect2 id="intagg-samples">
+ <sect2 id="intagg-samples" xreflabel="Sample Uses">
   <title>Sample Uses</title>
 
   <para>
diff --git a/doc/src/sgml/intarray.sgml b/doc/src/sgml/intarray.sgml
index c72d49b01d8..26c812a5b79 100644
--- a/doc/src/sgml/intarray.sgml
+++ b/doc/src/sgml/intarray.sgml
@@ -30,7 +30,7 @@
   on the current database.
  </para>
 
- <sect2 id="intarray-funcs-ops">
+ <sect2 id="intarray-funcs-ops" xreflabel="intarray Functions and Operators">
   <title><filename>intarray</filename> Functions and Operators</title>
 
   <para>
@@ -391,7 +391,7 @@
   </para>
  </sect2>
 
- <sect2 id="intarray-index">
+ <sect2 id="intarray-index" xreflabel="Index Support">
   <title>Index Support</title>
 
   <para>
@@ -443,7 +443,7 @@
   </para>
  </sect2>
 
- <sect2 id="intarray-example">
+ <sect2 id="intarray-example" xreflabel="Example">
   <title>Example</title>
 
 <programlisting>
@@ -464,7 +464,7 @@ SELECT message.mid FROM message WHERE message.sections @@ '1&amp;2'::query_int;
 </programlisting>
  </sect2>
 
- <sect2 id="intarray-benchmark">
+ <sect2 id="intarray-benchmark" xreflabel="Benchmark">
   <title>Benchmark</title>
 
   <para>
@@ -488,7 +488,7 @@ psql -c "CREATE EXTENSION intarray" TEST
   </para>
  </sect2>
 
- <sect2 id="intarray-Authors">
+ <sect2 id="intarray-Authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/intro.sgml b/doc/src/sgml/intro.sgml
index fec72481b54..cf6340c0643 100644
--- a/doc/src/sgml/intro.sgml
+++ b/doc/src/sgml/intro.sgml
@@ -81,7 +81,7 @@
   </itemizedlist>
  </para>
 
- <sect1 id="intro-whatis">
+ <sect1 id="intro-whatis" xreflabel=" What Is PostgreSQL?">
   <title> What Is <productname>PostgreSQL</productname>?</title>
 
   <para>
diff --git a/doc/src/sgml/isn.sgml b/doc/src/sgml/isn.sgml
index d0ab06ca8d0..37dae676f54 100644
--- a/doc/src/sgml/isn.sgml
+++ b/doc/src/sgml/isn.sgml
@@ -27,7 +27,7 @@
   on the current database.
  </para>
 
- <sect2 id="isn-data-types">
+ <sect2 id="isn-data-types" xreflabel="Data Types">
   <title>Data Types</title>
 
   <para>
@@ -156,7 +156,7 @@
   </para>
  </sect2>
 
- <sect2 id="isn-casts">
+ <sect2 id="isn-casts" xreflabel="Casts">
   <title>Casts</title>
 
   <para>
@@ -224,7 +224,7 @@
   </para>
  </sect2>
 
- <sect2 id="isn-funcs-ops">
+ <sect2 id="isn-funcs-ops" xreflabel="Functions and Operators">
   <title>Functions and Operators</title>
 
   <para>
@@ -303,7 +303,7 @@
   </table>
  </sect2>
 
- <sect2 id="isn-configuration-parameters">
+ <sect2 id="isn-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
   <variablelist>
@@ -360,7 +360,7 @@
   </para>
  </sect2>
 
- <sect2 id="isn-examples">
+ <sect2 id="isn-examples" xreflabel="Examples">
   <title>Examples</title>
 
 <programlisting>
@@ -404,7 +404,7 @@ SELECT isbn13(id) FROM test;
 </programlisting>
  </sect2>
 
- <sect2 id="isn-bibliography">
+ <sect2 id="isn-bibliography" xreflabel="Bibliography">
   <title>Bibliography</title>
 
   <para>
@@ -432,7 +432,7 @@ SELECT isbn13(id) FROM test;
   </para>
  </sect2>
 
- <sect2 id="isn-author">
+ <sect2 id="isn-author" xreflabel="Author">
   <title>Author</title>
   <para>
    Germ&aacute;n M&eacute;ndez Bravo (Kronuz), 2004&ndash;2006
diff --git a/doc/src/sgml/jit.sgml b/doc/src/sgml/jit.sgml
index 44e18bf1a6f..9a10c3bc5e4 100644
--- a/doc/src/sgml/jit.sgml
+++ b/doc/src/sgml/jit.sgml
@@ -17,7 +17,7 @@
   configured in <productname>PostgreSQL</productname>.
  </para>
 
- <sect1 id="jit-reason">
+ <sect1 id="jit-reason" xreflabel="What Is JIT compilation?">
   <title>What Is <acronym>JIT</acronym> compilation?</title>
 
   <para>
@@ -43,7 +43,7 @@
    See <filename>src/backend/jit/README</filename> for further details.
   </para>
 
-  <sect2 id="jit-accelerated-operations">
+  <sect2 id="jit-accelerated-operations" xreflabel="JIT Accelerated Operations">
    <title><acronym>JIT</acronym> Accelerated Operations</title>
    <para>
     Currently <productname>PostgreSQL</productname>'s <acronym>JIT</acronym>
@@ -64,7 +64,7 @@
    </para>
   </sect2>
 
-  <sect2 id="jit-inlining">
+  <sect2 id="jit-inlining" xreflabel="Inlining">
    <title>Inlining</title>
    <para>
     <productname>PostgreSQL</productname> is very extensible and allows new
@@ -78,7 +78,7 @@
    </para>
   </sect2>
 
-  <sect2 id="jit-optimization">
+  <sect2 id="jit-optimization" xreflabel="Optimization">
    <title>Optimization</title>
    <para>
     <productname>LLVM</productname> has support for optimizing generated
@@ -92,7 +92,7 @@
 
  </sect1>
 
- <sect1 id="jit-decision">
+ <sect1 id="jit-decision" xreflabel="When to JIT?">
   <title>When to <acronym>JIT</acronym>?</title>
 
   <para>
@@ -212,10 +212,10 @@ SET
   </para>
  </sect1>
 
- <sect1 id="jit-extensibility">
+ <sect1 id="jit-extensibility" xreflabel="Extensibility">
   <title>Extensibility</title>
 
-  <sect2 id="jit-extensibility-bitcode">
+  <sect2 id="jit-extensibility-bitcode" xreflabel="Inlining Support for Extensions">
    <title>Inlining Support for Extensions</title>
    <para>
     <productname>PostgreSQL</productname>'s <acronym>JIT</acronym>
@@ -246,7 +246,7 @@ SET
    </para>
   </sect2>
 
-  <sect2 id="jit-pluggable">
+  <sect2 id="jit-pluggable" xreflabel="Pluggable JIT Providers">
    <title>Pluggable <acronym>JIT</acronym> Providers</title>
 
    <para>
@@ -259,7 +259,7 @@ SET
     <xref linkend="guc-jit-provider"/>.
    </para>
 
-   <sect3 id="jit-pluggable-provider-interface">
+   <sect3 id="jit-pluggable-provider-interface" xreflabel="JIT Provider Interface">
     <title><acronym>JIT</acronym> Provider Interface</title>
     <para>
      A <acronym>JIT</acronym> provider is loaded by dynamically loading the
diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml
index 206eadb8f7b..837579a87e0 100644
--- a/doc/src/sgml/json.sgml
+++ b/doc/src/sgml/json.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/json.sgml -->
 
-<sect1 id="datatype-json">
+<sect1 id="datatype-json" xreflabel="JSON Types">
  <title><acronym>JSON</acronym> Types</title>
 
  <indexterm zone="datatype-json">
@@ -168,7 +168,7 @@
      </tgroup>
    </table>
 
- <sect2 id="json-keys-elements">
+ <sect2 id="json-keys-elements" xreflabel="JSON Input and Output Syntax">
   <title>JSON Input and Output Syntax</title>
   <para>
    The input/output syntax for the JSON data types is as specified in
@@ -234,7 +234,7 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb;
   </para>
  </sect2>
 
- <sect2 id="json-doc-design">
+ <sect2 id="json-doc-design" xreflabel="Designing JSON Documents">
   <title>Designing JSON Documents</title>
   <para>
    Representing data as JSON can be considerably more flexible than
@@ -263,7 +263,7 @@ SELECT '{"reading": 1.230e-5}'::json, '{"reading": 1.230e-5}'::jsonb;
   </para>
  </sect2>
 
- <sect2 id="json-containment">
+ <sect2 id="json-containment" xreflabel="jsonb Containment and Existence">
   <title><type>jsonb</type> Containment and Existence</title>
   <indexterm>
     <primary>jsonb</primary>
@@ -399,7 +399,7 @@ SELECT doc-&gt;'site_name' FROM websites
   </para>
  </sect2>
 
- <sect2 id="json-indexing">
+ <sect2 id="json-indexing" xreflabel="jsonb Indexing">
   <title><type>jsonb</type> Indexing</title>
   <indexterm>
     <primary>jsonb</primary>
@@ -613,7 +613,7 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @@ '$.tags[*] == "qui"';
   </para>
  </sect2>
 
- <sect2 id="jsonb-subscripting">
+ <sect2 id="jsonb-subscripting" xreflabel="jsonb Subscripting">
   <title><type>jsonb</type> Subscripting</title>
   <para>
    The <type>jsonb</type> data type supports array-style subscripting expressions
@@ -712,7 +712,7 @@ UPDATE table_name SET jsonb_field[1]['a'] = '1';
   </para>
  </sect2>
 
- <sect2 id="datatype-json-transforms">
+ <sect2 id="datatype-json-transforms" xreflabel="Transforms">
   <title>Transforms</title>
 
   <para>
@@ -740,7 +740,7 @@ UPDATE table_name SET jsonb_field[1]['a'] = '1';
   </para>
  </sect2>
 
- <sect2 id="datatype-jsonpath">
+ <sect2 id="datatype-jsonpath" xreflabel="jsonpath Type">
   <title>jsonpath Type</title>
 
   <indexterm zone="datatype-jsonpath">
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 7d05938feda..97b94755d5d 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -46,7 +46,7 @@
   and must link with the <application>libpq</application> library.
  </para>
 
- <sect1 id="libpq-connect">
+ <sect1 id="libpq-connect" xreflabel="Database Connection Control Functions">
   <title>Database Connection Control Functions</title>
 
   <para>
@@ -933,7 +933,7 @@ PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void);
    </variablelist>
   </para>
 
-  <sect2 id="libpq-connstring">
+  <sect2 id="libpq-connstring" xreflabel="Connection Strings">
    <title>Connection Strings</title>
 
    <indexterm zone="libpq-connstring">
@@ -954,7 +954,7 @@ PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void);
     as further described below.
    </para>
 
-   <sect3 id="libpq-connstring-keyword-value">
+   <sect3 id="libpq-connstring-keyword-value" xreflabel="Keyword/Value Connection Strings">
     <title>Keyword/Value Connection Strings</title>
 
    <para>
@@ -982,7 +982,7 @@ host=localhost port=5432 dbname=mydb connect_timeout=10
    </para>
    </sect3>
 
-   <sect3 id="libpq-connstring-uris">
+   <sect3 id="libpq-connstring-uris" xreflabel="Connection URIs">
     <title>Connection URIs</title>
 
    <para>
@@ -1079,7 +1079,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
    </para>
    </sect3>
 
-   <sect3 id="libpq-multiple-hosts">
+   <sect3 id="libpq-multiple-hosts" xreflabel="Specifying Multiple Hosts">
      <title>Specifying Multiple Hosts</title>
 
      <para>
@@ -1122,7 +1122,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
    </sect3>
   </sect2>
 
-  <sect2 id="libpq-paramkeywords">
+  <sect2 id="libpq-paramkeywords" xreflabel="Parameter Key Words">
    <title>Parameter Key Words</title>
 
    <para>
@@ -2573,7 +2573,7 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
   </sect2>
  </sect1>
 
- <sect1 id="libpq-status">
+ <sect1 id="libpq-status" xreflabel="Connection Status Functions">
   <title>Connection Status Functions</title>
 
   <para>
@@ -3342,7 +3342,7 @@ void *PQgetssl(const PGconn *conn);
 
  </sect1>
 
- <sect1 id="libpq-exec">
+ <sect1 id="libpq-exec" xreflabel="Command Execution Functions">
   <title>Command Execution Functions</title>
 
   <para>
@@ -3351,7 +3351,7 @@ void *PQgetssl(const PGconn *conn);
    SQL queries and commands.
   </para>
 
-  <sect2 id="libpq-exec-main">
+  <sect2 id="libpq-exec-main" xreflabel="Main Functions">
    <title>Main Functions</title>
 
    <para>
@@ -4383,7 +4383,7 @@ void PQclear(PGresult *res);
    </para>
   </sect2>
 
-  <sect2 id="libpq-exec-select-info">
+  <sect2 id="libpq-exec-select-info" xreflabel="Retrieving Query Result Information">
    <title>Retrieving Query Result Information</title>
 
    <para>
@@ -4829,7 +4829,7 @@ typedef struct
    </variablelist>
   </sect2>
 
-  <sect2 id="libpq-exec-nonselect">
+  <sect2 id="libpq-exec-nonselect" xreflabel="Retrieving Other Result Information">
    <title>Retrieving Other Result Information</title>
 
    <para>
@@ -4931,7 +4931,7 @@ char *PQoidStatus(const PGresult *res);
 
   </sect2>
 
-  <sect2 id="libpq-exec-escape-string">
+  <sect2 id="libpq-exec-escape-string" xreflabel="Escaping Strings for Inclusion in SQL Commands">
    <title>Escaping Strings for Inclusion in SQL Commands</title>
 
    <indexterm zone="libpq-exec-escape-string">
@@ -5257,7 +5257,7 @@ unsigned char *PQunescapeBytea(const unsigned char *from, size_t *to_length);
 
  </sect1>
 
- <sect1 id="libpq-async">
+ <sect1 id="libpq-async" xreflabel="Asynchronous Command Processing">
   <title>Asynchronous Command Processing</title>
 
   <indexterm zone="libpq-async">
@@ -5796,7 +5796,7 @@ int PQflush(PGconn *conn);
 
  </sect1>
 
- <sect1 id="libpq-pipeline-mode">
+ <sect1 id="libpq-pipeline-mode" xreflabel="Pipeline Mode">
   <title>Pipeline Mode</title>
 
   <indexterm zone="libpq-pipeline-mode">
@@ -5844,7 +5844,7 @@ int PQflush(PGconn *conn);
    <xref linkend="protocol-flow-pipelining"/>.
   </para>
 
-  <sect2 id="libpq-pipeline-using">
+  <sect2 id="libpq-pipeline-using" xreflabel="Using Pipeline Mode">
    <title>Using Pipeline Mode</title>
 
    <para>
@@ -5893,7 +5893,7 @@ int PQflush(PGconn *conn);
     </para>
    </note>
 
-   <sect3 id="libpq-pipeline-sending">
+   <sect3 id="libpq-pipeline-sending" xreflabel="Issuing Queries">
     <title>Issuing Queries</title>
 
     <para>
@@ -5941,7 +5941,7 @@ int PQflush(PGconn *conn);
     </para>
    </sect3>
 
-   <sect3 id="libpq-pipeline-results">
+   <sect3 id="libpq-pipeline-results" xreflabel="Processing Results">
     <title>Processing Results</title>
 
     <para>
@@ -5997,7 +5997,7 @@ int PQflush(PGconn *conn);
 
    </sect3>
 
-   <sect3 id="libpq-pipeline-errors">
+   <sect3 id="libpq-pipeline-errors" xreflabel="Error Handling">
     <title>Error Handling</title>
 
     <para>
@@ -6047,7 +6047,7 @@ int PQflush(PGconn *conn);
     </note>
    </sect3>
 
-   <sect3 id="libpq-pipeline-interleave">
+   <sect3 id="libpq-pipeline-interleave" xreflabel="Interleaving Result Processing and Query Dispatch">
     <title>Interleaving Result Processing and Query Dispatch</title>
 
     <para>
@@ -6080,7 +6080,7 @@ int PQflush(PGconn *conn);
    </sect3>
   </sect2>
 
-  <sect2 id="libpq-pipeline-functions">
+  <sect2 id="libpq-pipeline-functions" xreflabel="Functions Associated with Pipeline Mode">
    <title>Functions Associated with Pipeline Mode</title>
 
    <variablelist>
@@ -6269,7 +6269,7 @@ int PQsendFlushRequest(PGconn *conn);
    </variablelist>
   </sect2>
 
-  <sect2 id="libpq-pipeline-tips">
+  <sect2 id="libpq-pipeline-tips" xreflabel="When to Use Pipeline Mode">
    <title>When to Use Pipeline Mode</title>
 
    <para>
@@ -6327,7 +6327,7 @@ UPDATE mytable SET x = x + 1 WHERE id = 42;
  </sect1>
 
  <!-- keep this not-too-apropos sect1 ID for stability of doc URLs -->
- <sect1 id="libpq-single-row-mode">
+ <sect1 id="libpq-single-row-mode" xreflabel="Retrieving Query Results in Chunks">
   <title>Retrieving Query Results in Chunks</title>
 
   <indexterm zone="libpq-single-row-mode">
@@ -6464,7 +6464,7 @@ int PQsetChunkedRowsMode(PGconn *conn, int chunkSize);
 
  </sect1>
 
- <sect1 id="libpq-cancel">
+ <sect1 id="libpq-cancel" xreflabel="Canceling Queries in Progress">
   <title>Canceling Queries in Progress</title>
 
   <indexterm zone="libpq-cancel">
@@ -6474,7 +6474,7 @@ int PQsetChunkedRowsMode(PGconn *conn, int chunkSize);
    <primary>query cancellation</primary>
   </indexterm>
 
-  <sect2 id="libpq-cancel-functions">
+  <sect2 id="libpq-cancel-functions" xreflabel="Functions for Sending Cancel Requests">
    <title>Functions for Sending Cancel Requests</title>
    <variablelist>
     <varlistentry id="libpq-PQcancelCreate">
@@ -6879,7 +6879,7 @@ void PQcancelReset(PGcancelConn *cancelConn);
    </variablelist>
   </sect2>
 
-  <sect2 id="libpq-cancel-deprecated">
+  <sect2 id="libpq-cancel-deprecated" xreflabel="Obsolete Functions for Sending Cancel Requests">
    <title>Obsolete Functions for Sending Cancel Requests</title>
 
    <para>
@@ -7017,7 +7017,7 @@ int PQrequestCancel(PGconn *conn);
   </sect2>
  </sect1>
 
- <sect1 id="libpq-fastpath">
+ <sect1 id="libpq-fastpath" xreflabel="The Fast-Path Interface">
   <title>The Fast-Path Interface</title>
 
   <indexterm zone="libpq-fastpath">
@@ -7127,7 +7127,7 @@ typedef struct
 
  </sect1>
 
- <sect1 id="libpq-notify">
+ <sect1 id="libpq-notify" xreflabel="Asynchronous Notification">
   <title>Asynchronous Notification</title>
 
   <indexterm zone="libpq-notify">
@@ -7219,7 +7219,7 @@ typedef struct pgNotify
 
  </sect1>
 
- <sect1 id="libpq-copy">
+ <sect1 id="libpq-copy" xreflabel="Functions Associated with the COPY Command">
   <title>Functions Associated with the <command>COPY</command> Command</title>
 
   <indexterm zone="libpq-copy">
@@ -7322,7 +7322,7 @@ typedef struct pgNotify
    </variablelist>
   </para>
 
-  <sect2 id="libpq-copy-send">
+  <sect2 id="libpq-copy-send" xreflabel="Functions for Sending COPY Data">
    <title>Functions for Sending <command>COPY</command> Data</title>
 
    <para>
@@ -7415,7 +7415,7 @@ int PQputCopyEnd(PGconn *conn,
 
   </sect2>
 
-  <sect2 id="libpq-copy-receive">
+  <sect2 id="libpq-copy-receive" xreflabel="Functions for Receiving COPY Data">
    <title>Functions for Receiving <command>COPY</command> Data</title>
 
    <para>
@@ -7486,7 +7486,7 @@ int PQgetCopyData(PGconn *conn,
 
   </sect2>
 
-  <sect2 id="libpq-copy-deprecated">
+  <sect2 id="libpq-copy-deprecated" xreflabel="Obsolete Functions for COPY">
    <title>Obsolete Functions for <command>COPY</command></title>
 
    <para>
@@ -7695,7 +7695,7 @@ int PQendcopy(PGconn *conn);
 
  </sect1>
 
- <sect1 id="libpq-control">
+ <sect1 id="libpq-control" xreflabel="Control Functions">
   <title>Control Functions</title>
 
   <para>
@@ -7911,7 +7911,7 @@ void PQuntrace(PGconn *conn);
 
  </sect1>
 
- <sect1 id="libpq-misc">
+ <sect1 id="libpq-misc" xreflabel="Miscellaneous Functions">
   <title>Miscellaneous Functions</title>
 
   <para>
@@ -8348,7 +8348,7 @@ pg_usec_time_t PQgetCurrentTimeUSec(void);
 
  </sect1>
 
- <sect1 id="libpq-notice-processing">
+ <sect1 id="libpq-notice-processing" xreflabel="Notice Processing">
   <title>Notice Processing</title>
 
   <indexterm zone="libpq-notice-processing">
@@ -8458,7 +8458,7 @@ defaultNoticeProcessor(void *arg, const char *message)
 
  </sect1>
 
- <sect1 id="libpq-events">
+ <sect1 id="libpq-events" xreflabel="Event System">
   <title>Event System</title>
 
   <para>
@@ -8494,7 +8494,7 @@ defaultNoticeProcessor(void *arg, const char *message)
    to free them &mdash; that is the responsibility of the event handler.
   </para>
 
-  <sect2 id="libpq-events-types">
+  <sect2 id="libpq-events-types" xreflabel="Event Types">
    <title>Event Types</title>
 
    <para>
@@ -8695,7 +8695,7 @@ typedef struct
    </variablelist>
   </sect2>
 
-  <sect2 id="libpq-events-proc">
+  <sect2 id="libpq-events-proc" xreflabel="Event Callback Procedure">
    <title>Event Callback Procedure</title>
 
    <variablelist>
@@ -8745,7 +8745,7 @@ int eventproc(PGEventId evtId, void *evtInfo, void *passThrough)
    </variablelist>
   </sect2>
 
-  <sect2 id="libpq-events-funcs">
+  <sect2 id="libpq-events-funcs" xreflabel="Event Support Functions">
    <title>Event Support Functions</title>
 
     <variablelist>
@@ -8858,7 +8858,7 @@ void *PQresultInstanceData(const PGresult *res, PGEventProc proc);
    </variablelist>
   </sect2>
 
-  <sect2 id="libpq-events-example">
+  <sect2 id="libpq-events-example" xreflabel="Event Example">
    <title>Event Example</title>
 
    <para>
@@ -9015,7 +9015,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
   </sect2>
  </sect1>
 
- <sect1 id="libpq-envars">
+ <sect1 id="libpq-envars" xreflabel="Environment Variables">
   <title>Environment Variables</title>
 
   <indexterm zone="libpq-envars">
@@ -9490,7 +9490,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
  </sect1>
 
 
- <sect1 id="libpq-pgpass">
+ <sect1 id="libpq-pgpass" xreflabel="The Password File">
   <title>The Password File</title>
 
   <indexterm zone="libpq-pgpass">
@@ -9553,7 +9553,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
  </sect1>
 
 
- <sect1 id="libpq-pgservice">
+ <sect1 id="libpq-pgservice" xreflabel="The Connection Service File">
   <title>The Connection Service File</title>
 
   <indexterm zone="libpq-pgservice">
@@ -9628,7 +9628,7 @@ user=admin
  </sect1>
 
 
- <sect1 id="libpq-ldap">
+ <sect1 id="libpq-ldap" xreflabel="LDAP Lookup of Connection Parameters">
   <title>LDAP Lookup of Connection Parameters</title>
 
   <indexterm zone="libpq-ldap">
@@ -9710,7 +9710,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
  </sect1>
 
 
- <sect1 id="libpq-ssl">
+ <sect1 id="libpq-ssl" xreflabel="SSL Support">
   <title>SSL Support</title>
 
   <indexterm zone="libpq-ssl">
@@ -9736,7 +9736,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
    file.
   </para>
 
- <sect2 id="libq-ssl-certificates">
+ <sect2 id="libq-ssl-certificates" xreflabel="Client Verification of Server Certificates">
   <title>Client Verification of Server Certificates</title>
 
   <para>
@@ -9843,7 +9843,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
   </note>
  </sect2>
 
- <sect2 id="libpq-ssl-clientcert">
+ <sect2 id="libpq-ssl-clientcert" xreflabel="Client Certificates">
   <title>Client Certificates</title>
 
   <para>
@@ -9912,7 +9912,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
   </para>
  </sect2>
 
- <sect2 id="libpq-ssl-protection">
+ <sect2 id="libpq-ssl-protection" xreflabel="Protection Provided in Different Modes">
   <title>Protection Provided in Different Modes</title>
 
   <para>
@@ -10085,7 +10085,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
 
  </sect2>
 
- <sect2 id="libpq-ssl-fileusage">
+ <sect2 id="libpq-ssl-fileusage" xreflabel="SSL Client File Usage">
   <title>SSL Client File Usage</title>
 
   <para>
@@ -10137,7 +10137,7 @@ ldap://ldap.acme.com/cn=dbserver,cn=hosts?pgconnectinfo?base?(objectclass=*)
   </table>
  </sect2>
 
- <sect2 id="libpq-ssl-initialize">
+ <sect2 id="libpq-ssl-initialize" xreflabel="SSL Library Initialization">
   <title>SSL Library Initialization</title>
 
   <para>
@@ -10212,7 +10212,7 @@ void PQinitSSL(int do_ssl);
 
  </sect1>
 
- <sect1 id="libpq-oauth">
+ <sect1 id="libpq-oauth" xreflabel="OAuth Support">
   <title>OAuth Support</title>
 
   <para>
@@ -10267,7 +10267,7 @@ Visit https://example.com/device and enter the code: ABCD-EFGH
    </para>
   </note>
 
-  <sect2 id="libpq-oauth-authdata-hooks">
+  <sect2 id="libpq-oauth-authdata-hooks" xreflabel="Authdata Hooks">
    <title>Authdata Hooks</title>
 
    <para>
@@ -10337,7 +10337,7 @@ PQauthDataHook_type PQgetAuthDataHook(void);
     </variablelist>
    </para>
 
-   <sect3 id="libpq-oauth-authdata-hooks-types">
+   <sect3 id="libpq-oauth-authdata-hooks-types" xreflabel="Hook Types">
     <title>Hook Types</title>
     <para>
      The following <symbol>PGauthData</symbol> types and their corresponding
@@ -10509,7 +10509,7 @@ typedef struct PGoauthBearerRequest
    </sect3>
   </sect2>
 
-  <sect2 id="libpq-oauth-debugging">
+  <sect2 id="libpq-oauth-debugging" xreflabel="Debugging and Developer Settings">
    <title>Debugging and Developer Settings</title>
 
    <para>
@@ -10554,7 +10554,7 @@ typedef struct PGoauthBearerRequest
  </sect1>
 
 
- <sect1 id="libpq-threading">
+ <sect1 id="libpq-threading" xreflabel="Behavior in Threaded Programs">
   <title>Behavior in Threaded Programs</title>
 
   <indexterm zone="libpq-threading">
@@ -10640,7 +10640,7 @@ int PQisthreadsafe();
  </sect1>
 
 
- <sect1 id="libpq-build">
+ <sect1 id="libpq-build" xreflabel="Building libpq Programs">
   <title>Building <application>libpq</application> Programs</title>
 
   <indexterm zone="libpq-build">
@@ -10783,7 +10783,7 @@ testlibpq.o(.text+0xa4): undefined reference to `PQerrorMessage'
  </sect1>
 
 
- <sect1 id="libpq-example">
+ <sect1 id="libpq-example" xreflabel="Example Programs">
   <title>Example Programs</title>
 
   <para>
diff --git a/doc/src/sgml/lo.sgml b/doc/src/sgml/lo.sgml
index 6d9bcebd42b..8fe2e8bd200 100644
--- a/doc/src/sgml/lo.sgml
+++ b/doc/src/sgml/lo.sgml
@@ -19,7 +19,7 @@
   on the current database.
  </para>
 
- <sect2 id="lo-rationale">
+ <sect2 id="lo-rationale" xreflabel="Rationale">
   <title>Rationale</title>
 
   <para>
@@ -66,7 +66,7 @@
   </para>
  </sect2>
 
- <sect2 id="lo-how-to-use">
+ <sect2 id="lo-how-to-use" xreflabel="How to Use It">
   <title>How to Use It</title>
 
   <para>
@@ -92,7 +92,7 @@ CREATE TRIGGER t_raster BEFORE UPDATE OR DELETE ON image
   </para>
  </sect2>
 
- <sect2 id="lo-limitations">
+ <sect2 id="lo-limitations" xreflabel="Limitations">
   <title>Limitations</title>
 
   <itemizedlist>
@@ -125,7 +125,7 @@ CREATE TRIGGER t_raster BEFORE UPDATE OR DELETE ON image
   </itemizedlist>
  </sect2>
 
- <sect2 id="lo-author">
+ <sect2 id="lo-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml
index 79731c6553f..a5813c2cf0b 100644
--- a/doc/src/sgml/lobj.sgml
+++ b/doc/src/sgml/lobj.sgml
@@ -25,7 +25,7 @@
     values.  This is not described here.
    </para>
 
-  <sect1 id="lo-intro">
+  <sect1 id="lo-intro" xreflabel="Introduction">
    <title>Introduction</title>
 
    <indexterm>
@@ -58,7 +58,7 @@
 
   </sect1>
 
-  <sect1 id="lo-implementation">
+  <sect1 id="lo-implementation" xreflabel="Implementation Features">
    <title>Implementation Features</title>
 
    <para>
@@ -96,7 +96,7 @@
    </para>
   </sect1>
 
-  <sect1 id="lo-interfaces">
+  <sect1 id="lo-interfaces" xreflabel="Client Interfaces">
    <title>Client Interfaces</title>
 
    <para>
@@ -136,7 +136,7 @@
     Client applications cannot use these functions while a libpq connection is in pipeline mode.
    </para>
 
-   <sect2 id="lo-create">
+   <sect2 id="lo-create" xreflabel="Creating a Large Object">
     <title>Creating a Large Object</title>
 
     <para>
@@ -197,7 +197,7 @@ inv_oid = lo_creat(conn, INV_READ|INV_WRITE);
     </para>
    </sect2>
 
-   <sect2 id="lo-import">
+   <sect2 id="lo-import" xreflabel="Importing a Large Object">
     <title>Importing a Large Object</title>
 
     <para>
@@ -239,7 +239,7 @@ Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);
     </para>
    </sect2>
 
-   <sect2 id="lo-export">
+   <sect2 id="lo-export" xreflabel="Exporting a Large Object">
     <title>Exporting a Large Object</title>
 
     <para>
@@ -257,7 +257,7 @@ int lo_export(PGconn *conn, Oid lobjId, const char *filename);
     </para>
    </sect2>
 
-   <sect2 id="lo-open">
+   <sect2 id="lo-open" xreflabel="Opening an Existing Large Object">
     <title>Opening an Existing Large Object</title>
 
     <para>
@@ -320,7 +320,7 @@ inv_fd = lo_open(conn, inv_oid, INV_READ|INV_WRITE);
     </para>
 </sect2>
 
-<sect2 id="lo-write">
+<sect2 id="lo-write" xreflabel="Writing Data to a Large Object">
 <title>Writing Data to a Large Object</title>
 
 <para>
@@ -346,7 +346,7 @@ int lo_write(PGconn *conn, int fd, const char *buf, size_t len);
 </para>
 </sect2>
 
-<sect2 id="lo-read">
+<sect2 id="lo-read" xreflabel="Reading Data from a Large Object">
 <title>Reading Data from a Large Object</title>
 
 <para>
@@ -373,7 +373,7 @@ int lo_read(PGconn *conn, int fd, char *buf, size_t len);
 </para>
 </sect2>
 
-<sect2 id="lo-seek">
+<sect2 id="lo-seek" xreflabel="Seeking in a Large Object">
 <title>Seeking in a Large Object</title>
 
 <para>
@@ -416,7 +416,7 @@ int64_t lo_lseek64(PGconn *conn, int fd, int64_t offset, int whence);
 
 </sect2>
 
-<sect2 id="lo-tell">
+<sect2 id="lo-tell" xreflabel="Obtaining the Seek Position of a Large Object">
 <title>Obtaining the Seek Position of a Large Object</title>
 
 <para>
@@ -450,7 +450,7 @@ int64_t lo_tell64(PGconn *conn, int fd);
 </para>
 </sect2>
 
-<sect2 id="lo-truncate">
+<sect2 id="lo-truncate" xreflabel="Truncating a Large Object">
 <title>Truncating a Large Object</title>
 
 <para>
@@ -505,7 +505,7 @@ int lo_truncate64(PGconn *conn, int fd, int64_t len);
 </para>
 </sect2>
 
-<sect2 id="lo-close">
+<sect2 id="lo-close" xreflabel="Closing a Large Object Descriptor">
 <title>Closing a Large Object Descriptor</title>
 
 <para>
@@ -526,7 +526,7 @@ int lo_close(PGconn *conn, int fd);
 </para>
 </sect2>
 
-   <sect2 id="lo-unlink">
+   <sect2 id="lo-unlink" xreflabel="Removing a Large Object">
     <title>Removing a Large Object</title>
 
     <para>
@@ -542,7 +542,7 @@ int lo_unlink(PGconn *conn, Oid lobjId);
 
 </sect1>
 
-<sect1 id="lo-funcs">
+<sect1 id="lo-funcs" xreflabel="Server-Side Functions">
 <title>Server-Side Functions</title>
 
   <para>
@@ -705,7 +705,7 @@ SELECT lo_export(image.raster, '/tmp/motd') FROM image
 
 </sect1>
 
-<sect1 id="lo-examplesect">
+<sect1 id="lo-examplesect" xreflabel="Example Program">
 <title>Example Program</title>
 
 <para>
diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml
index b3faaa675ef..f145d60fcf1 100644
--- a/doc/src/sgml/logical-replication.sgml
+++ b/doc/src/sgml/logical-replication.sgml
@@ -96,7 +96,7 @@
   subscribers to the same set of tables, conflicts can arise.
  </para>
 
- <sect1 id="logical-replication-publication">
+ <sect1 id="logical-replication-publication" xreflabel="Publication">
   <title>Publication</title>
 
   <para>
@@ -146,7 +146,7 @@
    snapshot once the transaction has committed.
   </para>
 
-  <sect2 id="logical-replication-publication-replica-identity">
+  <sect2 id="logical-replication-publication-replica-identity" xreflabel="Replica Identity">
    <title>Replica Identity</title>
 
    <para>
@@ -200,7 +200,7 @@
 
  </sect1>
 
- <sect1 id="logical-replication-subscription">
+ <sect1 id="logical-replication-subscription" xreflabel="Subscription">
   <title>Subscription</title>
 
   <para>
@@ -289,7 +289,7 @@
    option of <command>CREATE SUBSCRIPTION</command> for details.
   </para>
 
-  <sect2 id="logical-replication-subscription-slot">
+  <sect2 id="logical-replication-subscription-slot" xreflabel="Logical Replication Slot Management">
    <title>Logical Replication Slot Management</title>
 
    <para>
@@ -364,7 +364,7 @@
    </para>
   </sect2>
 
-  <sect2 id="logical-replication-subscription-examples">
+  <sect2 id="logical-replication-subscription-examples" xreflabel="Examples: Set Up Logical Replication">
     <title>Examples: Set Up Logical Replication</title>
 
     <para>
@@ -539,7 +539,7 @@
 </programlisting></para>
   </sect2>
 
-  <sect2 id="logical-replication-subscription-examples-deferred-slot">
+  <sect2 id="logical-replication-subscription-examples-deferred-slot" xreflabel="Examples: Deferred Logical Replication Slot Creation">
    <title>Examples: Deferred Logical Replication Slot Creation</title>
 
    <para>
@@ -689,7 +689,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 
  </sect1>
 
- <sect1 id="logical-replication-failover">
+ <sect1 id="logical-replication-failover" xreflabel="Logical Replication Failover">
   <title>Logical Replication Failover</title>
 
   <para>
@@ -827,7 +827,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 </programlisting></para>
  </sect1>
 
- <sect1 id="logical-replication-row-filter">
+ <sect1 id="logical-replication-row-filter" xreflabel="Row Filters">
   <title>Row Filters</title>
 
   <para>
@@ -843,7 +843,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
    <xref linkend="sql-createpublication"/> for details.
   </para>
 
-  <sect2 id="logical-replication-row-filter-rules">
+  <sect2 id="logical-replication-row-filter-rules" xreflabel="Row Filter Rules">
    <title>Row Filter Rules</title>
 
    <para>
@@ -859,7 +859,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 
   </sect2>
 
-  <sect2 id="logical-replication-row-filter-restrictions">
+  <sect2 id="logical-replication-row-filter-restrictions" xreflabel="Expression Restrictions">
    <title>Expression Restrictions</title>
 
    <para>
@@ -879,7 +879,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 
   </sect2>
 
-  <sect2 id="logical-replication-row-filter-transformations">
+  <sect2 id="logical-replication-row-filter-transformations" xreflabel="UPDATE Transformations">
    <title>UPDATE Transformations</title>
 
    <para>
@@ -940,7 +940,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 
   </sect2>
 
-  <sect2 id="logical-replication-row-filter-partitioned-table">
+  <sect2 id="logical-replication-row-filter-partitioned-table" xreflabel="Partitioned Tables">
    <title>Partitioned Tables</title>
 
    <para>
@@ -955,7 +955,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 
   </sect2>
 
-  <sect2 id="logical-replication-row-filter-initial-data-sync">
+  <sect2 id="logical-replication-row-filter-initial-data-sync" xreflabel="Initial Data Synchronization">
    <title>Initial Data Synchronization</title>
 
    <para>
@@ -992,7 +992,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 
   </sect2>
 
-  <sect2 id="logical-replication-row-filter-combining">
+  <sect2 id="logical-replication-row-filter-combining" xreflabel="Combining Multiple Row Filters">
    <title>Combining Multiple Row Filters</title>
 
    <para>
@@ -1027,7 +1027,7 @@ HINT:  To initiate replication, you must manually create the replication slot, e
 
   </sect2>
 
-  <sect2 id="logical-replication-row-filter-examples">
+  <sect2 id="logical-replication-row-filter-examples" xreflabel="Examples">
    <title>Examples</title>
 
    <para>
@@ -1375,7 +1375,7 @@ Publications:
 
  </sect1>
 
- <sect1 id="logical-replication-col-lists">
+ <sect1 id="logical-replication-col-lists" xreflabel="Column Lists">
   <title>Column Lists</title>
 
   <para>
@@ -1475,7 +1475,7 @@ Publications:
     </para>
    </warning>
 
-  <sect2 id="logical-replication-col-list-examples">
+  <sect2 id="logical-replication-col-list-examples" xreflabel="Examples">
    <title>Examples</title>
 
    <para>
@@ -1571,7 +1571,7 @@ Publications:
 
  </sect1>
 
- <sect1 id="logical-replication-gencols">
+ <sect1 id="logical-replication-gencols" xreflabel="Generated Column Replication">
   <title>Generated Column Replication</title>
 
   <para>
@@ -1750,7 +1750,7 @@ Publications:
   </note>
  </sect1>
 
- <sect1 id="logical-replication-sequences">
+ <sect1 id="logical-replication-sequences" xreflabel="Replicating Sequences">
   <title>Replicating Sequences</title>
 
   <para>
@@ -1797,7 +1797,7 @@ Publications:
    configuration.
   </para>
 
-  <sect2 id="sequence-definition-mismatches">
+  <sect2 id="sequence-definition-mismatches" xreflabel="Sequence Definition Mismatches">
    <title>Sequence Definition Mismatches</title>
    <para>
     The sequence synchronization worker validates that sequence definitions
@@ -1814,7 +1814,7 @@ Publications:
    </para>
   </sect2>
 
-  <sect2 id="sequences-out-of-sync">
+  <sect2 id="sequences-out-of-sync" xreflabel="Refreshing Out-of-Sync Sequences">
    <title>Refreshing Out-of-Sync Sequences</title>
    <para>
     Subscriber sequence values will become out of sync as the publisher
@@ -1841,7 +1841,7 @@ Publications:
    </warning>
   </sect2>
 
-  <sect2 id="logical-replication-sequences-examples">
+  <sect2 id="logical-replication-sequences-examples" xreflabel="Examples">
    <title>Examples</title>
 
    <para>
@@ -1991,7 +1991,7 @@ Publications:
   </sect2>
  </sect1>
 
- <sect1 id="logical-replication-conflicts">
+ <sect1 id="logical-replication-conflicts" xreflabel="Conflicts">
   <title>Conflicts</title>
 
   <para>
@@ -2310,7 +2310,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
   </para>
  </sect1>
 
- <sect1 id="logical-replication-restrictions">
+ <sect1 id="logical-replication-restrictions" xreflabel="Restrictions">
   <title>Restrictions</title>
 
   <para>
@@ -2415,7 +2415,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
   </itemizedlist>
  </sect1>
 
- <sect1 id="logical-replication-architecture">
+ <sect1 id="logical-replication-architecture" xreflabel="Architecture">
   <title>Architecture</title>
 
   <para>
@@ -2452,7 +2452,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    and statement triggers for <command>INSERT</command>.
   </para>
 
-  <sect2 id="logical-replication-snapshot">
+  <sect2 id="logical-replication-snapshot" xreflabel="Initial Snapshot">
     <title>Initial Snapshot</title>
     <para>
      The initial data in existing subscribed tables are snapshotted and
@@ -2492,7 +2492,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
   </sect2>
  </sect1>
 
- <sect1 id="logical-replication-monitoring">
+ <sect1 id="logical-replication-monitoring" xreflabel="Monitoring">
   <title>Monitoring</title>
 
   <para>
@@ -2523,7 +2523,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
   </para>
  </sect1>
 
- <sect1 id="logical-replication-security">
+ <sect1 id="logical-replication-security" xreflabel="Security">
   <title>Security</title>
 
   <para>
@@ -2616,7 +2616,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
   </para>
  </sect1>
 
- <sect1 id="logical-replication-config">
+ <sect1 id="logical-replication-config" xreflabel="Configuration Settings">
   <title>Configuration Settings</title>
 
   <para>
@@ -2624,7 +2624,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    options are relevant only on one side of the replication.
   </para>
 
-  <sect2 id="logical-replication-config-publisher">
+  <sect2 id="logical-replication-config-publisher" xreflabel="Publishers">
    <title>Publishers</title>
 
    <para>
@@ -2657,7 +2657,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
 
   </sect2>
 
-  <sect2 id="logical-replication-config-subscriber">
+  <sect2 id="logical-replication-config-subscriber" xreflabel="Subscribers">
    <title>Subscribers</title>
 
    <para>
@@ -2712,7 +2712,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
 
  </sect1>
 
- <sect1 id="logical-replication-upgrade">
+ <sect1 id="logical-replication-upgrade" xreflabel="Upgrade">
   <title>Upgrade</title>
 
   <para>
@@ -2721,7 +2721,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    clusters are version 17.0 or later.
   </para>
 
-  <sect2 id="prepare-publisher-upgrades">
+  <sect2 id="prepare-publisher-upgrades" xreflabel="Prepare for Publisher Upgrades">
    <title>Prepare for Publisher Upgrades</title>
 
    <para>
@@ -2793,7 +2793,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    </itemizedlist>
   </sect2>
 
-  <sect2 id="prepare-subscriber-upgrades">
+  <sect2 id="prepare-subscriber-upgrades" xreflabel="Prepare for Subscriber Upgrades">
    <title>Prepare for Subscriber Upgrades</title>
 
    <para>
@@ -2869,7 +2869,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    </itemizedlist>
   </sect2>
 
-  <sect2 id="upgrading-logical-replication-clusters">
+  <sect2 id="upgrading-logical-replication-clusters" xreflabel="Upgrading Logical Replication Clusters">
    <title>Upgrading Logical Replication Clusters</title>
 
    <para>
@@ -2933,7 +2933,7 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
     </itemizedlist>
    </para>
 
-   <sect3 id="steps-two-node-logical-replication-cluster">
+   <sect3 id="steps-two-node-logical-replication-cluster" xreflabel="Steps to Upgrade a Two-node Logical Replication Cluster">
     <title>Steps to Upgrade a Two-node Logical Replication Cluster</title>
      <para>
       Let's say publisher is in <literal>node1</literal> and subscriber is
@@ -3077,7 +3077,7 @@ pg_ctl -D /opt/PostgreSQL/data2_upgraded start -l logfile
      </note>
     </sect3>
 
-    <sect3 id="steps-cascaded-logical-replication-cluster">
+    <sect3 id="steps-cascaded-logical-replication-cluster" xreflabel="Steps to Upgrade a Cascaded Logical Replication Cluster">
      <title>Steps to Upgrade a Cascaded Logical Replication Cluster</title>
      <para>
       Let's say we have a cascaded logical replication setup
@@ -3306,7 +3306,7 @@ pg_ctl -D /opt/PostgreSQL/data3_upgraded start -l logfile
      </procedure>
     </sect3>
 
-    <sect3 id="steps-two-node-circular-logical-replication-cluster">
+    <sect3 id="steps-two-node-circular-logical-replication-cluster" xreflabel="Steps to Upgrade a Two-node Circular Logical Replication Cluster">
      <title>Steps to Upgrade a Two-node Circular Logical Replication Cluster</title>
      <para>
       Let's say we have a circular logical replication setup
@@ -3501,7 +3501,7 @@ pg_ctl -D /opt/PostgreSQL/data2_upgraded start -l logfile
    </sect2>
  </sect1>
 
- <sect1 id="logical-replication-quick-setup">
+ <sect1 id="logical-replication-quick-setup" xreflabel="Quick Setup">
   <title>Quick Setup</title>
 
   <para>
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 6368e46ce93..636ff80d8e4 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -37,7 +37,7 @@
    (see <xref linkend="logicaldecoding-writer"/>).
   </para>
 
-  <sect1 id="logicaldecoding-example">
+  <sect1 id="logicaldecoding-example" xreflabel="Logical Decoding Examples">
    <title>Logical Decoding Examples</title>
 
    <para>
@@ -235,9 +235,9 @@ postgres=# SELECT * from pg_logical_slot_get_changes('regression_slot', NULL, NU
 </programlisting>
 </sect1>
 
-  <sect1 id="logicaldecoding-explanation">
+  <sect1 id="logicaldecoding-explanation" xreflabel="Logical Decoding Concepts">
    <title>Logical Decoding Concepts</title>
-   <sect2 id="logicaldecoding-explanation-log-dec">
+   <sect2 id="logicaldecoding-explanation-log-dec" xreflabel="Logical Decoding">
     <title>Logical Decoding</title>
 
     <indexterm>
@@ -259,7 +259,7 @@ postgres=# SELECT * from pg_logical_slot_get_changes('regression_slot', NULL, NU
     </para>
    </sect2>
 
-   <sect2 id="logicaldecoding-replication-slots">
+   <sect2 id="logicaldecoding-replication-slots" xreflabel="Replication Slots">
     <title>Replication Slots</title>
 
     <indexterm>
@@ -361,7 +361,7 @@ postgres=# SELECT * from pg_logical_slot_get_changes('regression_slot', NULL, NU
 
    </sect2>
 
-   <sect2 id="logicaldecoding-replication-slots-synchronization">
+   <sect2 id="logicaldecoding-replication-slots-synchronization" xreflabel="Replication Slot Synchronization">
     <title>Replication Slot Synchronization</title>
     <para>
      The logical replication slots on the primary can be synchronized to
@@ -475,7 +475,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
     </caution>
    </sect2>
 
-   <sect2 id="logicaldecoding-explanation-output-plugins">
+   <sect2 id="logicaldecoding-explanation-output-plugins" xreflabel="Output Plugins">
     <title>Output Plugins</title>
     <para>
      Output plugins transform the data from the write-ahead log's internal
@@ -483,7 +483,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
     </para>
    </sect2>
 
-   <sect2 id="logicaldecoding-explanation-exported-snapshots">
+   <sect2 id="logicaldecoding-explanation-exported-snapshots" xreflabel="Exported Snapshots">
     <title>Exported Snapshots</title>
     <para>
      When a new replication slot is created using the streaming replication
@@ -506,7 +506,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
    </sect2>
   </sect1>
 
-  <sect1 id="logicaldecoding-walsender">
+  <sect1 id="logicaldecoding-walsender" xreflabel="Streaming Replication Protocol Interface">
    <title>Streaming Replication Protocol Interface</title>
 
    <para>
@@ -537,7 +537,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
    </para>
   </sect1>
 
-  <sect1 id="logicaldecoding-sql">
+  <sect1 id="logicaldecoding-sql" xreflabel="Logical Decoding SQL Interface">
    <title>Logical Decoding <acronym>SQL</acronym> Interface</title>
 
    <para>
@@ -553,7 +553,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
    </para>
   </sect1>
 
-  <sect1 id="logicaldecoding-catalogs">
+  <sect1 id="logicaldecoding-catalogs" xreflabel="System Catalogs Related to Logical Decoding">
    <title>System Catalogs Related to Logical Decoding</title>
 
    <para>
@@ -570,7 +570,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
    </para>
   </sect1>
 
-  <sect1 id="logicaldecoding-output-plugin">
+  <sect1 id="logicaldecoding-output-plugin" xreflabel="Logical Decoding Output Plugins">
    <title>Logical Decoding Output Plugins</title>
 
    <para>
@@ -594,7 +594,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
      logical replication</link>.
     </para>
 
-    <sect3 id="logicaldecoding-pgoutput-options">
+    <sect3 id="logicaldecoding-pgoutput-options" xreflabel="Options">
      <title>Options</title>
 
      <variablelist>
@@ -717,7 +717,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
 
     </sect3>
 
-    <sect3 id="logicaldecoding-pgoutput-notes">
+    <sect3 id="logicaldecoding-pgoutput-notes" xreflabel="Notes">
      <title>Notes</title>
 
      <para>
@@ -734,7 +734,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
    </sect2>
   </sect1>
 
-  <sect1 id="logicaldecoding-output-plugin-writing">
+  <sect1 id="logicaldecoding-output-plugin-writing" xreflabel="Writing Logical Decoding Output Plugins">
    <title>Writing Logical Decoding Output Plugins</title>
    <para>
     An example output plugin can be found in the
@@ -743,7 +743,7 @@ DETAIL:  Synchronization could lead to data loss, because the remote slot needs
     </link>
     subdirectory of the PostgreSQL source tree.
    </para>
-   <sect2 id="logicaldecoding-output-init">
+   <sect2 id="logicaldecoding-output-init" xreflabel="Initialization Function">
     <title>Initialization Function</title>
     <indexterm zone="logicaldecoding-output-init">
      <primary>_PG_output_plugin_init</primary>
@@ -816,7 +816,7 @@ typedef void (*LogicalOutputPluginInit) (struct OutputPluginCallbacks *cb);
     </para>
    </sect2>
 
-   <sect2 id="logicaldecoding-capabilities">
+   <sect2 id="logicaldecoding-capabilities" xreflabel="Capabilities">
     <title>Capabilities</title>
 
     <para>
@@ -839,7 +839,7 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true);
     </para>
    </sect2>
 
-   <sect2 id="logicaldecoding-output-mode">
+   <sect2 id="logicaldecoding-output-mode" xreflabel="Output Modes">
     <title>Output Modes</title>
 
     <para>
@@ -858,7 +858,7 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true);
     </para>
    </sect2>
 
-   <sect2 id="logicaldecoding-output-plugin-callbacks">
+   <sect2 id="logicaldecoding-output-plugin-callbacks" xreflabel="Output Plugin Callbacks">
     <title>Output Plugin Callbacks</title>
 
     <para>
@@ -898,7 +898,7 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true);
      </para>
     </note>
 
-    <sect3 id="logicaldecoding-output-plugin-startup">
+    <sect3 id="logicaldecoding-output-plugin-startup" xreflabel="Startup Callback">
      <title>Startup Callback</title>
      <para>
       The optional <function>startup_cb</function> callback is called whenever
@@ -938,7 +938,7 @@ typedef struct OutputPluginOptions
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-shutdown">
+    <sect3 id="logicaldecoding-output-plugin-shutdown" xreflabel="Shutdown Callback">
      <title>Shutdown Callback</title>
 
      <para>
@@ -952,7 +952,7 @@ typedef void (*LogicalDecodeShutdownCB) (struct LogicalDecodingContext *ctx);
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-begin">
+    <sect3 id="logicaldecoding-output-plugin-begin" xreflabel="Transaction Begin Callback">
      <title>Transaction Begin Callback</title>
 
      <para>
@@ -969,7 +969,7 @@ typedef void (*LogicalDecodeBeginCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-commit">
+    <sect3 id="logicaldecoding-output-plugin-commit" xreflabel="Transaction End Callback">
      <title>Transaction End Callback</title>
 
      <para>
@@ -986,7 +986,7 @@ typedef void (*LogicalDecodeCommitCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-change">
+    <sect3 id="logicaldecoding-output-plugin-change" xreflabel="Change Callback">
      <title>Change Callback</title>
 
      <para>
@@ -1027,7 +1027,7 @@ typedef void (*LogicalDecodeChangeCB) (struct LogicalDecodingContext *ctx,
      </note>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-truncate">
+    <sect3 id="logicaldecoding-output-plugin-truncate" xreflabel="Truncate Callback">
      <title>Truncate Callback</title>
 
      <para>
@@ -1049,7 +1049,7 @@ typedef void (*LogicalDecodeTruncateCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-     <sect3 id="logicaldecoding-output-plugin-filter-origin">
+     <sect3 id="logicaldecoding-output-plugin-filter-origin" xreflabel="Origin Filter Callback">
      <title>Origin Filter Callback</title>
 
      <para>
@@ -1078,7 +1078,7 @@ typedef bool (*LogicalDecodeFilterByOriginCB) (struct LogicalDecodingContext *ct
      </para>
      </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-message">
+    <sect3 id="logicaldecoding-output-plugin-message" xreflabel="Generic Message Callback">
      <title>Generic Message Callback</title>
 
      <para>
@@ -1117,7 +1117,7 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-filter-prepare">
+    <sect3 id="logicaldecoding-output-plugin-filter-prepare" xreflabel="Prepare Filter Callback">
      <title>Prepare Filter Callback</title>
 
      <para>
@@ -1150,7 +1150,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
      </para>
      </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-begin-prepare">
+    <sect3 id="logicaldecoding-output-plugin-begin-prepare" xreflabel="Transaction Begin Prepare Callback">
      <title>Transaction Begin Prepare Callback</title>
 
      <para>
@@ -1168,7 +1168,7 @@ typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-prepare">
+    <sect3 id="logicaldecoding-output-plugin-prepare" xreflabel="Transaction Prepare Callback">
      <title>Transaction Prepare Callback</title>
 
      <para>
@@ -1186,7 +1186,7 @@ typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-commit-prepared">
+    <sect3 id="logicaldecoding-output-plugin-commit-prepared" xreflabel="Transaction Commit Prepared Callback">
      <title>Transaction Commit Prepared Callback</title>
 
      <para>
@@ -1202,7 +1202,7 @@ typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ct
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-rollback-prepared">
+    <sect3 id="logicaldecoding-output-plugin-rollback-prepared" xreflabel="Transaction Rollback Prepared Callback">
      <title>Transaction Rollback Prepared Callback</title>
 
      <para>
@@ -1225,7 +1225,7 @@ typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-start">
+    <sect3 id="logicaldecoding-output-plugin-stream-start" xreflabel="Stream Start Callback">
      <title>Stream Start Callback</title>
      <para>
       The required <function>stream_start_cb</function> callback is called when
@@ -1237,7 +1237,7 @@ typedef void (*LogicalDecodeStreamStartCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-stop">
+    <sect3 id="logicaldecoding-output-plugin-stream-stop" xreflabel="Stream Stop Callback">
      <title>Stream Stop Callback</title>
      <para>
       The required <function>stream_stop_cb</function> callback is called when
@@ -1249,7 +1249,7 @@ typedef void (*LogicalDecodeStreamStopCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-abort">
+    <sect3 id="logicaldecoding-output-plugin-stream-abort" xreflabel="Stream Abort Callback">
      <title>Stream Abort Callback</title>
      <para>
       The required <function>stream_abort_cb</function> callback is called to
@@ -1262,7 +1262,7 @@ typedef void (*LogicalDecodeStreamAbortCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-prepare">
+    <sect3 id="logicaldecoding-output-plugin-stream-prepare" xreflabel="Stream Prepare Callback">
      <title>Stream Prepare Callback</title>
      <para>
       The <function>stream_prepare_cb</function> callback is called to prepare
@@ -1277,7 +1277,7 @@ typedef void (*LogicalDecodeStreamPrepareCB) (struct LogicalDecodingContext *ctx
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-commit">
+    <sect3 id="logicaldecoding-output-plugin-stream-commit" xreflabel="Stream Commit Callback">
      <title>Stream Commit Callback</title>
      <para>
       The required <function>stream_commit_cb</function> callback is called to
@@ -1290,7 +1290,7 @@ typedef void (*LogicalDecodeStreamCommitCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-change">
+    <sect3 id="logicaldecoding-output-plugin-stream-change" xreflabel="Stream Change Callback">
      <title>Stream Change Callback</title>
      <para>
       The required <function>stream_change_cb</function> callback is called
@@ -1307,7 +1307,7 @@ typedef void (*LogicalDecodeStreamChangeCB) (struct LogicalDecodingContext *ctx,
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-message">
+    <sect3 id="logicaldecoding-output-plugin-stream-message" xreflabel="Stream Message Callback">
      <title>Stream Message Callback</title>
      <para>
       The optional <function>stream_message_cb</function> callback is called when
@@ -1328,7 +1328,7 @@ typedef void (*LogicalDecodeStreamMessageCB) (struct LogicalDecodingContext *ctx
      </para>
     </sect3>
 
-    <sect3 id="logicaldecoding-output-plugin-stream-truncate">
+    <sect3 id="logicaldecoding-output-plugin-stream-truncate" xreflabel="Stream Truncate Callback">
      <title>Stream Truncate Callback</title>
      <para>
       The optional <function>stream_truncate_cb</function> callback is called
@@ -1353,7 +1353,7 @@ typedef void (*LogicalDecodeStreamTruncateCB) (struct LogicalDecodingContext *ct
 
    </sect2>
 
-   <sect2 id="logicaldecoding-output-plugin-output">
+   <sect2 id="logicaldecoding-output-plugin-output" xreflabel="Functions for Producing Output">
     <title>Functions for Producing Output</title>
 
     <para>
@@ -1381,7 +1381,7 @@ OutputPluginWrite(ctx, true);
    </sect2>
   </sect1>
 
-  <sect1 id="logicaldecoding-writer">
+  <sect1 id="logicaldecoding-writer" xreflabel="Logical Decoding Output Writers">
    <title>Logical Decoding Output Writers</title>
 
    <para>
@@ -1394,9 +1394,9 @@ OutputPluginWrite(ctx, true);
    </para>
   </sect1>
 
-  <sect1 id="logicaldecoding-synchronous">
+  <sect1 id="logicaldecoding-synchronous" xreflabel="Synchronous Replication Support for Logical Decoding">
    <title>Synchronous Replication Support for Logical Decoding</title>
-   <sect2 id="logicaldecoding-synchronous-overview">
+   <sect2 id="logicaldecoding-synchronous-overview" xreflabel="Overview">
     <title>Overview</title>
 
     <para>
@@ -1422,7 +1422,7 @@ OutputPluginWrite(ctx, true);
     </note>
    </sect2>
 
-   <sect2 id="logicaldecoding-synchronous-caveats">
+   <sect2 id="logicaldecoding-synchronous-caveats" xreflabel="Caveats">
     <title>Caveats</title>
 
     <para>
@@ -1480,7 +1480,7 @@ OutputPluginWrite(ctx, true);
    </sect2>
   </sect1>
 
-  <sect1 id="logicaldecoding-streaming">
+  <sect1 id="logicaldecoding-streaming" xreflabel="Streaming of Large Transactions for Logical Decoding">
    <title>Streaming of Large Transactions for Logical Decoding</title>
 
    <para>
@@ -1585,7 +1585,7 @@ commit_prepared_cb(...);  &lt;-- commit of the prepared transaction
 
   </sect1>
 
-  <sect1 id="logicaldecoding-two-phase-commits">
+  <sect1 id="logicaldecoding-two-phase-commits" xreflabel="Two-phase Commit Support for Logical Decoding">
    <title>Two-phase Commit Support for Logical Decoding</title>
 
    <para>
diff --git a/doc/src/sgml/ltree.sgml b/doc/src/sgml/ltree.sgml
index ff3c227727b..312486e51b0 100644
--- a/doc/src/sgml/ltree.sgml
+++ b/doc/src/sgml/ltree.sgml
@@ -19,7 +19,7 @@
   on the current database.
  </para>
 
- <sect2 id="ltree-definitions">
+ <sect2 id="ltree-definitions" xreflabel="Definitions">
   <title>Definitions</title>
 
   <para>
@@ -188,7 +188,7 @@ Europe &amp; Russia*@ &amp; !Transportation
   </para>
  </sect2>
 
- <sect2 id="ltree-ops-funcs">
+ <sect2 id="ltree-ops-funcs" xreflabel="Operators and Functions">
   <title>Operators and Functions</title>
 
   <para>
@@ -608,7 +608,7 @@ Europe &amp; Russia*@ &amp; !Transportation
   </table>
  </sect2>
 
- <sect2 id="ltree-indexes">
+ <sect2 id="ltree-indexes" xreflabel="Indexes">
   <title>Indexes</title>
   <para>
    <filename>ltree</filename> supports several types of indexes that can speed
@@ -694,7 +694,7 @@ CREATE INDEX path_gist_idx ON test USING GIST (array_path gist__ltree_ops(siglen
   </itemizedlist>
  </sect2>
 
- <sect2 id="ltree-example">
+ <sect2 id="ltree-example" xreflabel="Example">
   <title>Example</title>
 
   <para>
@@ -832,7 +832,7 @@ ltreetest=&gt; SELECT ins_label(path,2,'Space') FROM test WHERE path &lt;@ 'Top.
   </para>
  </sect2>
 
- <sect2 id="ltree-transforms">
+ <sect2 id="ltree-transforms" xreflabel="Transforms">
   <title>Transforms</title>
 
   <para>
@@ -843,7 +843,7 @@ ltreetest=&gt; SELECT ins_label(path,2,'Space') FROM test WHERE path &lt;@ 'Top.
   </para>
  </sect2>
 
- <sect2 id="ltree-authors">
+ <sect2 id="ltree-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml
index 08e6489afb8..611eceda0bc 100644
--- a/doc/src/sgml/maintenance.sgml
+++ b/doc/src/sgml/maintenance.sgml
@@ -59,7 +59,7 @@
    pleasant and productive experience with the system.
   </para>
 
- <sect1 id="routine-vacuuming">
+ <sect1 id="routine-vacuuming" xreflabel="Routine Vacuuming">
   <title>Routine Vacuuming</title>
 
   <indexterm zone="routine-vacuuming">
@@ -82,7 +82,7 @@
    to skim this material to help them understand and adjust autovacuuming.
   </para>
 
-  <sect2 id="vacuum-basics">
+  <sect2 id="vacuum-basics" xreflabel="Vacuuming Basics">
    <title>Vacuuming Basics</title>
 
    <para>
@@ -145,7 +145,7 @@
    </para>
   </sect2>
 
-  <sect2 id="vacuum-for-space-recovery">
+  <sect2 id="vacuum-for-space-recovery" xreflabel="Recovering Disk Space">
    <title>Recovering Disk Space</title>
 
    <indexterm zone="vacuum-for-space-recovery">
@@ -255,7 +255,7 @@
    </tip>
   </sect2>
 
-  <sect2 id="vacuum-for-statistics">
+  <sect2 id="vacuum-for-statistics" xreflabel="Updating Planner Statistics">
    <title>Updating Planner Statistics</title>
 
    <indexterm zone="vacuum-for-statistics">
@@ -371,7 +371,7 @@
 
   </sect2>
 
-  <sect2 id="vacuum-for-visibility-map">
+  <sect2 id="vacuum-for-visibility-map" xreflabel="Updating the Visibility Map">
    <title>Updating the Visibility Map</title>
 
    <para>
@@ -400,7 +400,7 @@
    </para>
   </sect2>
 
-  <sect2 id="vacuum-for-wraparound">
+  <sect2 id="vacuum-for-wraparound" xreflabel="Preventing Transaction ID Wraparound Failures">
    <title>Preventing Transaction ID Wraparound Failures</title>
 
    <indexterm zone="vacuum-for-wraparound">
@@ -752,7 +752,7 @@ HINT:  Execute a database-wide VACUUM in that database.
     </para>
    </note>
 
-   <sect3 id="vacuum-for-multixact-wraparound">
+   <sect3 id="vacuum-for-multixact-wraparound" xreflabel="Multixacts and Wraparound">
     <title>Multixacts and Wraparound</title>
 
     <indexterm>
@@ -855,7 +855,7 @@ HINT:  Execute a database-wide VACUUM in that database.
    </sect3>
   </sect2>
 
-  <sect2 id="autovacuum">
+  <sect2 id="autovacuum" xreflabel="The Autovacuum Daemon">
    <title>The Autovacuum Daemon</title>
 
    <indexterm>
@@ -1036,7 +1036,7 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
  </sect1>
 
 
- <sect1 id="routine-reindex">
+ <sect1 id="routine-reindex" xreflabel="Routine Reindexing">
   <title>Routine Reindexing</title>
 
   <indexterm zone="routine-reindex">
@@ -1084,7 +1084,7 @@ analyze threshold = analyze base threshold + analyze scale factor * number of tu
  </sect1>
 
 
- <sect1 id="logfile-maintenance">
+ <sect1 id="logfile-maintenance" xreflabel="Log File Maintenance">
   <title>Log File Maintenance</title>
 
   <indexterm zone="logfile-maintenance">
diff --git a/doc/src/sgml/manage-ag.sgml b/doc/src/sgml/manage-ag.sgml
index fe4cb4410cd..96b43531e54 100644
--- a/doc/src/sgml/manage-ag.sgml
+++ b/doc/src/sgml/manage-ag.sgml
@@ -14,7 +14,7 @@
   them.
  </para>
 
- <sect1 id="manage-ag-overview">
+ <sect1 id="manage-ag-overview" xreflabel="Overview">
   <title>Overview</title>
 
   <indexterm zone="manage-ag-overview">
@@ -93,7 +93,7 @@ SELECT datname FROM pg_database;
   </note>
  </sect1>
 
- <sect1 id="manage-ag-createdb">
+ <sect1 id="manage-ag-createdb" xreflabel="Creating a Database">
   <title>Creating a Database</title>
 
   <indexterm><primary>CREATE DATABASE</primary></indexterm>
@@ -196,7 +196,7 @@ createdb -O <replaceable>rolename</replaceable> <replaceable>dbname</replaceable
   </para>
  </sect1>
 
- <sect1 id="manage-ag-templatedbs">
+ <sect1 id="manage-ag-templatedbs" xreflabel="Template Databases">
   <title>Template Databases</title>
 
   <para>
@@ -310,7 +310,7 @@ createdb -T template0 <replaceable>dbname</replaceable>
   </note>
  </sect1>
 
- <sect1 id="manage-ag-config">
+ <sect1 id="manage-ag-config" xreflabel="Database Configuration">
   <title>Database Configuration</title>
 
   <para>
@@ -341,7 +341,7 @@ ALTER DATABASE mydb SET geqo TO off;
   </para>
  </sect1>
 
- <sect1 id="manage-ag-dropdb">
+ <sect1 id="manage-ag-dropdb" xreflabel="Destroying a Database">
   <title>Destroying a Database</title>
 
   <para>
@@ -377,7 +377,7 @@ dropdb <replaceable class="parameter">dbname</replaceable>
   </para>
  </sect1>
 
- <sect1 id="manage-ag-tablespaces">
+ <sect1 id="manage-ag-tablespaces" xreflabel="Tablespaces">
   <title>Tablespaces</title>
 
   <indexterm zone="manage-ag-tablespaces">
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 817fd9f4ca7..bc8e9d9a8e0 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -33,7 +33,7 @@
    query.
   </para>
 
- <sect1 id="monitoring-ps">
+ <sect1 id="monitoring-ps" xreflabel="Standard Unix Tools">
   <title>Standard Unix Tools</title>
 
   <indexterm zone="monitoring-ps">
@@ -127,7 +127,7 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
   </tip>
  </sect1>
 
- <sect1 id="monitoring-stats">
+ <sect1 id="monitoring-stats" xreflabel="The Cumulative Statistics System">
   <title>The Cumulative Statistics System</title>
 
   <indexterm zone="monitoring-stats">
@@ -152,7 +152,7 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
    of the cumulative statistics system.
   </para>
 
- <sect2 id="monitoring-stats-setup">
+ <sect2 id="monitoring-stats-setup" xreflabel="Statistics Collection Configuration">
   <title>Statistics Collection Configuration</title>
 
   <para>
@@ -217,7 +217,7 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
 
  </sect2>
 
- <sect2 id="monitoring-stats-views">
+ <sect2 id="monitoring-stats-views" xreflabel="Viewing Statistics">
   <title>Viewing Statistics</title>
 
   <para>
@@ -703,7 +703,7 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-activity-view">
+ <sect2 id="monitoring-pg-stat-activity-view" xreflabel="pg_stat_activity">
   <title><structname>pg_stat_activity</structname></title>
 
   <indexterm>
@@ -1170,7 +1170,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
    </note>
  </sect2>
 
- <sect2 id="monitoring-pg-stat-replication-view">
+ <sect2 id="monitoring-pg-stat-replication-view" xreflabel="pg_stat_replication">
   <title><structname>pg_stat_replication</structname></title>
 
   <indexterm>
@@ -1511,7 +1511,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-replication-slots-view">
+ <sect2 id="monitoring-pg-stat-replication-slots-view" xreflabel="pg_stat_replication_slots">
   <title><structname>pg_stat_replication_slots</structname></title>
 
   <indexterm>
@@ -1695,7 +1695,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-wal-receiver-view">
+ <sect2 id="monitoring-pg-stat-wal-receiver-view" xreflabel="pg_stat_wal_receiver">
   <title><structname>pg_stat_wal_receiver</structname></title>
 
   <indexterm>
@@ -1875,7 +1875,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-recovery-prefetch">
+ <sect2 id="monitoring-pg-stat-recovery-prefetch" xreflabel="pg_stat_recovery_prefetch">
   <title><structname>pg_stat_recovery_prefetch</structname></title>
 
   <indexterm>
@@ -2021,7 +2021,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-subscription">
+ <sect2 id="monitoring-pg-stat-subscription" xreflabel="pg_stat_subscription">
   <title><structname>pg_stat_subscription</structname></title>
 
   <indexterm>
@@ -2158,7 +2158,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-subscription-stats">
+ <sect2 id="monitoring-pg-stat-subscription-stats" xreflabel="pg_stat_subscription_stats">
   <title><structname>pg_stat_subscription_stats</structname></title>
 
   <indexterm>
@@ -2343,7 +2343,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-ssl-view">
+ <sect2 id="monitoring-pg-stat-ssl-view" xreflabel="pg_stat_ssl">
   <title><structname>pg_stat_ssl</structname></title>
 
   <indexterm>
@@ -2464,7 +2464,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-gssapi-view">
+ <sect2 id="monitoring-pg-stat-gssapi-view" xreflabel="pg_stat_gssapi">
   <title><structname>pg_stat_gssapi</structname></title>
 
   <indexterm>
@@ -2548,7 +2548,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-archiver-view">
+ <sect2 id="monitoring-pg-stat-archiver-view" xreflabel="pg_stat_archiver">
   <title><structname>pg_stat_archiver</structname></title>
 
   <indexterm>
@@ -2651,7 +2651,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
   </para>
  </sect2>
 
- <sect2 id="monitoring-pg-stat-io-view">
+ <sect2 id="monitoring-pg-stat-io-view" xreflabel="pg_stat_io">
   <title><structname>pg_stat_io</structname></title>
 
   <indexterm>
@@ -3087,7 +3087,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-bgwriter-view">
+ <sect2 id="monitoring-pg-stat-bgwriter-view" xreflabel="pg_stat_bgwriter">
   <title><structname>pg_stat_bgwriter</structname></title>
 
   <indexterm>
@@ -3156,7 +3156,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-checkpointer-view">
+ <sect2 id="monitoring-pg-stat-checkpointer-view" xreflabel="pg_stat_checkpointer">
   <title><structname>pg_stat_checkpointer</structname></title>
 
   <indexterm>
@@ -3303,7 +3303,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
   </para>
  </sect2>
 
- <sect2 id="monitoring-pg-stat-wal-view">
+ <sect2 id="monitoring-pg-stat-wal-view" xreflabel="pg_stat_wal">
    <title><structname>pg_stat_wal</structname></title>
 
   <indexterm>
@@ -3389,7 +3389,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
 </sect2>
 
- <sect2 id="monitoring-pg-stat-database-view">
+ <sect2 id="monitoring-pg-stat-database-view" xreflabel="pg_stat_database">
   <title><structname>pg_stat_database</structname></title>
 
   <indexterm>
@@ -3732,7 +3732,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-database-conflicts-view">
+ <sect2 id="monitoring-pg-stat-database-conflicts-view" xreflabel="pg_stat_database_conflicts">
   <title><structname>pg_stat_database_conflicts</structname></title>
 
   <indexterm>
@@ -3846,7 +3846,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-all-tables-view">
+ <sect2 id="monitoring-pg-stat-all-tables-view" xreflabel="pg_stat_all_tables">
   <title><structname>pg_stat_all_tables</structname></title>
 
   <indexterm>
@@ -4188,7 +4188,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-all-indexes-view">
+ <sect2 id="monitoring-pg-stat-all-indexes-view" xreflabel="pg_stat_all_indexes">
   <title><structname>pg_stat_all_indexes</structname></title>
 
   <indexterm>
@@ -4378,7 +4378,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-statio-all-tables-view">
+ <sect2 id="monitoring-pg-statio-all-tables-view" xreflabel="pg_statio_all_tables">
   <title><structname>pg_statio_all_tables</structname></title>
 
   <indexterm>
@@ -4523,7 +4523,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-statio-all-indexes-view">
+ <sect2 id="monitoring-pg-statio-all-indexes-view" xreflabel="pg_statio_all_indexes">
   <title><structname>pg_statio_all_indexes</structname></title>
 
   <indexterm>
@@ -4632,7 +4632,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-statio-all-sequences-view">
+ <sect2 id="monitoring-pg-statio-all-sequences-view" xreflabel="pg_statio_all_sequences">
   <title><structname>pg_statio_all_sequences</structname></title>
 
   <indexterm>
@@ -4710,7 +4710,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-user-functions-view">
+ <sect2 id="monitoring-pg-stat-user-functions-view" xreflabel="pg_stat_user_functions">
   <title><structname>pg_stat_user_functions</structname></title>
 
   <indexterm>
@@ -4809,7 +4809,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-pg-stat-slru-view">
+ <sect2 id="monitoring-pg-stat-slru-view" xreflabel="pg_stat_slru">
   <title><structname>pg_stat_slru</structname></title>
 
   <indexterm>
@@ -4938,7 +4938,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
 
  </sect2>
 
- <sect2 id="monitoring-stats-functions">
+ <sect2 id="monitoring-stats-functions" xreflabel="Statistics Functions">
   <title>Statistics Functions</title>
 
   <para>
@@ -5552,7 +5552,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
  </sect2>
  </sect1>
 
- <sect1 id="monitoring-locks">
+ <sect1 id="monitoring-locks" xreflabel="Viewing Locks">
   <title>Viewing Locks</title>
 
   <indexterm zone="monitoring-locks">
@@ -5601,7 +5601,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
   </para>
  </sect1>
 
- <sect1 id="progress-reporting">
+ <sect1 id="progress-reporting" xreflabel="Progress Reporting">
   <title>Progress Reporting</title>
 
   <para>
@@ -5617,7 +5617,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
    This may be expanded in the future.
   </para>
 
- <sect2 id="analyze-progress-reporting">
+ <sect2 id="analyze-progress-reporting" xreflabel="ANALYZE Progress Reporting">
   <title>ANALYZE Progress Reporting</title>
 
   <indexterm>
@@ -5871,7 +5871,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
   </note>
  </sect2>
 
- <sect2 id="cluster-progress-reporting">
+ <sect2 id="cluster-progress-reporting" xreflabel="CLUSTER Progress Reporting">
   <title>CLUSTER Progress Reporting</title>
 
   <indexterm>
@@ -6093,7 +6093,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
   </table>
  </sect2>
 
- <sect2 id="copy-progress-reporting">
+ <sect2 id="copy-progress-reporting" xreflabel="COPY Progress Reporting">
   <title>COPY Progress Reporting</title>
 
   <indexterm>
@@ -6239,7 +6239,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
   </table>
  </sect2>
 
- <sect2 id="create-index-progress-reporting">
+ <sect2 id="create-index-progress-reporting" xreflabel="CREATE INDEX Progress Reporting">
   <title>CREATE INDEX Progress Reporting</title>
 
   <indexterm>
@@ -6543,7 +6543,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
 
  </sect2>
 
- <sect2 id="vacuum-progress-reporting">
+ <sect2 id="vacuum-progress-reporting" xreflabel="VACUUM Progress Reporting">
   <title>VACUUM Progress Reporting</title>
 
   <indexterm>
@@ -6895,7 +6895,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
   </table>
  </sect2>
 
- <sect2 id="basebackup-progress-reporting">
+ <sect2 id="basebackup-progress-reporting" xreflabel="Base Backup Progress Reporting">
   <title>Base Backup Progress Reporting</title>
 
   <indexterm>
@@ -7082,7 +7082,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
 
  </sect1>
 
- <sect1 id="dynamic-trace">
+ <sect1 id="dynamic-trace" xreflabel="Dynamic Tracing">
   <title>Dynamic Tracing</title>
 
  <indexterm zone="dynamic-trace">
@@ -7115,7 +7115,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
    the macros in <filename>src/include/utils/probes.h</filename>.
   </para>
 
-  <sect2 id="compiling-for-trace">
+  <sect2 id="compiling-for-trace" xreflabel="Compiling for Dynamic Tracing">
    <title>Compiling for Dynamic Tracing</title>
 
   <para>
@@ -7127,7 +7127,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
   </para>
   </sect2>
 
-  <sect2 id="trace-points">
+  <sect2 id="trace-points" xreflabel="Built-in Probes">
    <title>Built-in Probes</title>
 
   <para>
@@ -7624,7 +7624,7 @@ FROM pg_stat_get_backend_idset() AS backendid;
 
   </sect2>
 
-  <sect2 id="using-trace-points">
+  <sect2 id="using-trace-points" xreflabel="Using Probes">
    <title>Using Probes</title>
 
   <para>
@@ -7684,7 +7684,7 @@ Total time (ns)                        2312105013
   </para>
   </sect2>
 
-  <sect2 id="defining-trace-points">
+  <sect2 id="defining-trace-points" xreflabel="Defining New Probes">
    <title>Defining New Probes</title>
 
   <para>
@@ -7825,7 +7825,7 @@ if (TRACE_POSTGRESQL_TRANSACTION_START_ENABLED())
 
  </sect1>
 
- <sect1 id="diskusage">
+ <sect1 id="diskusage" xreflabel="Monitoring Disk Usage">
   <title>Monitoring Disk Usage</title>
 
   <para>
@@ -7833,7 +7833,7 @@ if (TRACE_POSTGRESQL_TRANSACTION_START_ENABLED())
    <productname>PostgreSQL</productname> database system.
   </para>
 
-  <sect2 id="disk-usage">
+  <sect2 id="disk-usage" xreflabel="Determining Disk Usage">
    <title>Determining Disk Usage</title>
 
    <indexterm zone="disk-usage">
@@ -7934,7 +7934,7 @@ ORDER BY relpages DESC;
    </para>
   </sect2>
 
-  <sect2 id="disk-full">
+  <sect2 id="disk-full" xreflabel="Disk Full Failure">
    <title>Disk Full Failure</title>
 
    <para>
diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml
index 049ee75a4ba..e43dd7411ce 100644
--- a/doc/src/sgml/mvcc.sgml
+++ b/doc/src/sgml/mvcc.sgml
@@ -17,7 +17,7 @@
    in this chapter.
   </para>
 
-  <sect1 id="mvcc-intro">
+  <sect1 id="mvcc-intro" xreflabel="Introduction">
    <title>Introduction</title>
 
    <indexterm>
@@ -78,7 +78,7 @@
    </para>
   </sect1>
 
-  <sect1 id="transaction-iso">
+  <sect1 id="transaction-iso" xreflabel="Transaction Isolation">
    <title>Transaction Isolation</title>
 
    <indexterm>
@@ -302,7 +302,7 @@
      </para>
    </important>
 
-  <sect2 id="xact-read-committed">
+  <sect2 id="xact-read-committed" xreflabel="Read Committed Isolation Level">
    <title>Read Committed Isolation Level</title>
 
    <indexterm>
@@ -477,7 +477,7 @@ COMMIT;
    </para>
   </sect2>
 
-  <sect2 id="xact-repeatable-read">
+  <sect2 id="xact-repeatable-read" xreflabel="Repeatable Read Isolation Level">
    <title>Repeatable Read Isolation Level</title>
 
    <indexterm>
@@ -597,7 +597,7 @@ ERROR:  could not serialize access due to concurrent update
    </note>
   </sect2>
 
-  <sect2 id="xact-serializable">
+  <sect2 id="xact-serializable" xreflabel="Serializable Isolation Level">
    <title>Serializable Isolation Level</title>
 
    <indexterm>
@@ -847,7 +847,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
   </sect2>
  </sect1>
 
-  <sect1 id="explicit-locking">
+  <sect1 id="explicit-locking" xreflabel="Explicit Locking">
    <title>Explicit Locking</title>
 
    <indexterm>
@@ -876,7 +876,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
     manager subsystem, refer to <xref linkend="monitoring"/>.
    </para>
 
-  <sect2 id="locking-tables">
+  <sect2 id="locking-tables" xreflabel="Table-Level Locks">
    <title>Table-Level Locks</title>
 
    <indexterm zone="locking-tables">
@@ -1238,7 +1238,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
     </table>
    </sect2>
 
-   <sect2 id="locking-rows">
+   <sect2 id="locking-rows" xreflabel="Row-Level Locks">
     <title>Row-Level Locks</title>
 
     <para>
@@ -1413,7 +1413,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
     </table>
    </sect2>
 
-   <sect2 id="locking-pages">
+   <sect2 id="locking-pages" xreflabel="Page-Level Locks">
     <title>Page-Level Locks</title>
 
     <para>
@@ -1426,7 +1426,7 @@ ERROR:  could not serialize access due to read/write dependencies among transact
 
    </sect2>
 
-   <sect2 id="locking-deadlocks">
+   <sect2 id="locking-deadlocks" xreflabel="Deadlocks">
     <title>Deadlocks</title>
 
     <indexterm zone="locking-deadlocks">
@@ -1510,7 +1510,7 @@ UPDATE accounts SET balance = balance - 100.00 WHERE acctnum = 22222;
     </para>
    </sect2>
 
-   <sect2 id="advisory-locks">
+   <sect2 id="advisory-locks" xreflabel="Advisory Locks">
     <title>Advisory Locks</title>
 
     <indexterm zone="advisory-locks">
@@ -1613,7 +1613,7 @@ SELECT pg_advisory_lock(q.id) FROM
 
   </sect1>
 
-  <sect1 id="applevel-consistency">
+  <sect1 id="applevel-consistency" xreflabel="Data Consistency Checks at the Application Level">
    <title>Data Consistency Checks at the Application Level</title>
 
    <para>
@@ -1651,7 +1651,7 @@ SELECT pg_advisory_lock(q.id) FROM
     break the cycle.
    </para>
 
-   <sect2 id="serializable-consistency">
+   <sect2 id="serializable-consistency" xreflabel="Enforcing Consistency with Serializable Transactions">
     <title>Enforcing Consistency with Serializable Transactions</title>
 
     <para>
@@ -1691,7 +1691,7 @@ SELECT pg_advisory_lock(q.id) FROM
     </warning>
    </sect2>
 
-   <sect2 id="non-serializable-consistency">
+   <sect2 id="non-serializable-consistency" xreflabel="Enforcing Consistency with Explicit Blocking Locks">
     <title>Enforcing Consistency with Explicit Blocking Locks</title>
 
     <para>
@@ -1763,7 +1763,7 @@ SELECT pg_advisory_lock(q.id) FROM
    </sect2>
   </sect1>
 
-  <sect1 id="mvcc-serialization-failure-handling">
+  <sect1 id="mvcc-serialization-failure-handling" xreflabel="Serialization Failure Handling">
    <title>Serialization Failure Handling</title>
 
    <indexterm>
@@ -1829,7 +1829,7 @@ SELECT pg_advisory_lock(q.id) FROM
    </para>
   </sect1>
 
-  <sect1 id="mvcc-caveats">
+  <sect1 id="mvcc-caveats" xreflabel="Caveats">
    <title>Caveats</title>
 
    <para>
@@ -1871,7 +1871,7 @@ SELECT pg_advisory_lock(q.id) FROM
    </para>
   </sect1>
 
-  <sect1 id="locking-indexes">
+  <sect1 id="locking-indexes" xreflabel="Locking and Indexes">
    <title>Locking and Indexes</title>
 
    <indexterm zone="locking-indexes">
diff --git a/doc/src/sgml/nls.sgml b/doc/src/sgml/nls.sgml
index 0ad1b2c9c45..2a699f79f8f 100644
--- a/doc/src/sgml/nls.sgml
+++ b/doc/src/sgml/nls.sgml
@@ -3,7 +3,7 @@
 <chapter id="nls">
  <title>Native Language Support</title>
 
- <sect1 id="nls-translator">
+ <sect1 id="nls-translator" xreflabel="For the Translator">
   <title>For the Translator</title>
 
   <para>
@@ -17,7 +17,7 @@
    to do this.  This section explains how to help.
   </para>
 
-  <sect2 id="nls-translator-requirements">
+  <sect2 id="nls-translator-requirements" xreflabel="Requirements">
    <title>Requirements</title>
 
    <para>
@@ -50,7 +50,7 @@
    </para>
   </sect2>
 
-  <sect2 id="nls-translator-concepts">
+  <sect2 id="nls-translator-concepts" xreflabel="Concepts">
    <title>Concepts</title>
 
    <para>
@@ -130,7 +130,7 @@ msgstr "another translated"
    </para>
   </sect2>
 
-  <sect2 id="nls-translator-message-catalogs">
+  <sect2 id="nls-translator-message-catalogs" xreflabel="Creating and Maintaining Message Catalogs">
    <title>Creating and Maintaining Message Catalogs</title>
 
    <para>
@@ -199,7 +199,7 @@ make update-po
    </para>
   </sect2>
 
-  <sect2 id="nls-translator-editing-po">
+  <sect2 id="nls-translator-editing-po" xreflabel="Editing the PO Files">
    <title>Editing the PO Files</title>
 
    <para>
@@ -298,10 +298,10 @@ msgstr "Die Datei %2$s hat %1$u Zeichen."
  </sect1>
 
 
- <sect1 id="nls-programmer">
+ <sect1 id="nls-programmer" xreflabel="For the Programmer">
   <title>For the Programmer</title>
 
-  <sect2 id="nls-mechanics">
+  <sect2 id="nls-mechanics" xreflabel="Mechanics">
    <title>Mechanics</title>
 
   <para>
@@ -434,7 +434,7 @@ fprintf(stderr, gettext("panic level %d\n"), lvl);
   </para>
   </sect2>
 
-  <sect2 id="nls-guidelines">
+  <sect2 id="nls-guidelines" xreflabel="Message-Writing Guidelines">
    <title>Message-Writing Guidelines</title>
 
   <para>
diff --git a/doc/src/sgml/notation.sgml b/doc/src/sgml/notation.sgml
index c3798d5f1be..6ff8f58277a 100644
--- a/doc/src/sgml/notation.sgml
+++ b/doc/src/sgml/notation.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/notation.sgml -->
 
-<sect1 id="notation">
+<sect1 id="notation" xreflabel="Conventions">
  <title>Conventions</title>
 
  <para>
diff --git a/doc/src/sgml/oauth-validators.sgml b/doc/src/sgml/oauth-validators.sgml
index 704089dd7b3..22ce45ecf43 100644
--- a/doc/src/sgml/oauth-validators.sgml
+++ b/doc/src/sgml/oauth-validators.sgml
@@ -26,7 +26,7 @@
   </para>
  </warning>
 
- <sect1 id="oauth-validator-design">
+ <sect1 id="oauth-validator-design" xreflabel="Safely Designing a Validator Module">
   <title>Safely Designing a Validator Module</title>
   <warning>
    <para>
@@ -38,7 +38,7 @@
    </para>
   </warning>
 
-  <sect2 id="oauth-validator-design-responsibilities">
+  <sect2 id="oauth-validator-design-responsibilities" xreflabel="Validator Responsibilities">
    <title>Validator Responsibilities</title>
    <para>
     Although different modules may take very different approaches to token
@@ -164,7 +164,7 @@
    </variablelist>
   </sect2>
 
-  <sect2 id="oauth-validator-design-guidelines">
+  <sect2 id="oauth-validator-design-guidelines" xreflabel="General Coding Guidelines">
    <title>General Coding Guidelines</title>
    <para>
     Developers should keep the following in mind when implementing token
@@ -247,7 +247,7 @@
    </variablelist>
   </sect2>
 
-  <sect2 id="oauth-validator-design-usermap-delegation">
+  <sect2 id="oauth-validator-design-usermap-delegation" xreflabel="Authorizing Users (Usermap Delegation)">
    <title>Authorizing Users (Usermap Delegation)</title>
    <para>
     The standard deliverable of a validation module is the user identifier,
@@ -286,7 +286,7 @@
   </sect2>
  </sect1>
 
- <sect1 id="oauth-validator-init">
+ <sect1 id="oauth-validator-init" xreflabel="Initialization Functions">
   <title>Initialization Functions</title>
   <indexterm zone="oauth-validator-init">
    <primary>_PG_oauth_validator_module_init</primary>
@@ -322,7 +322,7 @@ typedef const OAuthValidatorCallbacks *(*OAuthValidatorModuleInit) (void);
   </para>
  </sect1>
 
- <sect1 id="oauth-validator-callbacks">
+ <sect1 id="oauth-validator-callbacks" xreflabel="OAuth Validator Callbacks">
   <title>OAuth Validator Callbacks</title>
   <para>
    OAuth validator modules implement their functionality by defining a set of
@@ -330,7 +330,7 @@ typedef const OAuthValidatorCallbacks *(*OAuthValidatorModuleInit) (void);
    authentication request from the user.
   </para>
 
-  <sect2 id="oauth-validator-callback-startup">
+  <sect2 id="oauth-validator-callback-startup" xreflabel="Startup Callback">
    <title>Startup Callback</title>
    <para>
     The <function>startup_cb</function> callback is executed directly after
@@ -345,7 +345,7 @@ typedef void (*ValidatorStartupCB) (ValidatorModuleState *state);
    </para>
   </sect2>
 
-  <sect2 id="oauth-validator-callback-validate">
+  <sect2 id="oauth-validator-callback-validate" xreflabel="Validate Callback">
    <title>Validate Callback</title>
    <para>
     The <function>validate_cb</function> callback is executed during the OAuth
@@ -400,7 +400,7 @@ typedef struct ValidatorModuleResult
    </para>
   </sect2>
 
-  <sect2 id="oauth-validator-callback-shutdown">
+  <sect2 id="oauth-validator-callback-shutdown" xreflabel="Shutdown Callback">
    <title>Shutdown Callback</title>
    <para>
     The <function>shutdown_cb</function> callback is executed when the backend
diff --git a/doc/src/sgml/pageinspect.sgml b/doc/src/sgml/pageinspect.sgml
index 3a113439e1d..fa78b52d8b2 100644
--- a/doc/src/sgml/pageinspect.sgml
+++ b/doc/src/sgml/pageinspect.sgml
@@ -13,7 +13,7 @@
   debugging purposes.  All of these functions may be used only by superusers.
  </para>
 
- <sect2 id="pageinspect-general-funcs">
+ <sect2 id="pageinspect-general-funcs" xreflabel="General Functions">
   <title>General Functions</title>
 
   <variablelist>
@@ -156,7 +156,7 @@ test=# SELECT fsm_page_contents(get_raw_page('pg_class', 'fsm', 0));
   </variablelist>
  </sect2>
 
- <sect2 id="pageinspect-heap-funcs">
+ <sect2 id="pageinspect-heap-funcs" xreflabel="Heap Functions">
   <title>Heap Functions</title>
 
   <variablelist>
@@ -282,7 +282,7 @@ test=# SELECT t_ctid, raw_flags, combined_flags
   </variablelist>
  </sect2>
 
- <sect2 id="pageinspect-b-tree-funcs">
+ <sect2 id="pageinspect-b-tree-funcs" xreflabel="B-Tree Functions">
   <title>B-Tree Functions</title>
 
   <variablelist>
@@ -521,7 +521,7 @@ test=# SELECT itemoffset, ctid, itemlen, nulls, vars, data, dead, htid, tids[0:2
   </variablelist>
  </sect2>
 
- <sect2 id="pageinspect-brin-funcs">
+ <sect2 id="pageinspect-brin-funcs" xreflabel="BRIN Functions">
   <title>BRIN Functions</title>
 
   <variablelist>
@@ -631,7 +631,7 @@ test=# SELECT * FROM brin_page_items(get_raw_page('brinidx', 5),
   </variablelist>
  </sect2>
 
- <sect2 id="pageinspect-gin-funcs">
+ <sect2 id="pageinspect-gin-funcs" xreflabel="GIN Functions">
   <title>GIN Functions</title>
 
   <variablelist>
@@ -721,7 +721,7 @@ test=# SELECT first_tid, nbytes, tids[0:5] AS some_tids
   </variablelist>
  </sect2>
 
- <sect2 id="pageinspect-gist-funcs">
+ <sect2 id="pageinspect-gist-funcs" xreflabel="GiST Functions">
   <title>GiST Functions</title>
 
   <variablelist>
@@ -811,7 +811,7 @@ test=# SELECT * FROM gist_page_items_bytea(get_raw_page('test_gist_idx', 0));
   </variablelist>
  </sect2>
 
- <sect2 id="pageinspect-hash-funcs">
+ <sect2 id="pageinspect-hash-funcs" xreflabel="Hash Functions">
   <title>Hash Functions</title>
 
   <variablelist>
diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml
index af43484703e..17d895468a6 100644
--- a/doc/src/sgml/parallel.sgml
+++ b/doc/src/sgml/parallel.sgml
@@ -22,7 +22,7 @@
    used so that users who wish to make use of it can understand what to expect.
   </para>
 
- <sect1 id="how-parallel-query-works">
+ <sect1 id="how-parallel-query-works" xreflabel="How Parallel Query Works">
   <title>How Parallel Query Works</title>
 
    <para>
@@ -105,7 +105,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
    </para>
  </sect1>
 
- <sect1 id="when-can-parallel-query-be-used">
+ <sect1 id="when-can-parallel-query-be-used" xreflabel="When Can Parallel Query Be Used?">
   <title>When Can Parallel Query Be Used?</title>
 
   <para>
@@ -244,7 +244,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
   </itemizedlist>
  </sect1>
 
- <sect1 id="parallel-plans">
+ <sect1 id="parallel-plans" xreflabel="Parallel Plans">
   <title>Parallel Plans</title>
 
   <para>
@@ -262,7 +262,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
     must be a parallel-aware scan.
   </para>
 
- <sect2 id="parallel-scans">
+ <sect2 id="parallel-scans" xreflabel="Parallel Scans">
   <title>Parallel Scans</title>
 
   <para>
@@ -315,7 +315,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
   </para>
  </sect2>
 
- <sect2 id="parallel-joins">
+ <sect2 id="parallel-joins" xreflabel="Parallel Joins">
   <title>Parallel Joins</title>
 
   <para>
@@ -359,7 +359,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
   </itemizedlist>
  </sect2>
 
- <sect2 id="parallel-aggregation">
+ <sect2 id="parallel-aggregation" xreflabel="Parallel Aggregation">
   <title>Parallel Aggregation</title>
   <para>
     <productname>PostgreSQL</productname> supports parallel aggregation by aggregating in
@@ -401,7 +401,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
 
  </sect2>
 
- <sect2 id="parallel-append">
+ <sect2 id="parallel-append" xreflabel="Parallel Append">
   <title>Parallel Append</title>
 
   <para>
@@ -449,7 +449,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
   </para>
  </sect2>
 
- <sect2 id="parallel-plan-tips">
+ <sect2 id="parallel-plan-tips" xreflabel="Parallel Plan Tips">
   <title>Parallel Plan Tips</title>
 
   <para>
@@ -477,7 +477,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
  </sect2>
  </sect1>
 
- <sect1 id="parallel-safety">
+ <sect1 id="parallel-safety" xreflabel="Parallel Safety">
   <title>Parallel Safety</title>
 
   <para>
@@ -526,7 +526,7 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
     </listitem>
   </itemizedlist>
 
- <sect2 id="parallel-labeling">
+ <sect2 id="parallel-labeling" xreflabel="Parallel Labeling for Functions and Aggregates">
   <title>Parallel Labeling for Functions and Aggregates</title>
 
   <para>
diff --git a/doc/src/sgml/passwordcheck.sgml b/doc/src/sgml/passwordcheck.sgml
index 7ea32410463..1b7a4ed8f54 100644
--- a/doc/src/sgml/passwordcheck.sgml
+++ b/doc/src/sgml/passwordcheck.sgml
@@ -59,7 +59,7 @@
   </para>
  </caution>
 
- <sect2 id="passwordcheck-configuration-parameters">
+ <sect2 id="passwordcheck-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
   <variablelist>
diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml
index 5f6f1db0467..113c547b96d 100644
--- a/doc/src/sgml/perform.sgml
+++ b/doc/src/sgml/perform.sgml
@@ -14,7 +14,7 @@
    and tuning <productname>PostgreSQL</productname> performance.
   </para>
 
- <sect1 id="using-explain">
+ <sect1 id="using-explain" xreflabel="Using EXPLAIN">
   <title>Using <command>EXPLAIN</command></title>
 
    <indexterm zone="using-explain">
@@ -54,7 +54,7 @@
     (XML, JSON, or YAML) instead.
    </para>
 
-  <sect2 id="using-explain-basics">
+  <sect2 id="using-explain-basics" xreflabel="EXPLAIN Basics">
    <title><command>EXPLAIN</command> Basics</title>
 
    <para>
@@ -703,7 +703,7 @@ FROM tenk1 t1 WHERE t1.ten = (SELECT (random() * 10)::integer);
 
   </sect2>
 
-  <sect2 id="using-explain-analyze">
+  <sect2 id="using-explain-analyze" xreflabel="EXPLAIN ANALYZE">
    <title><command>EXPLAIN ANALYZE</command></title>
 
    <para>
@@ -1105,7 +1105,7 @@ EXPLAIN UPDATE gtest_parent SET f1 = CURRENT_DATE WHERE f2 = 101;
 
   </sect2>
 
-  <sect2 id="using-explain-caveats">
+  <sect2 id="using-explain-caveats" xreflabel="Caveats">
    <title>Caveats</title>
 
    <para>
@@ -1203,7 +1203,7 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 WHERE unique1 &lt; 100 AND unique2 &gt; 9000
 
  </sect1>
 
- <sect1 id="planner-stats">
+ <sect1 id="planner-stats" xreflabel="Statistics Used by the Planner">
   <title>Statistics Used by the Planner</title>
 
   <indexterm zone="planner-stats">
@@ -1211,7 +1211,7 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 WHERE unique1 &lt; 100 AND unique2 &gt; 9000
    <secondary>of the planner</secondary>
   </indexterm>
 
-  <sect2 id="planner-stats-single-column">
+  <sect2 id="planner-stats-single-column" xreflabel="Single-Column Statistics">
    <title>Single-Column Statistics</title>
   <para>
    As we saw in the previous section, the query planner needs to estimate
@@ -1368,7 +1368,7 @@ WHERE tablename = 'road';
   </para>
   </sect2>
 
-  <sect2 id="planner-stats-extended">
+  <sect2 id="planner-stats-extended" xreflabel="Extended Statistics">
    <title>Extended Statistics</title>
 
    <indexterm zone="planner-stats-extended">
@@ -1436,7 +1436,7 @@ WHERE tablename = 'road';
     that are currently supported.
    </para>
 
-   <sect3 id="planner-stats-extended-functional-deps">
+   <sect3 id="planner-stats-extended-functional-deps" xreflabel="Functional Dependencies">
     <title>Functional Dependencies</title>
 
     <para>
@@ -1521,7 +1521,7 @@ dep | [                          +
      an underestimate.
     </para>
 
-    <sect4 id="planner-stats-extended-functional-deps-limits">
+    <sect4 id="planner-stats-extended-functional-deps-limits" xreflabel="Limitations of Functional Dependencies">
      <title>Limitations of Functional Dependencies</title>
 
      <para>
@@ -1562,7 +1562,7 @@ SELECT * FROM zipcodes WHERE city = 'San Francisco' AND zip = '90210';
     </sect4>
    </sect3>
 
-   <sect3 id="planner-stats-extended-n-distinct-counts">
+   <sect3 id="planner-stats-extended-n-distinct-counts" xreflabel="Multivariate N-Distinct Counts">
     <title>Multivariate N-Distinct Counts</title>
 
     <para>
@@ -1645,7 +1645,7 @@ nd | [                          +
     </para>
    </sect3>
 
-   <sect3 id="planner-stats-extended-mcv-lists">
+   <sect3 id="planner-stats-extended-mcv-lists" xreflabel="Multivariate MCV Lists">
     <title>Multivariate MCV Lists</title>
 
     <para>
@@ -1713,7 +1713,7 @@ SELECT m.* FROM pg_statistic_ext join pg_statistic_ext_data on (oid = stxoid),
   </sect2>
  </sect1>
 
- <sect1 id="explicit-joins">
+ <sect1 id="explicit-joins" xreflabel="Controlling the Planner with Explicit JOIN Clauses">
   <title>Controlling the Planner with Explicit <literal>JOIN</literal> Clauses</title>
 
   <indexterm zone="explicit-joins">
@@ -1887,7 +1887,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
   </para>
  </sect1>
 
- <sect1 id="populate">
+ <sect1 id="populate" xreflabel="Populating a Database">
   <title>Populating a Database</title>
 
   <para>
@@ -1896,7 +1896,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    this process as efficient as possible.
   </para>
 
-  <sect2 id="disable-autocommit">
+  <sect2 id="disable-autocommit" xreflabel="Disable Autocommit">
    <title>Disable Autocommit</title>
 
    <indexterm>
@@ -1921,7 +1921,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
   </sect2>
 
-  <sect2 id="populate-copy-from">
+  <sect2 id="populate-copy-from" xreflabel="Use COPY">
    <title>Use <command>COPY</command></title>
 
    <para>
@@ -1966,7 +1966,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
 
   </sect2>
 
-  <sect2 id="populate-rm-indexes">
+  <sect2 id="populate-rm-indexes" xreflabel="Remove Indexes">
    <title>Remove Indexes</title>
 
    <para>
@@ -1989,7 +1989,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
   </sect2>
 
-  <sect2 id="populate-rm-fkeys">
+  <sect2 id="populate-rm-fkeys" xreflabel="Remove Foreign Key Constraints">
    <title>Remove Foreign Key Constraints</title>
 
    <para>
@@ -2014,7 +2014,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
   </sect2>
 
-  <sect2 id="populate-work-mem">
+  <sect2 id="populate-work-mem" xreflabel="Increase maintenance_work_mem">
    <title>Increase <varname>maintenance_work_mem</varname></title>
 
    <para>
@@ -2027,7 +2027,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
   </sect2>
 
-  <sect2 id="populate-max-wal-size">
+  <sect2 id="populate-max-wal-size" xreflabel="Increase max_wal_size">
    <title>Increase <varname>max_wal_size</varname></title>
 
    <para>
@@ -2045,7 +2045,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
   </sect2>
 
-  <sect2 id="populate-pitr">
+  <sect2 id="populate-pitr" xreflabel="Disable WAL Archival and Streaming Replication">
    <title>Disable WAL Archival and Streaming Replication</title>
 
    <para>
@@ -2073,7 +2073,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
   </sect2>
 
-  <sect2 id="populate-analyze">
+  <sect2 id="populate-analyze" xreflabel="Run ANALYZE Afterwards">
    <title>Run <command>ANALYZE</command> Afterwards</title>
 
    <para>
@@ -2092,7 +2092,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
    </para>
   </sect2>
 
-  <sect2 id="populate-pg-dump">
+  <sect2 id="populate-pg-dump" xreflabel="Some Notes about pg_dump">
    <title>Some Notes about <application>pg_dump</application></title>
 
    <para>
@@ -2195,7 +2195,7 @@ SELECT * FROM x, y, a, b, c WHERE something AND somethingelse;
   </sect2>
   </sect1>
 
-  <sect1 id="non-durability">
+  <sect1 id="non-durability" xreflabel="Non-Durable Settings">
    <title>Non-Durable Settings</title>
 
    <indexterm zone="non-durability">
diff --git a/doc/src/sgml/pgbuffercache.sgml b/doc/src/sgml/pgbuffercache.sgml
index 1e9aee10275..163a11716e4 100644
--- a/doc/src/sgml/pgbuffercache.sgml
+++ b/doc/src/sgml/pgbuffercache.sgml
@@ -146,7 +146,7 @@
   this function is restricted to superusers only.
  </para>
 
- <sect2 id="pgbuffercache-pg-buffercache">
+ <sect2 id="pgbuffercache-pg-buffercache" xreflabel="The pg_buffercache View">
   <title>The <structname>pg_buffercache</structname> View</title>
 
   <para>
@@ -281,7 +281,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-os-pages">
+ <sect2 id="pgbuffercache-pg-buffercache-os-pages" xreflabel="The pg_buffercache_os_pages View">
   <title>The <structname>pg_buffercache_os_pages</structname> View</title>
 
   <para>
@@ -328,7 +328,7 @@
 
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-numa">
+ <sect2 id="pgbuffercache-pg-buffercache-numa" xreflabel="The pg_buffercache_numa View">
   <title>The <structname>pg_buffercache_numa</structname> View</title>
 
   <para>
@@ -400,7 +400,7 @@
 
  </sect2>
 
- <sect2 id="pgbuffercache-summary">
+ <sect2 id="pgbuffercache-summary" xreflabel="The pg_buffercache_summary() Function">
   <title>The <function>pg_buffercache_summary()</function> Function</title>
 
   <para>
@@ -486,7 +486,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-usage-counts">
+ <sect2 id="pgbuffercache-usage-counts" xreflabel="The pg_buffercache_usage_counts() Function">
   <title>The <function>pg_buffercache_usage_counts()</function> Function</title>
 
   <para>
@@ -564,7 +564,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-evict">
+ <sect2 id="pgbuffercache-pg-buffercache-evict" xreflabel="The pg_buffercache_evict() Function">
   <title>The <function>pg_buffercache_evict()</function> Function</title>
   <para>
    The <function>pg_buffercache_evict()</function> function takes a buffer
@@ -584,7 +584,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-evict-relation">
+ <sect2 id="pgbuffercache-pg-buffercache-evict-relation" xreflabel="The pg_buffercache_evict_relation() Function">
   <title>The <function>pg_buffercache_evict_relation()</function> Function</title>
   <para>
    The <function>pg_buffercache_evict_relation()</function> function is very
@@ -602,7 +602,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-evict-all">
+ <sect2 id="pgbuffercache-pg-buffercache-evict-all" xreflabel="The pg_buffercache_evict_all() Function">
   <title>The <function>pg_buffercache_evict_all()</function> Function</title>
   <para>
    The <function>pg_buffercache_evict_all()</function> function is very
@@ -618,7 +618,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-mark-dirty">
+ <sect2 id="pgbuffercache-pg-buffercache-mark-dirty" xreflabel="The pg_buffercache_mark_dirty() Function">
   <title>The <function>pg_buffercache_mark_dirty()</function> Function</title>
   <para>
    The <function>pg_buffercache_mark_dirty()</function> function takes a
@@ -636,7 +636,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-mark-dirty-relation">
+ <sect2 id="pgbuffercache-pg-buffercache-mark-dirty-relation" xreflabel="The pg_buffercache_mark_dirty_relation() Function">
   <title>The <function>pg_buffercache_mark_dirty_relation()</function> Function</title>
   <para>
    The <function>pg_buffercache_mark_dirty_relation()</function> function is
@@ -655,7 +655,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgbuffercache-pg-buffercache-mark-dirty-all">
+ <sect2 id="pgbuffercache-pg-buffercache-mark-dirty-all" xreflabel="The pg_buffercache_mark_dirty_all() Function">
   <title>The <function>pg_buffercache_mark_dirty_all()</function> Function</title>
   <para>
    The <function>pg_buffercache_mark_dirty_all()</function> function is
@@ -673,7 +673,7 @@
   </para>
  </sect2>
 
-<sect2 id="pgbuffercache-sample-output">
+<sect2 id="pgbuffercache-sample-output" xreflabel="Sample Output">
   <title>Sample Output</title>
 
 <screen>
@@ -762,7 +762,7 @@ regression=# SELECT * FROM pg_buffercache_usage_counts();
 </screen>
  </sect2>
 
- <sect2 id="pgbuffercache-authors">
+ <sect2 id="pgbuffercache-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/pgcrypto.sgml b/doc/src/sgml/pgcrypto.sgml
index 6fc2069ad3e..29459f8c207 100644
--- a/doc/src/sgml/pgcrypto.sgml
+++ b/doc/src/sgml/pgcrypto.sgml
@@ -28,10 +28,10 @@
   OpenSSL support was not selected when PostgreSQL was built.
  </para>
 
- <sect2 id="pgcrypto-general-hashing-funcs">
+ <sect2 id="pgcrypto-general-hashing-funcs" xreflabel="General Hashing Functions">
   <title>General Hashing Functions</title>
 
-  <sect3 id="pgcrypto-general-hashing-funcs-digest">
+  <sect3 id="pgcrypto-general-hashing-funcs-digest" xreflabel="digest()">
    <title><function>digest()</function></title>
 
    <indexterm>
@@ -64,7 +64,7 @@ $$ LANGUAGE SQL STRICT IMMUTABLE;
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-general-hashing-funcs-hmac">
+  <sect3 id="pgcrypto-general-hashing-funcs-hmac" xreflabel="hmac()">
    <title><function>hmac()</function></title>
 
    <indexterm>
@@ -94,7 +94,7 @@ hmac(data bytea, key bytea, type text) returns bytea
   </sect3>
  </sect2>
 
- <sect2 id="pgcrypto-password-hashing-funcs">
+ <sect2 id="pgcrypto-password-hashing-funcs" xreflabel="Password Hashing Functions">
   <title>Password Hashing Functions</title>
 
   <para>
@@ -222,7 +222,7 @@ hmac(data bytea, key bytea, type text) returns bytea
    </tgroup>
   </table>
 
-  <sect3 id="pgcrypto-password-hashing-funcs-crypt">
+  <sect3 id="pgcrypto-password-hashing-funcs-crypt" xreflabel="crypt()">
    <title><function>crypt()</function></title>
 
    <indexterm>
@@ -255,7 +255,7 @@ SELECT (pswhash = crypt('entered password', pswhash)) AS pswmatch FROM ... ;
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-password-hashing-funcs-gen-salt">
+  <sect3 id="pgcrypto-password-hashing-funcs-gen-salt" xreflabel="gen_salt()">
    <title><function>gen_salt()</function></title>
 
   <indexterm>
@@ -482,7 +482,7 @@ gen_salt(type text [, iter_count integer ]) returns text
   </sect3>
  </sect2>
 
- <sect2 id="pgcrypto-pgp-enc-funcs">
+ <sect2 id="pgcrypto-pgp-enc-funcs" xreflabel="PGP Encryption Functions">
   <title>PGP Encryption Functions</title>
 
   <para>
@@ -580,7 +580,7 @@ gen_salt(type text [, iter_count integer ]) returns text
    </listitem>
   </orderedlist>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-sym-encrypt">
+  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-sym-encrypt" xreflabel="pgp_sym_encrypt()">
    <title><function>pgp_sym_encrypt()</function></title>
 
    <indexterm>
@@ -602,7 +602,7 @@ pgp_sym_encrypt_bytea(data bytea, psw text [, options text ]) returns bytea
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-sym-decrypt">
+  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-sym-decrypt" xreflabel="pgp_sym_decrypt()">
    <title><function>pgp_sym_decrypt()</function></title>
 
    <indexterm>
@@ -631,7 +631,7 @@ pgp_sym_decrypt_bytea(msg bytea, psw text [, options text ]) returns bytea
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-pub-encrypt">
+  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-pub-encrypt" xreflabel="pgp_pub_encrypt()">
    <title><function>pgp_pub_encrypt()</function></title>
 
    <indexterm>
@@ -656,7 +656,7 @@ pgp_pub_encrypt_bytea(data bytea, key bytea [, options text ]) returns bytea
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-pub-decrypt">
+  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-pub-decrypt" xreflabel="pgp_pub_decrypt()">
    <title><function>pgp_pub_decrypt()</function></title>
 
    <indexterm>
@@ -689,7 +689,7 @@ pgp_pub_decrypt_bytea(msg bytea, key bytea [, psw text [, options text ]]) retur
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-key-id">
+  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-key-id" xreflabel="pgp_key_id()">
    <title><function>pgp_key_id()</function></title>
 
    <indexterm>
@@ -735,7 +735,7 @@ pgp_key_id(bytea) returns text
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-armor">
+  <sect3 id="pgcrypto-pgp-enc-funcs-armor" xreflabel="armor(), dearmor()">
    <title><function>armor()</function>, <function>dearmor()</function></title>
 
    <indexterm>
@@ -764,7 +764,7 @@ dearmor(data text) returns bytea
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-armor-headers">
+  <sect3 id="pgcrypto-pgp-enc-funcs-pgp-armor-headers" xreflabel="pgp_armor_headers">
    <title><function>pgp_armor_headers</function></title>
 
    <indexterm>
@@ -782,7 +782,7 @@ pgp_armor_headers(data text, key out text, value out text) returns setof record
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-pgp-enc-funcs-opts">
+  <sect3 id="pgcrypto-pgp-enc-funcs-opts" xreflabel="Options for PGP Functions">
    <title>Options for PGP Functions</title>
 
    <para>
@@ -806,7 +806,7 @@ pgp_sym_encrypt(data, psw, 'compress-algo=1, cipher-algo=aes256')
     The rest should have reasonable defaults.
    </para>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-cipher-algo">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-cipher-algo" xreflabel="cipher-algo">
    <title>cipher-algo</title>
 
    <para>
@@ -819,7 +819,7 @@ Applies to: pgp_sym_encrypt, pgp_pub_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-compress-algo">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-compress-algo" xreflabel="compress-algo">
    <title>compress-algo</title>
 
    <para>
@@ -836,7 +836,7 @@ Applies to: pgp_sym_encrypt, pgp_pub_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-compress-level">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-compress-level" xreflabel="compress-level">
    <title>compress-level</title>
 
    <para>
@@ -850,7 +850,7 @@ Applies to: pgp_sym_encrypt, pgp_pub_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-convert-crlf">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-convert-crlf" xreflabel="convert-crlf">
    <title>convert-crlf</title>
 
    <para>
@@ -867,7 +867,7 @@ Applies to: pgp_sym_encrypt, pgp_pub_encrypt, pgp_sym_decrypt, pgp_pub_decrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-disable-mdc">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-disable-mdc" xreflabel="disable-mdc">
    <title>disable-mdc</title>
 
    <para>
@@ -883,7 +883,7 @@ Applies to: pgp_sym_encrypt, pgp_pub_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-sess-key">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-sess-key" xreflabel="sess-key">
    <title>sess-key</title>
 
    <para>
@@ -898,7 +898,7 @@ Applies to: pgp_sym_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-mode">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-mode" xreflabel="s2k-mode">
    <title>s2k-mode</title>
 
    <para>
@@ -914,7 +914,7 @@ Applies to: pgp_sym_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-count">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-count" xreflabel="s2k-count">
    <title>s2k-count</title>
 
    <para>
@@ -927,7 +927,7 @@ Applies to: pgp_sym_encrypt, only with s2k-mode=3
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-digest-algo">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-digest-algo" xreflabel="s2k-digest-algo">
    <title>s2k-digest-algo</title>
 
    <para>
@@ -940,7 +940,7 @@ Applies to: pgp_sym_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-cipher-algo">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-s2k-cipher-algo" xreflabel="s2k-cipher-algo">
    <title>s2k-cipher-algo</title>
 
    <para>
@@ -953,7 +953,7 @@ Applies to: pgp_sym_encrypt
 </literallayout>
   </sect4>
 
-  <sect4 id="pgcrypto-pgp-enc-funcs-opts-unicode-mode">
+  <sect4 id="pgcrypto-pgp-enc-funcs-opts-unicode-mode" xreflabel="unicode-mode">
    <title>unicode-mode</title>
 
    <para>
@@ -970,7 +970,7 @@ Applies to: pgp_sym_encrypt, pgp_pub_encrypt
   </sect4>
   </sect3>
 
- <sect3 id="pgcrypto-pgp-enc-funcs-gnupg">
+ <sect3 id="pgcrypto-pgp-enc-funcs-gnupg" xreflabel="Generating PGP Keys with GnuPG">
   <title>Generating PGP Keys with GnuPG</title>
 
   <para>
@@ -1018,7 +1018,7 @@ gpg -a --export-secret-keys KEYID > secret.key
   </para>
  </sect3>
 
- <sect3 id="pgcrypto-pgp-enc-funcs-limitations">
+ <sect3 id="pgcrypto-pgp-enc-funcs-limitations" xreflabel="Limitations of PGP Code">
   <title>Limitations of PGP Code</title>
 
   <itemizedlist>
@@ -1046,7 +1046,7 @@ gpg -a --export-secret-keys KEYID > secret.key
   </sect3>
  </sect2>
 
- <sect2 id="pgcrypto-raw-enc-funcs">
+ <sect2 id="pgcrypto-raw-enc-funcs" xreflabel="Raw Encryption Functions">
   <title>Raw Encryption Functions</title>
 
   <para>
@@ -1170,7 +1170,7 @@ encrypt(data, 'fooz', 'bf-cbc/pad:pkcs')
   </para>
  </sect2>
 
- <sect2 id="pgcrypto-random-data-funcs">
+ <sect2 id="pgcrypto-random-data-funcs" xreflabel="Random-Data Functions">
   <title>Random-Data Functions</title>
 
   <indexterm>
@@ -1200,7 +1200,7 @@ gen_random_uuid() returns uuid
   </para>
  </sect2>
 
- <sect2 id="pgcrypto-openssl-support-funcs">
+ <sect2 id="pgcrypto-openssl-support-funcs" xreflabel="OpenSSL Support Functions">
   <title>OpenSSL Support Functions</title>
 
   <indexterm>
@@ -1216,7 +1216,7 @@ fips_mode() returns boolean
   </para>
  </sect2>
 
- <sect2 id="pgcrypto-configuration-parameters">
+ <sect2 id="pgcrypto-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
  <para>
@@ -1254,10 +1254,10 @@ fips_mode() returns boolean
   </para>
  </sect2>
 
- <sect2 id="pgcrypto-notes">
+ <sect2 id="pgcrypto-notes" xreflabel="Notes">
   <title>Notes</title>
 
-  <sect3 id="pgcrypto-notes-config">
+  <sect3 id="pgcrypto-notes-config" xreflabel="Configuration">
    <title>Configuration</title>
 
    <para>
@@ -1285,7 +1285,7 @@ fips_mode() returns boolean
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-notes-null-handling">
+  <sect3 id="pgcrypto-notes-null-handling" xreflabel="NULL Handling">
    <title>NULL Handling</title>
 
    <para>
@@ -1294,7 +1294,7 @@ fips_mode() returns boolean
    </para>
   </sect3>
 
-  <sect3 id="pgcrypto-notes-sec-limits">
+  <sect3 id="pgcrypto-notes-sec-limits" xreflabel="Security Limitations">
    <title>Security Limitations</title>
 
    <para>
@@ -1327,7 +1327,7 @@ fips_mode() returns boolean
   </sect3>
  </sect2>
 
- <sect2 id="pgcrypto-author">
+ <sect2 id="pgcrypto-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/pgfreespacemap.sgml b/doc/src/sgml/pgfreespacemap.sgml
index 3774a9f8c6b..8093d095e38 100644
--- a/doc/src/sgml/pgfreespacemap.sgml
+++ b/doc/src/sgml/pgfreespacemap.sgml
@@ -21,7 +21,7 @@
   using <command>GRANT</command>.
  </para>
 
- <sect2 id="pgfreespacemap-funcs">
+ <sect2 id="pgfreespacemap-funcs" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -71,7 +71,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgfreespacemap-sample-output">
+ <sect2 id="pgfreespacemap-sample-output" xreflabel="Sample Output">
   <title>Sample Output</title>
 
 <screen>
@@ -108,7 +108,7 @@ postgres=# SELECT * FROM pg_freespace('foo', 7);
 </screen>
  </sect2>
 
- <sect2 id="pgfreespacemap-author">
+ <sect2 id="pgfreespacemap-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/pglogicalinspect.sgml b/doc/src/sgml/pglogicalinspect.sgml
index 1c1a9d14e51..c4502263f76 100644
--- a/doc/src/sgml/pglogicalinspect.sgml
+++ b/doc/src/sgml/pglogicalinspect.sgml
@@ -21,7 +21,7 @@
   superusers to others using <command>GRANT</command>.
  </para>
 
- <sect2 id="pglogicalinspect-funcs">
+ <sect2 id="pglogicalinspect-funcs" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -132,7 +132,7 @@ catchange_xip            | {751,752}
   </variablelist>
  </sect2>
 
- <sect2 id="pglogicalinspect-author">
+ <sect2 id="pglogicalinspect-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/pgoverexplain.sgml b/doc/src/sgml/pgoverexplain.sgml
index 0c8db13e4f0..d3ca48efded 100644
--- a/doc/src/sgml/pgoverexplain.sgml
+++ b/doc/src/sgml/pgoverexplain.sgml
@@ -32,7 +32,7 @@ LOAD 'pg_overexplain';
   <filename>postgresql.conf</filename>.
  </para>
 
- <sect2 id="pgoverexplain-debug">
+ <sect2 id="pgoverexplain-debug" xreflabel="EXPLAIN (DEBUG)">
   <title>EXPLAIN (DEBUG)</title>
 
   <para>
@@ -141,7 +141,7 @@ LOAD 'pg_overexplain';
   </itemizedlist>
  </sect2>
 
- <sect2 id="pgoverexplain-range-table">
+ <sect2 id="pgoverexplain-range-table" xreflabel="EXPLAIN (RANGE_TABLE)">
   <title>EXPLAIN (RANGE_TABLE)</title>
 
   <para>
@@ -190,7 +190,7 @@ LOAD 'pg_overexplain';
   </para>
  </sect2>
 
- <sect2 id="pgoverexplain-author">
+ <sect2 id="pgoverexplain-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/pgprewarm.sgml b/doc/src/sgml/pgprewarm.sgml
index 75f45b91b67..f4dc6974c80 100644
--- a/doc/src/sgml/pgprewarm.sgml
+++ b/doc/src/sgml/pgprewarm.sgml
@@ -19,7 +19,7 @@
   will, using 2 background workers, reload those same blocks after a restart.
  </para>
 
- <sect2 id="pgprewarm-funcs">
+ <sect2 id="pgprewarm-funcs" xreflabel="Functions">
   <title>Functions</title>
 
 <synopsis>
@@ -84,7 +84,7 @@ autoprewarm_dump_now() RETURNS int8
   </para>
  </sect2>
 
- <sect2 id="pgprewarm-config-params">
+ <sect2 id="pgprewarm-config-params" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
  <variablelist>
@@ -137,7 +137,7 @@ pg_prewarm.autoprewarm_interval = 300s
 
  </sect2>
 
- <sect2 id="pgprewarm-author">
+ <sect2 id="pgprewarm-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/pgrowlocks.sgml b/doc/src/sgml/pgrowlocks.sgml
index 9c6e86b27ed..b312191f394 100644
--- a/doc/src/sgml/pgrowlocks.sgml
+++ b/doc/src/sgml/pgrowlocks.sgml
@@ -19,7 +19,7 @@
  </para>
 
 
- <sect2 id="pgrowlocks-overview">
+ <sect2 id="pgrowlocks-overview" xreflabel="Overview">
   <title>Overview</title>
 
   <indexterm>
@@ -125,7 +125,7 @@ SELECT * FROM accounts AS a, pgrowlocks('accounts') AS p
   </para>
  </sect2>
 
- <sect2 id="pgrowlocks-sample-output">
+ <sect2 id="pgrowlocks-sample-output" xreflabel="Sample Output">
   <title>Sample Output</title>
 
   <screen>
@@ -140,7 +140,7 @@ SELECT * FROM accounts AS a, pgrowlocks('accounts') AS p
 </screen>
  </sect2>
 
- <sect2 id="pgrowlocks-author">
+ <sect2 id="pgrowlocks-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml
index d753de5836e..d1d2047451d 100644
--- a/doc/src/sgml/pgstatstatements.sgml
+++ b/doc/src/sgml/pgstatstatements.sgml
@@ -36,7 +36,7 @@
    <command>CREATE EXTENSION pg_stat_statements</command>.
  </para>
 
- <sect2 id="pgstatstatements-pg-stat-statements">
+ <sect2 id="pgstatstatements-pg-stat-statements" xreflabel="The pg_stat_statements View">
   <title>The <structname>pg_stat_statements</structname> View</title>
 
   <para>
@@ -759,7 +759,7 @@ calls | 2
   </para>
  </sect2>
 
- <sect2 id="pgstatstatements-pg-stat-statements-info">
+ <sect2 id="pgstatstatements-pg-stat-statements-info" xreflabel="The pg_stat_statements_info View">
   <title>The <structname>pg_stat_statements_info</structname> View</title>
 
   <indexterm>
@@ -815,7 +815,7 @@ calls | 2
   </table>
  </sect2>
 
- <sect2 id="pgstatstatements-funcs">
+ <sect2 id="pgstatstatements-funcs" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -893,7 +893,7 @@ calls | 2
   </variablelist>
  </sect2>
 
- <sect2 id="pgstatstatements-config-params">
+ <sect2 id="pgstatstatements-config-params" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
   <variablelist>
@@ -1028,7 +1028,7 @@ pg_stat_statements.track = all
   </para>
  </sect2>
 
- <sect2 id="pgstatstatements-sample-output">
+ <sect2 id="pgstatstatements-sample-output" xreflabel="Sample Output">
   <title>Sample Output</title>
 
 <screen>
@@ -1133,7 +1133,7 @@ hit_percent     |
 </screen>
  </sect2>
 
- <sect2 id="pgstatstatements-authors">
+ <sect2 id="pgstatstatements-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml
index 54d8f90245e..2c4bea53abf 100644
--- a/doc/src/sgml/pgstattuple.sgml
+++ b/doc/src/sgml/pgstattuple.sgml
@@ -23,7 +23,7 @@
   the <literal>pg_stat_scan_tables</literal> role instead.
  </para>
 
- <sect2 id="pgstattuple-funcs">
+ <sect2 id="pgstattuple-funcs" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -627,7 +627,7 @@ approx_free_percent  | 2.09
   </variablelist>
  </sect2>
 
- <sect2 id="pgstattuple-authors">
+ <sect2 id="pgstattuple-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/pgsurgery.sgml b/doc/src/sgml/pgsurgery.sgml
index 68186122a22..15cb5efdaee 100644
--- a/doc/src/sgml/pgsurgery.sgml
+++ b/doc/src/sgml/pgsurgery.sgml
@@ -18,7 +18,7 @@
   They should be used with great caution and only as a last resort.
  </para>
 
- <sect2 id="pgsurgery-funcs">
+ <sect2 id="pgsurgery-funcs" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -96,7 +96,7 @@ test=# SELECT ctid FROM t1 WHERE xmin = 2;
   </variablelist>
  </sect2>
 
- <sect2 id="pgsurgery-authors">
+ <sect2 id="pgsurgery-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/pgtrgm.sgml b/doc/src/sgml/pgtrgm.sgml
index 07bfcac9319..fce868d47d6 100644
--- a/doc/src/sgml/pgtrgm.sgml
+++ b/doc/src/sgml/pgtrgm.sgml
@@ -22,7 +22,7 @@
   on the current database.
  </para>
 
- <sect2 id="pgtrgm-concepts">
+ <sect2 id="pgtrgm-concepts" xreflabel="Trigram (or Trigraph) Concepts">
   <title>Trigram (or Trigraph) Concepts</title>
 
   <para>
@@ -60,7 +60,7 @@
   </note>
  </sect2>
 
- <sect2 id="pgtrgm-funcs-ops">
+ <sect2 id="pgtrgm-funcs-ops" xreflabel="Functions and Operators">
   <title>Functions and Operators</title>
 
   <para>
@@ -356,7 +356,7 @@
   </table>
  </sect2>
 
- <sect2 id="pgtrgm-guc">
+ <sect2 id="pgtrgm-guc" xreflabel="GUC Parameters">
   <title>GUC Parameters</title>
 
   <variablelist>
@@ -407,7 +407,7 @@
   </variablelist>
  </sect2>
 
- <sect2 id="pgtrgm-index">
+ <sect2 id="pgtrgm-index" xreflabel="Index Support">
   <title>Index Support</title>
 
   <para>
@@ -560,7 +560,7 @@ SELECT * FROM test_trgm WHERE t ~ '(foo|bar)';
   </para>
  </sect2>
 
- <sect2 id="pgtrgm-text-search">
+ <sect2 id="pgtrgm-text-search" xreflabel="Text Search Integration">
   <title>Text Search Integration</title>
 
   <para>
@@ -609,7 +609,7 @@ CREATE INDEX words_idx ON words USING GIN (word gin_trgm_ops);
   </note>
  </sect2>
 
- <sect2 id="pgtrgm-references">
+ <sect2 id="pgtrgm-references" xreflabel="References">
   <title>References</title>
 
   <para>
@@ -622,7 +622,7 @@ CREATE INDEX words_idx ON words USING GIN (word gin_trgm_ops);
   </para>
  </sect2>
 
- <sect2 id="pgtrgm-authors">
+ <sect2 id="pgtrgm-authors" xreflabel="Authors">
   <title>Authors</title>
 
   <para>
diff --git a/doc/src/sgml/pgvisibility.sgml b/doc/src/sgml/pgvisibility.sgml
index 097f7e05661..1a2a37026b3 100644
--- a/doc/src/sgml/pgvisibility.sgml
+++ b/doc/src/sgml/pgvisibility.sgml
@@ -41,7 +41,7 @@
   data blocks are similarly expensive.
  </para>
 
- <sect2 id="pgvisibility-funcs">
+ <sect2 id="pgvisibility-funcs" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -147,7 +147,7 @@
   </para>
  </sect2>
 
- <sect2 id="pgvisibility-author">
+ <sect2 id="pgvisibility-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/pgwalinspect.sgml b/doc/src/sgml/pgwalinspect.sgml
index 79c3ead40bc..851c20a9c47 100644
--- a/doc/src/sgml/pgwalinspect.sgml
+++ b/doc/src/sgml/pgwalinspect.sgml
@@ -56,7 +56,7 @@
   superusers to others using <command>GRANT</command>.
  </para>
 
- <sect2 id="pgwalinspect-funcs">
+ <sect2 id="pgwalinspect-funcs" xreflabel="General Functions">
   <title>General Functions</title>
 
   <variablelist>
@@ -275,7 +275,7 @@ combined_size_percentage     | 2.8634072910530795
   </variablelist>
  </sect2>
 
- <sect2 id="pgwalinspect-author">
+ <sect2 id="pgwalinspect-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/planstats.sgml b/doc/src/sgml/planstats.sgml
index e57867ba617..045b8df441f 100644
--- a/doc/src/sgml/planstats.sgml
+++ b/doc/src/sgml/planstats.sgml
@@ -19,7 +19,7 @@
    wishes to read the code.
   </para>
 
- <sect1 id="row-estimation-examples">
+ <sect1 id="row-estimation-examples" xreflabel="Row Estimation Examples">
   <title>Row Estimation Examples</title>
 
   <indexterm zone="row-estimation-examples">
@@ -447,7 +447,7 @@ rows = (outer_cardinality * inner_cardinality) * selectivity
   </para>
  </sect1>
 
- <sect1 id="multivariate-statistics-examples">
+ <sect1 id="multivariate-statistics-examples" xreflabel="Multivariate Statistics Examples">
   <title>Multivariate Statistics Examples</title>
 
   <indexterm>
@@ -455,7 +455,7 @@ rows = (outer_cardinality * inner_cardinality) * selectivity
    <secondary>multivariate</secondary>
   </indexterm>
 
-  <sect2 id="functional-dependencies">
+  <sect2 id="functional-dependencies" xreflabel="Functional Dependencies">
    <title>Functional Dependencies</title>
 
    <para>
@@ -540,7 +540,7 @@ EXPLAIN (ANALYZE, TIMING OFF, BUFFERS OFF) SELECT * FROM t WHERE a = 1 AND b = 1
    </para>
   </sect2>
 
-  <sect2 id="multivariate-ndistinct-counts">
+  <sect2 id="multivariate-ndistinct-counts" xreflabel="Multivariate N-Distinct Counts">
    <title>Multivariate N-Distinct Counts</title>
 
    <para>
@@ -586,7 +586,7 @@ EXPLAIN (ANALYZE, TIMING OFF, BUFFERS OFF) SELECT COUNT(*) FROM t GROUP BY a, b;
 
   </sect2>
 
-  <sect2 id="mcv-lists">
+  <sect2 id="mcv-lists" xreflabel="MCV Lists">
    <title>MCV Lists</title>
 
    <para>
@@ -699,7 +699,7 @@ EXPLAIN (ANALYZE, TIMING OFF, BUFFERS OFF) SELECT * FROM t WHERE a &lt;= 49 AND
 
  </sect1>
 
- <sect1 id="planner-stats-security">
+ <sect1 id="planner-stats-security" xreflabel="Planner Statistics and Security">
   <title>Planner Statistics and Security</title>
 
   <para>
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml
index 6f018645f11..7e7881bf066 100644
--- a/doc/src/sgml/plperl.sgml
+++ b/doc/src/sgml/plperl.sgml
@@ -46,7 +46,7 @@
    </para>
   </note>
 
- <sect1 id="plperl-funcs">
+ <sect1 id="plperl-funcs" xreflabel="PL/Perl Functions and Arguments">
   <title>PL/Perl Functions and Arguments</title>
 
   <para>
@@ -407,7 +407,7 @@ use strict;
 
  </sect1>
 
- <sect1 id="plperl-data">
+ <sect1 id="plperl-data" xreflabel="Data Values in PL/Perl">
   <title>Data Values in PL/Perl</title>
 
   <para>
@@ -427,10 +427,10 @@ use strict;
   </para>
  </sect1>
 
- <sect1 id="plperl-builtins">
+ <sect1 id="plperl-builtins" xreflabel="Built-in Functions">
   <title>Built-in Functions</title>
 
- <sect2 id="plperl-database">
+ <sect2 id="plperl-database" xreflabel="Database Access from PL/Perl">
   <title>Database Access from PL/Perl</title>
 
   <para>
@@ -781,7 +781,7 @@ CALL transaction_test1();
    </variablelist>
  </sect2>
 
- <sect2 id="plperl-utility-functions">
+ <sect2 id="plperl-utility-functions" xreflabel="Utility Functions in PL/Perl">
   <title>Utility Functions in PL/Perl</title>
 
    <variablelist>
@@ -996,7 +996,7 @@ CALL transaction_test1();
   </sect2>
  </sect1>
 
- <sect1 id="plperl-global">
+ <sect1 id="plperl-global" xreflabel="Global Values in PL/Perl">
   <title>Global Values in PL/Perl</title>
 
   <para>
@@ -1071,7 +1071,7 @@ $$ LANGUAGE plperl;
   </para>
  </sect1>
 
- <sect1 id="plperl-trusted">
+ <sect1 id="plperl-trusted" xreflabel="Trusted and Untrusted PL/Perl">
   <title>Trusted and Untrusted PL/Perl</title>
 
   <indexterm zone="plperl-trusted">
@@ -1184,7 +1184,7 @@ $$ LANGUAGE plperl;
 
  </sect1>
 
- <sect1 id="plperl-triggers">
+ <sect1 id="plperl-triggers" xreflabel="PL/Perl Triggers">
   <title>PL/Perl Triggers</title>
 
   <para>
@@ -1372,7 +1372,7 @@ CREATE TRIGGER test_valid_id_trig
   </para>
  </sect1>
 
- <sect1 id="plperl-event-triggers">
+ <sect1 id="plperl-event-triggers" xreflabel="PL/Perl Event Triggers">
   <title>PL/Perl Event Triggers</title>
 
   <para>
@@ -1422,10 +1422,10 @@ CREATE EVENT TRIGGER perl_a_snitch
   </para>
  </sect1>
 
- <sect1 id="plperl-under-the-hood">
+ <sect1 id="plperl-under-the-hood" xreflabel="PL/Perl Under the Hood">
   <title>PL/Perl Under the Hood</title>
 
- <sect2 id="plperl-config">
+ <sect2 id="plperl-config" xreflabel="Configuration">
   <title>Configuration</title>
 
   <para>
@@ -1553,7 +1553,7 @@ DO 'elog(WARNING, join ", ", sort keys %INC)' LANGUAGE plperl;
   </variablelist>
 </sect2>
 
- <sect2 id="plperl-missing">
+ <sect2 id="plperl-missing" xreflabel="Limitations and Missing Features">
   <title>Limitations and Missing Features</title>
 
   <para>
diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 561f6e50d63..891299faa44 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -7,7 +7,7 @@
   <primary>PL/pgSQL</primary>
  </indexterm>
 
- <sect1 id="plpgsql-overview">
+ <sect1 id="plpgsql-overview" xreflabel="Overview">
   <title>Overview</title>
 
  <para>
@@ -65,7 +65,7 @@
     administrators could choose to remove it.
    </para>
 
-  <sect2 id="plpgsql-advantages">
+  <sect2 id="plpgsql-advantages" xreflabel="Advantages of Using PL/pgSQL">
    <title>Advantages of Using <application>PL/pgSQL</application></title>
 
     <para>
@@ -114,7 +114,7 @@
     </para>
   </sect2>
 
-  <sect2 id="plpgsql-args-results">
+  <sect2 id="plpgsql-args-results" xreflabel="Supported Argument and Result Data Types">
    <title>Supported Argument and Result Data Types</title>
 
     <para>
@@ -177,7 +177,7 @@
   </sect2>
  </sect1>
 
- <sect1 id="plpgsql-structure">
+ <sect1 id="plpgsql-structure" xreflabel="Structure of PL/pgSQL">
   <title>Structure of <application>PL/pgSQL</application></title>
 
   <para>
@@ -312,7 +312,7 @@ $$ LANGUAGE plpgsql;
     </para>
   </sect1>
 
-  <sect1 id="plpgsql-declarations">
+  <sect1 id="plpgsql-declarations" xreflabel="Declarations">
     <title>Declarations</title>
 
     <para>
@@ -393,7 +393,7 @@ DECLARE
 </programlisting>
      </para>
 
-    <sect2 id="plpgsql-declaration-parameters">
+    <sect2 id="plpgsql-declaration-parameters" xreflabel="Declaring Function Parameters">
      <title>Declaring Function Parameters</title>
 
      <para>
@@ -639,7 +639,7 @@ SELECT add_three_values(1, 2, 4.7);
      </para>
     </sect2>
 
-  <sect2 id="plpgsql-declaration-alias">
+  <sect2 id="plpgsql-declaration-alias" xreflabel="ALIAS">
    <title><literal>ALIAS</literal></title>
 
 <synopsis>
@@ -671,7 +671,7 @@ DECLARE
    </para>
    </sect2>
 
-  <sect2 id="plpgsql-declaration-type">
+  <sect2 id="plpgsql-declaration-type" xreflabel="Copying Types">
    <title>Copying Types</title>
 
 <synopsis>
@@ -726,7 +726,7 @@ user_ids users.user_id%TYPE ARRAY[4];  -- equivalent to the above
 
   </sect2>
 
-    <sect2 id="plpgsql-declaration-rowtypes">
+    <sect2 id="plpgsql-declaration-rowtypes" xreflabel="Row Types">
      <title>Row Types</title>
 
 <synopsis>
@@ -789,7 +789,7 @@ SELECT merge_fields(t.*) FROM table1 t WHERE ... ;
    </para>
   </sect2>
 
-  <sect2 id="plpgsql-declaration-records">
+  <sect2 id="plpgsql-declaration-records" xreflabel="Record Types">
    <title>Record Types</title>
 
 <synopsis>
@@ -819,7 +819,7 @@ SELECT merge_fields(t.*) FROM table1 t WHERE ... ;
    </para>
   </sect2>
 
-  <sect2 id="plpgsql-declaration-collation">
+  <sect2 id="plpgsql-declaration-collation" xreflabel="Collation of PL/pgSQL Variables">
    <title>Collation of <application>PL/pgSQL</application> Variables</title>
 
    <indexterm>
@@ -913,7 +913,7 @@ $$ LANGUAGE plpgsql;
   </sect2>
   </sect1>
 
-  <sect1 id="plpgsql-expressions">
+  <sect1 id="plpgsql-expressions" xreflabel="Expressions">
   <title>Expressions</title>
 
     <para>
@@ -974,7 +974,7 @@ IF count(*) &gt; 0 FROM my_table THEN ...
     </para>
   </sect1>
 
-  <sect1 id="plpgsql-statements">
+  <sect1 id="plpgsql-statements" xreflabel="Basic Statements">
   <title>Basic Statements</title>
 
    <para>
@@ -986,7 +986,7 @@ IF count(*) &gt; 0 FROM my_table THEN ...
     as described in <xref linkend="plpgsql-statements-general-sql"/>.
    </para>
 
-   <sect2 id="plpgsql-statements-assignment">
+   <sect2 id="plpgsql-statements-assignment" xreflabel="Assignment">
     <title>Assignment</title>
 
     <para>
@@ -1029,7 +1029,7 @@ complex_array[n].realpart = 12.3;
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-statements-general-sql">
+   <sect2 id="plpgsql-statements-general-sql" xreflabel="Executing SQL Commands">
     <title>Executing SQL Commands</title>
 
     <para>
@@ -1148,7 +1148,7 @@ PERFORM create_mv('cs_session_page_requests_mv', my_query);
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-statements-sql-onerow">
+   <sect2 id="plpgsql-statements-sql-onerow" xreflabel="Executing a Command with a Single-Row Result">
     <title>Executing a Command with a Single-Row Result</title>
 
     <indexterm zone="plpgsql-statements-sql-onerow">
@@ -1309,7 +1309,7 @@ CONTEXT:  PL/pgSQL function get_userid(text) line 6 at SQL statement
 
    </sect2>
 
-   <sect2 id="plpgsql-statements-executing-dyn">
+   <sect2 id="plpgsql-statements-executing-dyn" xreflabel="Executing Dynamic Commands">
     <title>Executing Dynamic Commands</title>
 
     <para>
@@ -1610,7 +1610,7 @@ EXECUTE format('UPDATE tbl SET %I = $1 WHERE key = $2', colname)
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-statements-diagnostics">
+   <sect2 id="plpgsql-statements-diagnostics" xreflabel="Obtaining the Result Status">
     <title>Obtaining the Result Status</title>
 
     <para>
@@ -1751,7 +1751,7 @@ GET DIAGNOSTICS integer_var = ROW_COUNT;
 
    </sect2>
 
-   <sect2 id="plpgsql-statements-null">
+   <sect2 id="plpgsql-statements-null" xreflabel="Doing Nothing At All">
     <title>Doing Nothing At All</title>
 
     <para>
@@ -1798,7 +1798,7 @@ END;
    </sect2>
   </sect1>
 
-  <sect1 id="plpgsql-control-structures">
+  <sect1 id="plpgsql-control-structures" xreflabel="Control Structures">
    <title>Control Structures</title>
 
    <para>
@@ -1809,7 +1809,7 @@ END;
     flexible and powerful way.
    </para>
 
-   <sect2 id="plpgsql-statements-returning">
+   <sect2 id="plpgsql-statements-returning" xreflabel="Returning from a Function">
     <title>Returning from a Function</title>
 
     <para>
@@ -1818,7 +1818,7 @@ END;
      NEXT</command>.
     </para>
 
-    <sect3 id="plpgsql-statements-returning-return">
+    <sect3 id="plpgsql-statements-returning-return" xreflabel="RETURN">
      <title><command>RETURN</command></title>
 
 <synopsis>
@@ -1879,7 +1879,7 @@ RETURN (1, 2, 'three'::text);  -- must cast columns to correct types
      </para>
     </sect3>
 
-    <sect3 id="plpgsql-statements-returning-return-next">
+    <sect3 id="plpgsql-statements-returning-return-next" xreflabel="RETURN NEXT and RETURN QUERY">
      <title><command>RETURN NEXT</command> and <command>RETURN QUERY</command></title>
     <indexterm>
      <primary>RETURN NEXT</primary>
@@ -2029,7 +2029,7 @@ SELECT * FROM get_available_flightid(CURRENT_DATE);
     </sect3>
    </sect2>
 
-   <sect2 id="plpgsql-statements-returning-procedure">
+   <sect2 id="plpgsql-statements-returning-procedure" xreflabel="Returning from a Procedure">
     <title>Returning from a Procedure</title>
 
     <para>
@@ -2045,7 +2045,7 @@ SELECT * FROM get_available_flightid(CURRENT_DATE);
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-statements-calling-procedure">
+   <sect2 id="plpgsql-statements-calling-procedure" xreflabel="Calling a Procedure">
     <title>Calling a Procedure</title>
 
     <para>
@@ -2081,7 +2081,7 @@ $$;
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-conditionals">
+   <sect2 id="plpgsql-conditionals" xreflabel="Conditionals">
     <title>Conditionals</title>
 
     <para>
@@ -2111,7 +2111,7 @@ $$;
     </itemizedlist>
     </para>
 
-    <sect3 id="plpgsql-conditionals-if-then">
+    <sect3 id="plpgsql-conditionals-if-then" xreflabel="IF-THEN">
      <title><literal>IF-THEN</literal></title>
 
 <synopsis>
@@ -2138,7 +2138,7 @@ END IF;
        </para>
      </sect3>
 
-     <sect3 id="plpgsql-conditionals-if-then-else">
+     <sect3 id="plpgsql-conditionals-if-then-else" xreflabel="IF-THEN-ELSE">
       <title><literal>IF-THEN-ELSE</literal></title>
 
 <synopsis>
@@ -2179,7 +2179,7 @@ END IF;
      </para>
     </sect3>
 
-     <sect3 id="plpgsql-conditionals-if-then-elsif">
+     <sect3 id="plpgsql-conditionals-if-then-elsif" xreflabel="IF-THEN-ELSIF">
       <title><literal>IF-THEN-ELSIF</literal></title>
 
 <synopsis>
@@ -2255,7 +2255,7 @@ END IF;
        </para>
      </sect3>
 
-     <sect3 id="plpgsql-conditionals-simple-case">
+     <sect3 id="plpgsql-conditionals-simple-case" xreflabel="Simple CASE">
       <title>Simple <literal>CASE</literal></title>
 
 <synopsis>
@@ -2298,7 +2298,7 @@ END CASE;
       </para>
      </sect3>
 
-     <sect3 id="plpgsql-conditionals-searched-case">
+     <sect3 id="plpgsql-conditionals-searched-case" xreflabel="Searched CASE">
       <title>Searched <literal>CASE</literal></title>
 
 <synopsis>
@@ -2350,7 +2350,7 @@ END CASE;
      </sect3>
    </sect2>
 
-   <sect2 id="plpgsql-control-structures-loops">
+   <sect2 id="plpgsql-control-structures-loops" xreflabel="Simple Loops">
     <title>Simple Loops</title>
 
     <indexterm zone="plpgsql-control-structures-loops">
@@ -2365,7 +2365,7 @@ END CASE;
      <application>PL/pgSQL</application> function to repeat a series of commands.
     </para>
 
-    <sect3 id="plpgsql-control-structures-loops-loop">
+    <sect3 id="plpgsql-control-structures-loops-loop" xreflabel="LOOP">
      <title><literal>LOOP</literal></title>
 
 <synopsis>
@@ -2385,7 +2385,7 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>;
      </para>
     </sect3>
 
-     <sect3 id="plpgsql-control-structures-loops-exit">
+     <sect3 id="plpgsql-control-structures-loops-exit" xreflabel="EXIT">
       <title><literal>EXIT</literal></title>
 
      <indexterm>
@@ -2457,7 +2457,7 @@ END;
        </para>
      </sect3>
 
-     <sect3 id="plpgsql-control-structures-loops-continue">
+     <sect3 id="plpgsql-control-structures-loops-continue" xreflabel="CONTINUE">
       <title><literal>CONTINUE</literal></title>
 
      <indexterm>
@@ -2506,7 +2506,7 @@ END LOOP;
      </sect3>
 
 
-     <sect3 id="plpgsql-control-structures-loops-while">
+     <sect3 id="plpgsql-control-structures-loops-while" xreflabel="WHILE">
       <title><literal>WHILE</literal></title>
 
      <indexterm>
@@ -2543,7 +2543,7 @@ END LOOP;
        </para>
      </sect3>
 
-     <sect3 id="plpgsql-integer-for">
+     <sect3 id="plpgsql-integer-for" xreflabel="FOR (Integer Variant)">
       <title><literal>FOR</literal> (Integer Variant)</title>
 
 <synopsis>
@@ -2600,7 +2600,7 @@ END LOOP;
      </sect3>
    </sect2>
 
-   <sect2 id="plpgsql-records-iterating">
+   <sect2 id="plpgsql-records-iterating" xreflabel="Looping through Query Results">
     <title>Looping through Query Results</title>
 
     <para>
@@ -2696,7 +2696,7 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>;
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-foreach-array">
+   <sect2 id="plpgsql-foreach-array" xreflabel="Looping through Arrays">
     <title>Looping through Arrays</title>
 
     <para>
@@ -2780,7 +2780,7 @@ NOTICE:  row = {10,11,12}
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-error-trapping">
+   <sect2 id="plpgsql-error-trapping" xreflabel="Trapping Errors">
     <title>Trapping Errors</title>
 
     <indexterm>
@@ -2943,7 +2943,7 @@ SELECT merge_db(1, 'dennis');
     </para>
     </example>
 
-   <sect3 id="plpgsql-exception-diagnostics">
+   <sect3 id="plpgsql-exception-diagnostics" xreflabel="Obtaining Information about an Error">
     <title>Obtaining Information about an Error</title>
 
     <para>
@@ -3072,7 +3072,7 @@ END;
    </sect3>
   </sect2>
 
-  <sect2 id="plpgsql-call-stack">
+  <sect2 id="plpgsql-call-stack" xreflabel="Obtaining Execution Location Information">
    <title>Obtaining Execution Location Information</title>
 
    <para>
@@ -3127,7 +3127,7 @@ CONTEXT:  PL/pgSQL function outer_func() line 3 at RETURN
   </sect2>
   </sect1>
 
-  <sect1 id="plpgsql-cursors">
+  <sect1 id="plpgsql-cursors" xreflabel="Cursors">
    <title>Cursors</title>
 
    <indexterm zone="plpgsql-cursors">
@@ -3148,7 +3148,7 @@ CONTEXT:  PL/pgSQL function outer_func() line 3 at RETURN
     large row sets from functions.
    </para>
 
-   <sect2 id="plpgsql-cursor-declarations">
+   <sect2 id="plpgsql-cursor-declarations" xreflabel="Declaring Cursor Variables">
     <title>Declaring Cursor Variables</title>
 
     <para>
@@ -3202,7 +3202,7 @@ DECLARE
     </para>
    </sect2>
 
-   <sect2 id="plpgsql-cursor-opening">
+   <sect2 id="plpgsql-cursor-opening" xreflabel="Opening Cursors">
     <title>Opening Cursors</title>
 
     <para>
@@ -3242,7 +3242,7 @@ DECLARE
      <xref linkend="plpgsql-cursor-returning"/>.
     </para>
 
-    <sect3 id="plpgsql-cursor-opening-open-for-query">
+    <sect3 id="plpgsql-cursor-opening-open-for-query" xreflabel="OPEN FOR query">
      <title><command>OPEN FOR</command> <replaceable>query</replaceable></title>
 
 <synopsis>
@@ -3276,7 +3276,7 @@ OPEN curs1 FOR SELECT * FROM foo WHERE key = mykey;
        </para>
      </sect3>
 
-    <sect3 id="plpgsql-cursor-opening-open-for-execute">
+    <sect3 id="plpgsql-cursor-opening-open-for-execute" xreflabel="OPEN FOR EXECUTE">
      <title><command>OPEN FOR EXECUTE</command></title>
 
 <synopsis>
@@ -3313,7 +3313,7 @@ OPEN curs1 FOR EXECUTE format('SELECT * FROM %I WHERE col1 = $1',tabname) USING
        </para>
      </sect3>
 
-    <sect3 id="plpgsql-open-bound-cursor">
+    <sect3 id="plpgsql-open-bound-cursor" xreflabel="Opening a Bound Cursor">
      <title>Opening a Bound Cursor</title>
 
 <synopsis>
@@ -3379,7 +3379,7 @@ BEGIN
      </sect3>
    </sect2>
 
-   <sect2 id="plpgsql-cursor-using">
+   <sect2 id="plpgsql-cursor-using" xreflabel="Using Cursors">
     <title>Using Cursors</title>
 
     <para>
@@ -3403,7 +3403,7 @@ BEGIN
      only until the end of the transaction.
     </para>
 
-    <sect3 id="plpgsql-cursor-using-fetch">
+    <sect3 id="plpgsql-cursor-using-fetch" xreflabel="FETCH">
      <title><literal>FETCH</literal></title>
 
 <synopsis>
@@ -3463,7 +3463,7 @@ FETCH RELATIVE -2 FROM curs4 INTO x;
        </para>
      </sect3>
 
-    <sect3 id="plpgsql-cursor-using-move">
+    <sect3 id="plpgsql-cursor-using-move" xreflabel="MOVE">
      <title><literal>MOVE</literal></title>
 
 <synopsis>
@@ -3504,7 +3504,7 @@ MOVE FORWARD 2 FROM curs4;
        </para>
      </sect3>
 
-    <sect3 id="plpgsql-cursor-using-update-delete">
+    <sect3 id="plpgsql-cursor-using-update-delete" xreflabel="UPDATE/DELETE WHERE CURRENT OF">
      <title><literal>UPDATE/DELETE WHERE CURRENT OF</literal></title>
 
 <synopsis>
@@ -3530,7 +3530,7 @@ UPDATE foo SET dataval = myval WHERE CURRENT OF curs1;
        </para>
      </sect3>
 
-    <sect3 id="plpgsql-cursor-using-close">
+    <sect3 id="plpgsql-cursor-using-close" xreflabel="CLOSE">
      <title><literal>CLOSE</literal></title>
 
 <synopsis>
@@ -3551,7 +3551,7 @@ CLOSE curs1;
        </para>
      </sect3>
 
-    <sect3 id="plpgsql-cursor-returning">
+    <sect3 id="plpgsql-cursor-returning" xreflabel="Returning Cursors">
      <title>Returning Cursors</title>
 
        <para>
@@ -3665,7 +3665,7 @@ COMMIT;
      </sect3>
    </sect2>
 
-   <sect2 id="plpgsql-cursor-for-loop">
+   <sect2 id="plpgsql-cursor-for-loop" xreflabel="Looping through a Cursor's Result">
     <title>Looping through a Cursor's Result</title>
 
     <para>
@@ -3700,7 +3700,7 @@ END LOOP <optional> <replaceable>label</replaceable> </optional>;
 
   </sect1>
 
-  <sect1 id="plpgsql-transactions">
+  <sect1 id="plpgsql-transactions" xreflabel="Transaction Management">
    <title>Transaction Management</title>
 
    <para>
@@ -3813,10 +3813,10 @@ CALL transaction_test2();
    </para>
   </sect1>
 
-  <sect1 id="plpgsql-errors-and-messages">
+  <sect1 id="plpgsql-errors-and-messages" xreflabel="Errors and Messages">
    <title>Errors and Messages</title>
 
-  <sect2 id="plpgsql-statements-raise">
+  <sect2 id="plpgsql-statements-raise" xreflabel="Reporting Errors and Messages">
    <title>Reporting Errors and Messages</title>
 
    <indexterm>
@@ -4027,7 +4027,7 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id;
 
   </sect2>
 
-  <sect2 id="plpgsql-statements-assert">
+  <sect2 id="plpgsql-statements-assert" xreflabel="Checking Assertions">
    <title>Checking Assertions</title>
 
    <indexterm>
@@ -4088,7 +4088,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl
 
  </sect1>
 
- <sect1 id="plpgsql-trigger">
+ <sect1 id="plpgsql-trigger" xreflabel="Trigger Functions">
   <title>Trigger Functions</title>
 
   <indexterm zone="plpgsql-trigger">
@@ -4107,7 +4107,7 @@ ASSERT <replaceable class="parameter">condition</replaceable> <optional> , <repl
    automatically defined to describe the condition that triggered the call.
   </para>
 
-  <sect2 id="plpgsql-dml-trigger">
+  <sect2 id="plpgsql-dml-trigger" xreflabel="Triggers on Data Changes">
    <title>Triggers on Data Changes</title>
 
   <para>
@@ -4723,7 +4723,7 @@ CREATE TRIGGER emp_audit_del
 
 </sect2>
 
-  <sect2 id="plpgsql-event-trigger">
+  <sect2 id="plpgsql-event-trigger" xreflabel="Triggers on Events">
    <title>Triggers on Events</title>
 
    <para>
@@ -4787,7 +4787,7 @@ CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE FUNCTION snitch();
 
   </sect1>
 
-  <sect1 id="plpgsql-implementation">
+  <sect1 id="plpgsql-implementation" xreflabel="PL/pgSQL under the Hood">
    <title><application>PL/pgSQL</application> under the Hood</title>
 
    <para>
@@ -4795,7 +4795,7 @@ CREATE EVENT TRIGGER snitch ON ddl_command_start EXECUTE FUNCTION snitch();
     frequently important for <application>PL/pgSQL</application> users to know.
    </para>
 
-  <sect2 id="plpgsql-var-subst">
+  <sect2 id="plpgsql-var-subst" xreflabel="Variable Substitution">
    <title>Variable Substitution</title>
 
    <para>
@@ -4973,7 +4973,7 @@ $$ LANGUAGE plpgsql;
 
   </sect2>
 
-  <sect2 id="plpgsql-plan-caching">
+  <sect2 id="plpgsql-plan-caching" xreflabel="Plan Caching">
    <title>Plan Caching</title>
 
    <para>
@@ -5128,7 +5128,7 @@ $$ LANGUAGE plpgsql;
 
   </sect1>
 
- <sect1 id="plpgsql-development-tips">
+ <sect1 id="plpgsql-development-tips" xreflabel="Tips for Developing in PL/pgSQL">
   <title>Tips for Developing in <application>PL/pgSQL</application></title>
 
    <para>
@@ -5165,7 +5165,7 @@ $$ LANGUAGE plpgsql;
     making it easier to recreate and debug functions.
    </para>
 
-  <sect2 id="plpgsql-quote-tips">
+  <sect2 id="plpgsql-quote-tips" xreflabel="Handling of Quotation Marks">
    <title>Handling of Quotation Marks</title>
 
    <para>
@@ -5321,7 +5321,7 @@ a_output := a_output || $$ IF v_$$ || referrer_keys.kind || $$ LIKE '$$
   </variablelist>
 
   </sect2>
-  <sect2 id="plpgsql-extra-checks">
+  <sect2 id="plpgsql-extra-checks" xreflabel="Additional Compile-Time and Run-Time Checks">
    <title>Additional Compile-Time and Run-Time Checks</title>
 
    <para>
@@ -5446,7 +5446,7 @@ HINT:  Make sure the query returns the exact list of columns.
 
   <!-- **** Porting from Oracle PL/SQL **** -->
 
- <sect1 id="plpgsql-porting">
+ <sect1 id="plpgsql-porting" xreflabel="Porting from Oracle PL/SQL">
   <title>Porting from <productname>Oracle</productname> PL/SQL</title>
 
   <indexterm zone="plpgsql-porting">
@@ -5560,7 +5560,7 @@ HINT:  Make sure the query returns the exact list of columns.
     </itemizedlist>
    </para>
 
-  <sect2 id="plpgsql-porting-examples">
+  <sect2 id="plpgsql-porting-examples" xreflabel="Porting Examples">
    <title>Porting Examples</title>
 
    <para>
@@ -5955,7 +5955,7 @@ $$ LANGUAGE plpgsql;
    </example>
   </sect2>
 
-  <sect2 id="plpgsql-porting-other">
+  <sect2 id="plpgsql-porting-other" xreflabel="Other Things to Watch For">
    <title>Other Things to Watch For</title>
 
    <para>
@@ -5964,7 +5964,7 @@ $$ LANGUAGE plpgsql;
     <productname>PostgreSQL</productname>.
    </para>
 
-   <sect3 id="plpgsql-porting-exceptions">
+   <sect3 id="plpgsql-porting-exceptions" xreflabel="Implicit Rollback after Exceptions">
     <title>Implicit Rollback after Exceptions</title>
 
     <para>
@@ -5996,7 +5996,7 @@ END;
     </para>
    </sect3>
 
-   <sect3 id="plpgsql-porting-other-execute">
+   <sect3 id="plpgsql-porting-other-execute" xreflabel="EXECUTE">
     <title><command>EXECUTE</command></title>
 
     <para>
@@ -6011,7 +6011,7 @@ END;
     </para>
    </sect3>
 
-   <sect3 id="plpgsql-porting-optimization">
+   <sect3 id="plpgsql-porting-optimization" xreflabel="Optimizing PL/pgSQL Functions">
     <title>Optimizing <application>PL/pgSQL</application> Functions</title>
 
     <para>
@@ -6038,7 +6038,7 @@ $$ LANGUAGE plpgsql STRICT IMMUTABLE;
    </sect3>
   </sect2>
 
-  <sect2 id="plpgsql-porting-appendix">
+  <sect2 id="plpgsql-porting-appendix" xreflabel="Appendix">
    <title>Appendix</title>
 
    <para>
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml
index c447452b7c5..8fb19a89666 100644
--- a/doc/src/sgml/plpython.sgml
+++ b/doc/src/sgml/plpython.sgml
@@ -46,7 +46,7 @@
   </para>
  </note>
 
- <sect1 id="plpython-funcs">
+ <sect1 id="plpython-funcs" xreflabel="PL/Python Functions">
   <title>PL/Python Functions</title>
 
   <para>
@@ -144,7 +144,7 @@ $$ LANGUAGE plpython3u;
   </para>
  </sect1>
 
- <sect1 id="plpython-data">
+ <sect1 id="plpython-data" xreflabel="Data Values">
   <title>Data Values</title>
   <para>
    Generally speaking, the aim of PL/Python is to provide
@@ -153,7 +153,7 @@ $$ LANGUAGE plpython3u;
    below.
   </para>
 
-  <sect2 id="plpython-data-type-mapping">
+  <sect2 id="plpython-data-type-mapping" xreflabel="Data Type Mapping">
    <title>Data Type Mapping</title>
    <para>
     When a PL/Python function is called, its arguments are converted from
@@ -269,7 +269,7 @@ $$ LANGUAGE plpython3u;
    </para>
   </sect2>
 
-  <sect2 id="plpython-data-null">
+  <sect2 id="plpython-data-null" xreflabel="Null, None">
    <title>Null, None</title>
   <para>
    If an SQL null value<indexterm><primary>null value</primary><secondary
@@ -301,7 +301,7 @@ $$ LANGUAGE plpython3u;
   </para>
   </sect2>
 
-  <sect2 id="plpython-arrays">
+  <sect2 id="plpython-arrays" xreflabel="Arrays, Lists">
    <title>Arrays, Lists</title>
   <para>
    SQL array values are passed into PL/Python as a Python list.  To
@@ -369,7 +369,7 @@ SELECT return_str_arr();
   </para>
   </sect2>
 
-  <sect2 id="plpython-data-composite-types">
+  <sect2 id="plpython-data-composite-types" xreflabel="Composite Types">
    <title>Composite Types</title>
   <para>
    Composite-type arguments are passed to the function as Python mappings. The
@@ -516,7 +516,7 @@ CALL python_triple(5, 10);
    </para>
   </sect2>
 
-  <sect2 id="plpython-data-set-returning-funcs">
+  <sect2 id="plpython-data-set-returning-funcs" xreflabel="Set-Returning Functions">
    <title>Set-Returning Functions</title>
   <para>
    A <application>PL/Python</application> function can also return sets of
@@ -616,7 +616,7 @@ SELECT * FROM multiout_simple_setof(3);
   </sect2>
  </sect1>
 
- <sect1 id="plpython-sharing">
+ <sect1 id="plpython-sharing" xreflabel="Sharing Data">
   <title>Sharing Data</title>
   <para>
    The global dictionary <varname>SD</varname> is available to store
@@ -636,7 +636,7 @@ SELECT * FROM multiout_simple_setof(3);
   </para>
  </sect1>
 
- <sect1 id="plpython-do">
+ <sect1 id="plpython-do" xreflabel="Anonymous Code Blocks">
   <title>Anonymous Code Blocks</title>
 
   <para>
@@ -654,7 +654,7 @@ $$ LANGUAGE plpython3u;
   </para>
  </sect1>
 
- <sect1 id="plpython-trigger">
+ <sect1 id="plpython-trigger" xreflabel="Trigger Functions">
   <title>Trigger Functions</title>
 
   <indexterm zone="plpython-trigger">
@@ -777,7 +777,7 @@ $$ LANGUAGE plpython3u;
   </para>
  </sect1>
 
- <sect1 id="plpython-event-trigger">
+ <sect1 id="plpython-event-trigger" xreflabel="Event Trigger Functions">
   <title>Event Trigger Functions</title>
 
   <indexterm zone="plpython-event-trigger">
@@ -845,7 +845,7 @@ CREATE EVENT TRIGGER pysnitch ON ddl_command_start EXECUTE FUNCTION pysnitch();
   </example>
  </sect1>
 
- <sect1 id="plpython-database">
+ <sect1 id="plpython-database" xreflabel="Database Access">
   <title>Database Access</title>
 
   <para>
@@ -855,7 +855,7 @@ CREATE EVENT TRIGGER pysnitch ON ddl_command_start EXECUTE FUNCTION pysnitch();
    <literal>plpy.<replaceable>foo</replaceable></literal>.
   </para>
 
-  <sect2 id="plpython-database-access-funcs">
+  <sect2 id="plpython-database-access-funcs" xreflabel="Database Access Functions">
     <title>Database Access Functions</title>
 
   <para>
@@ -1115,7 +1115,7 @@ $$ LANGUAGE plpython3u;
 
   </sect2>
 
-  <sect2 id="plpython-trapping">
+  <sect2 id="plpython-trapping" xreflabel="Trapping Errors">
    <title>Trapping Errors</title>
 
    <para>
@@ -1188,7 +1188,7 @@ $$ LANGUAGE plpython3u;
   </sect2>
  </sect1>
 
- <sect1 id="plpython-subtransaction">
+ <sect1 id="plpython-subtransaction" xreflabel="Explicit Subtransactions">
   <title>Explicit Subtransactions</title>
 
   <para>
@@ -1200,7 +1200,7 @@ $$ LANGUAGE plpython3u;
    the form of explicit subtransactions.
   </para>
 
-  <sect2 id="plpython-subtransaction-context-managers">
+  <sect2 id="plpython-subtransaction-context-managers" xreflabel="Subtransaction Context Managers">
    <title>Subtransaction Context Managers</title>
 
    <para>
@@ -1268,7 +1268,7 @@ $$ LANGUAGE plpython3u;
   </sect2>
  </sect1>
 
- <sect1 id="plpython-transactions">
+ <sect1 id="plpython-transactions" xreflabel="Transaction Management">
   <title>Transaction Management</title>
 
   <para>
@@ -1307,7 +1307,7 @@ CALL transaction_test1();
   </para>
  </sect1>
 
- <sect1 id="plpython-util">
+ <sect1 id="plpython-util" xreflabel="Utility Functions">
   <title>Utility Functions</title>
   <para>
    The <literal>plpy</literal> module also provides the functions
@@ -1395,7 +1395,7 @@ plpy.execute("UPDATE tbl SET %s = %s WHERE key = %s" % (
   </para>
  </sect1>
 
- <sect1 id="plpython-python23">
+ <sect1 id="plpython-python23" xreflabel="Python 2 vs. Python 3">
   <title>Python 2 vs. Python 3</title>
 
   <para>
@@ -1406,7 +1406,7 @@ plpy.execute("UPDATE tbl SET %s = %s WHERE key = %s" % (
   </para>
  </sect1>
 
- <sect1 id="plpython-envar">
+ <sect1 id="plpython-envar" xreflabel="Environment Variables">
   <title>Environment Variables</title>
 
   <para>
diff --git a/doc/src/sgml/pltcl.sgml b/doc/src/sgml/pltcl.sgml
index 9fd008a99d7..bcc54f43cb7 100644
--- a/doc/src/sgml/pltcl.sgml
+++ b/doc/src/sgml/pltcl.sgml
@@ -21,7 +21,7 @@
 
   <!-- **** PL/Tcl overview **** -->
 
-  <sect1 id="pltcl-overview">
+  <sect1 id="pltcl-overview" xreflabel="Overview">
    <title>Overview</title>
 
    <para>
@@ -74,7 +74,7 @@
 
   <!-- **** PL/Tcl description **** -->
 
-   <sect1 id="pltcl-functions">
+   <sect1 id="pltcl-functions" xreflabel="PL/Tcl Functions and Arguments">
     <title>PL/Tcl Functions and Arguments</title>
 
     <para>
@@ -240,7 +240,7 @@ $$ LANGUAGE pltcl;
 
    </sect1>
 
-   <sect1 id="pltcl-data">
+   <sect1 id="pltcl-data" xreflabel="Data Values in PL/Tcl">
     <title>Data Values in PL/Tcl</title>
 
     <para>
@@ -254,7 +254,7 @@ $$ LANGUAGE pltcl;
 
    </sect1>
 
-   <sect1 id="pltcl-global">
+   <sect1 id="pltcl-global" xreflabel="Global Data in PL/Tcl">
     <title>Global Data in PL/Tcl</title>
 
     <indexterm zone="pltcl-global">
@@ -316,7 +316,7 @@ $$ LANGUAGE pltcl;
     </para>
    </sect1>
 
-   <sect1 id="pltcl-dbaccess">
+   <sect1 id="pltcl-dbaccess" xreflabel="Database Access from PL/Tcl">
     <title>Database Access from PL/Tcl</title>
 
     <para>
@@ -572,7 +572,7 @@ SELECT 'doesn''t' AS ret
 
    </sect1>
 
-   <sect1 id="pltcl-trigger">
+   <sect1 id="pltcl-trigger" xreflabel="Trigger Functions in PL/Tcl">
     <title>Trigger Functions in PL/Tcl</title>
 
     <indexterm>
@@ -784,7 +784,7 @@ CREATE TRIGGER trig_mytab_modcount BEFORE INSERT OR UPDATE ON mytab
     </para>
    </sect1>
 
-   <sect1 id="pltcl-event-trigger">
+   <sect1 id="pltcl-event-trigger" xreflabel="Event Trigger Functions in PL/Tcl">
     <title>Event Trigger Functions in PL/Tcl</title>
 
     <indexterm>
@@ -843,7 +843,7 @@ CREATE EVENT TRIGGER tcl_a_snitch ON ddl_command_start EXECUTE FUNCTION tclsnitc
     </para>
    </sect1>
 
-   <sect1 id="pltcl-error-handling">
+   <sect1 id="pltcl-error-handling" xreflabel="Error Handling in PL/Tcl">
     <title>Error Handling in PL/Tcl</title>
 
     <indexterm>
@@ -918,7 +918,7 @@ if {[catch { spi_exec $sql_command }]} {
     </para>
    </sect1>
 
-   <sect1 id="pltcl-subtransactions">
+   <sect1 id="pltcl-subtransactions" xreflabel="Explicit Subtransactions in PL/Tcl">
     <title>Explicit Subtransactions in PL/Tcl</title>
 
     <indexterm>
@@ -1000,7 +1000,7 @@ $$ LANGUAGE pltcl;
     </para>
    </sect1>
 
-   <sect1 id="pltcl-transactions">
+   <sect1 id="pltcl-transactions" xreflabel="Transaction Management">
     <title>Transaction Management</title>
 
     <para>
@@ -1041,7 +1041,7 @@ CALL transaction_test1();
     </para>
    </sect1>
 
-   <sect1 id="pltcl-config">
+   <sect1 id="pltcl-config" xreflabel="PL/Tcl Configuration">
     <title>PL/Tcl Configuration</title>
 
     <para>
@@ -1115,7 +1115,7 @@ CALL transaction_test1();
     </variablelist>
    </sect1>
 
-   <sect1 id="pltcl-procnames">
+   <sect1 id="pltcl-procnames" xreflabel="Tcl Procedure Names">
     <title>Tcl Procedure Names</title>
 
     <para>
diff --git a/doc/src/sgml/postgres-fdw.sgml b/doc/src/sgml/postgres-fdw.sgml
index 9b032fbf675..e8e2c97d312 100644
--- a/doc/src/sgml/postgres-fdw.sgml
+++ b/doc/src/sgml/postgres-fdw.sgml
@@ -108,10 +108,10 @@
   of columns to the remote table is by name, not position.
  </para>
 
- <sect2 id="postgres-fdw-options">
+ <sect2 id="postgres-fdw-options" xreflabel="FDW Options of postgres_fdw">
   <title>FDW Options of postgres_fdw</title>
 
-  <sect3 id="postgres-fdw-options-connection">
+  <sect3 id="postgres-fdw-options-connection" xreflabel="Connection Options">
    <title>Connection Options</title>
 
    <para>
@@ -202,7 +202,7 @@ OPTIONS (ADD password_required 'false');
    </para>
   </sect3>
 
-  <sect3 id="postgres-fdw-options-object-name">
+  <sect3 id="postgres-fdw-options-object-name" xreflabel="Object Name Options">
    <title>Object Name Options</title>
 
    <para>
@@ -251,7 +251,7 @@ OPTIONS (ADD password_required 'false');
 
   </sect3>
 
-  <sect3 id="postgres-fdw-options-cost-estimation">
+  <sect3 id="postgres-fdw-options-cost-estimation" xreflabel="Cost Estimation Options">
    <title>Cost Estimation Options</title>
 
    <para>
@@ -368,7 +368,7 @@ OPTIONS (ADD password_required 'false');
 
   </sect3>
 
-  <sect3 id="postgres-fdw-options-remote-execution">
+  <sect3 id="postgres-fdw-options-remote-execution" xreflabel="Remote Execution Options">
    <title>Remote Execution Options</title>
 
    <para>
@@ -453,7 +453,7 @@ OPTIONS (ADD password_required 'false');
 
   </sect3>
 
-  <sect3 id="postgres-fdw-options-asynchronous-execution">
+  <sect3 id="postgres-fdw-options-asynchronous-execution" xreflabel="Asynchronous Execution Options">
    <title>Asynchronous Execution Options</title>
 
    <para>
@@ -504,7 +504,7 @@ OPTIONS (ADD password_required 'false');
    </variablelist>
   </sect3>
 
-  <sect3 id="postgres-fdw-options-transaction-management">
+  <sect3 id="postgres-fdw-options-transaction-management" xreflabel="Transaction Management Options">
    <title>Transaction Management Options</title>
 
    <para>
@@ -569,7 +569,7 @@ OPTIONS (ADD password_required 'false');
 
   </sect3>
 
-  <sect3 id="postgres-fdw-options-updatability">
+  <sect3 id="postgres-fdw-options-updatability" xreflabel="Updatability Options">
    <title>Updatability Options</title>
 
    <para>
@@ -606,7 +606,7 @@ OPTIONS (ADD password_required 'false');
    </variablelist>
   </sect3>
 
-  <sect3 id="postgres-fdw-options-truncatability">
+  <sect3 id="postgres-fdw-options-truncatability" xreflabel="Truncatability Options">
    <title>Truncatability Options</title>
 
    <para>
@@ -637,7 +637,7 @@ OPTIONS (ADD password_required 'false');
    </variablelist>
   </sect3>
 
-  <sect3 id="postgres-fdw-options-importing">
+  <sect3 id="postgres-fdw-options-importing" xreflabel="Importing Options">
    <title>Importing Options</title>
 
    <para>
@@ -745,7 +745,7 @@ OPTIONS (ADD password_required 'false');
 
   </sect3>
 
-  <sect3 id="postgres-fdw-options-connection-management">
+  <sect3 id="postgres-fdw-options-connection-management" xreflabel="Connection Management Options">
     <title>Connection Management Options</title>
 
     <para>
@@ -841,7 +841,7 @@ OPTIONS (ADD password_required 'false');
    </sect3>
  </sect2>
 
-<sect2 id="postgres-fdw-functions">
+<sect2 id="postgres-fdw-functions" xreflabel="Functions">
   <title>Functions</title>
 
   <variablelist>
@@ -1012,7 +1012,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
 
 </sect2>
 
- <sect2 id="postgres-fdw-connection-management">
+ <sect2 id="postgres-fdw-connection-management" xreflabel="Connection Management">
   <title>Connection Management</title>
 
   <para>
@@ -1049,7 +1049,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
   </para>
  </sect2>
 
- <sect2 id="postgres-fdw-transaction-management">
+ <sect2 id="postgres-fdw-transaction-management" xreflabel="Transaction Management">
   <title>Transaction Management</title>
 
   <para>
@@ -1084,7 +1084,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
   </para>
  </sect2>
 
- <sect2 id="postgres-fdw-remote-query-optimization">
+ <sect2 id="postgres-fdw-remote-query-optimization" xreflabel="Remote Query Optimization">
   <title>Remote Query Optimization</title>
 
   <para>
@@ -1127,7 +1127,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
   </para>
  </sect2>
 
- <sect2 id="postgres-fdw-remote-query-execution-environment">
+ <sect2 id="postgres-fdw-remote-query-execution-environment" xreflabel="Remote Query Execution Environment">
   <title>Remote Query Execution Environment</title>
 
   <para>
@@ -1183,7 +1183,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
   </para>
  </sect2>
 
- <sect2 id="postgres-fdw-cross-version-compatibility">
+ <sect2 id="postgres-fdw-cross-version-compatibility" xreflabel="Cross-Version Compatibility">
   <title>Cross-Version Compatibility</title>
 
   <para>
@@ -1213,7 +1213,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
   </para>
  </sect2>
 
- <sect2 id="postgres-fdw-wait-events">
+ <sect2 id="postgres-fdw-wait-events" xreflabel="Wait Events">
   <title>Wait Events</title>
 
   <para>
@@ -1251,7 +1251,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
   </variablelist>
  </sect2>
 
- <sect2 id="postgres-fdw-configuration-parameters">
+ <sect2 id="postgres-fdw-configuration-parameters" xreflabel="Configuration Parameters">
   <title>Configuration Parameters</title>
 
   <variablelist>
@@ -1351,7 +1351,7 @@ postgres=# SELECT postgres_fdw_disconnect_all();
   </variablelist>
  </sect2>
 
- <sect2 id="postgres-fdw-examples">
+ <sect2 id="postgres-fdw-examples" xreflabel="Examples">
   <title>Examples</title>
 
   <para>
@@ -1415,7 +1415,7 @@ CREATE FOREIGN TABLE foreign_table (
   </para>
  </sect2>
 
- <sect2 id="postgres-fdw-author">
+ <sect2 id="postgres-fdw-author" xreflabel="Author">
   <title>Author</title>
   <para>
    Shigeru Hanada <email>shigeru.hanada@gmail.com</email>
diff --git a/doc/src/sgml/problems.sgml b/doc/src/sgml/problems.sgml
index fc25c715ebb..47ae690f7d0 100644
--- a/doc/src/sgml/problems.sgml
+++ b/doc/src/sgml/problems.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/problems.sgml -->
 
-<sect1 id="bug-reporting">
+<sect1 id="bug-reporting" xreflabel="Bug Reporting Guidelines">
  <title>Bug Reporting Guidelines</title>
 
  <para>
@@ -28,7 +28,7 @@
   If you need help immediately, consider obtaining a commercial support contract.
  </para>
 
- <sect2 id="bug-reporting-identifying-bugs">
+ <sect2 id="bug-reporting-identifying-bugs" xreflabel="Identifying Bugs">
   <title>Identifying Bugs</title>
 
   <para>
@@ -96,7 +96,7 @@
   </para>
  </sect2>
 
- <sect2 id="bug-reporting-what-to-report">
+ <sect2 id="bug-reporting-what-to-report" xreflabel="What to Report">
   <title>What to Report</title>
 
   <para>
@@ -291,7 +291,7 @@
   </para>
  </sect2>
 
- <sect2 id="bug-reporting-where-to-report-bugs">
+ <sect2 id="bug-reporting-where-to-report-bugs" xreflabel="Where to Report Bugs">
   <title>Where to Report Bugs</title>
 
   <para>
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 41c5954a424..07611d0064a 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -35,7 +35,7 @@
    are interchangeable.
   </para>
 
- <sect1 id="protocol-overview">
+ <sect1 id="protocol-overview" xreflabel="Overview">
   <title>Overview</title>
 
   <para>
@@ -80,7 +80,7 @@
    such as <command>COPY</command>.
   </para>
 
- <sect2 id="protocol-message-concepts">
+ <sect2 id="protocol-message-concepts" xreflabel="Messaging Overview">
   <title>Messaging Overview</title>
 
   <para>
@@ -113,7 +113,7 @@
   </para>
  </sect2>
 
-  <sect2 id="protocol-query-concepts">
+  <sect2 id="protocol-query-concepts" xreflabel="Extended Query Overview">
    <title>Extended Query Overview</title>
 
    <para>
@@ -155,7 +155,7 @@
    </para>
   </sect2>
 
-  <sect2 id="protocol-format-codes">
+  <sect2 id="protocol-format-codes" xreflabel="Formats and Format Codes">
    <title>Formats and Format Codes</title>
 
    <para>
@@ -188,7 +188,7 @@
    </para>
   </sect2>
 
-  <sect2 id="protocol-versions">
+  <sect2 id="protocol-versions" xreflabel="Protocol Versions">
    <title>Protocol Versions</title>
 
    <para>
@@ -273,7 +273,7 @@
   </sect2>
  </sect1>
 
- <sect1 id="protocol-flow">
+ <sect1 id="protocol-flow" xreflabel="Message Flow">
   <title>Message Flow</title>
 
   <para>
@@ -288,7 +288,7 @@
    after the start-up phase.
   </para>
 
-  <sect2 id="protocol-flow-start-up">
+  <sect2 id="protocol-flow-start-up" xreflabel="Start-up">
    <title>Start-up</title>
 
    <para>
@@ -602,7 +602,7 @@
    </para>
   </sect2>
 
-  <sect2 id="protocol-flow-simple-query">
+  <sect2 id="protocol-flow-simple-query" xreflabel="Simple Query">
    <title>Simple Query</title>
 
    <para>
@@ -774,7 +774,7 @@
     rather than wiring in assumptions about the exact sequence of messages.
    </para>
 
-   <sect3 id="protocol-flow-multi-statement">
+   <sect3 id="protocol-flow-multi-statement" xreflabel="Multiple Statements in a Simple Query">
     <title>Multiple Statements in a Simple Query</title>
 
     <para>
@@ -904,7 +904,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </sect3>
   </sect2>
 
-  <sect2 id="protocol-flow-ext-query">
+  <sect2 id="protocol-flow-ext-query" xreflabel="Extended Query">
    <title>Extended Query</title>
 
    <para>
@@ -1133,7 +1133,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </note>
   </sect2>
 
-  <sect2 id="protocol-flow-pipelining">
+  <sect2 id="protocol-flow-pipelining" xreflabel="Pipelining">
    <title>Pipelining</title>
 
    <indexterm zone="protocol-flow-pipelining">
@@ -1193,7 +1193,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </para>
   </sect2>
 
-  <sect2 id="protocol-flow-function-call">
+  <sect2 id="protocol-flow-function-call" xreflabel="Function Call">
    <title>Function Call</title>
 
    <para>
@@ -1271,7 +1271,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </para>
   </sect2>
 
-  <sect2 id="protocol-copy">
+  <sect2 id="protocol-copy" xreflabel="COPY Operations">
    <title>COPY Operations</title>
 
    <para>
@@ -1379,7 +1379,7 @@ SELCT 1/0;<!-- this typo is intentional -->
 
   </sect2>
 
-  <sect2 id="protocol-async">
+  <sect2 id="protocol-async" xreflabel="Asynchronous Operations">
    <title>Asynchronous Operations</title>
 
    <para>
@@ -1469,7 +1469,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </note>
   </sect2>
 
-  <sect2 id="protocol-flow-canceling-requests">
+  <sect2 id="protocol-flow-canceling-requests" xreflabel="Canceling Requests in Progress">
    <title>Canceling Requests in Progress</title>
 
    <para>
@@ -1533,7 +1533,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </para>
   </sect2>
 
-  <sect2 id="protocol-flow-termination">
+  <sect2 id="protocol-flow-termination" xreflabel="Termination">
    <title>Termination</title>
 
    <para>
@@ -1573,7 +1573,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </para>
   </sect2>
 
-  <sect2 id="protocol-flow-ssl">
+  <sect2 id="protocol-flow-ssl" xreflabel="SSL Session Encryption">
    <title><acronym>SSL</acronym> Session Encryption</title>
 
    <para>
@@ -1682,7 +1682,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </para>
   </sect2>
 
-  <sect2 id="protocol-flow-gssapi">
+  <sect2 id="protocol-flow-gssapi" xreflabel="GSSAPI Session Encryption">
    <title><acronym>GSSAPI</acronym> Session Encryption</title>
 
    <para>
@@ -1776,7 +1776,7 @@ SELCT 1/0;<!-- this typo is intentional -->
   </sect2>
  </sect1>
 
- <sect1 id="sasl-authentication">
+ <sect1 id="sasl-authentication" xreflabel="SASL Authentication">
   <title>SASL Authentication</title>
 
   <para>
@@ -1835,7 +1835,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    ErrorMessage.
   </para>
 
-  <sect2 id="sasl-scram-sha-256">
+  <sect2 id="sasl-scram-sha-256" xreflabel="SCRAM-SHA-256 Authentication">
    <title>SCRAM-SHA-256 Authentication</title>
 
    <para>
@@ -1944,7 +1944,7 @@ SELCT 1/0;<!-- this typo is intentional -->
    </procedure>
   </sect2>
 
-  <sect2 id="sasl-oauthbearer">
+  <sect2 id="sasl-oauthbearer" xreflabel="OAUTHBEARER Authentication">
    <title>OAUTHBEARER Authentication</title>
 
    <para>
@@ -2060,7 +2060,7 @@ SELCT 1/0;<!-- this typo is intentional -->
   </sect2>
  </sect1>
 
- <sect1 id="protocol-replication">
+ <sect1 id="protocol-replication" xreflabel="Streaming Replication Protocol">
   <title>Streaming Replication Protocol</title>
 
   <para>
@@ -3508,7 +3508,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
   </para>
  </sect1>
 
-<sect1 id="protocol-logical-replication">
+<sect1 id="protocol-logical-replication" xreflabel="Logical Streaming Replication Protocol">
  <title>Logical Streaming Replication Protocol</title>
 
  <para>
@@ -3523,7 +3523,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
   the physical streaming replication protocol.
  </para>
 
- <sect2 id="protocol-logical-replication-params">
+ <sect2 id="protocol-logical-replication-params" xreflabel="Logical Streaming Replication Parameters">
   <title>Logical Streaming Replication Parameters</title>
 
   <para>
@@ -3535,7 +3535,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
   </para>
  </sect2>
 
- <sect2 id="protocol-logical-messages">
+ <sect2 id="protocol-logical-messages" xreflabel="Logical Replication Protocol Messages">
   <title>Logical Replication Protocol Messages</title>
 
   <para>
@@ -3558,7 +3558,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
 
  </sect2>
 
- <sect2 id="protocol-logical-messages-flow">
+ <sect2 id="protocol-logical-messages-flow" xreflabel="Logical Replication Protocol Message Flow">
   <title>Logical Replication Protocol Message Flow</title>
 
   <para>
@@ -3612,7 +3612,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
  </sect2>
 </sect1>
 
- <sect1 id="protocol-message-types">
+ <sect1 id="protocol-message-types" xreflabel="Message Data Types">
   <title>Message Data Types</title>
 
   <para>
@@ -3684,7 +3684,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
   </variablelist>
  </sect1>
 
- <sect1 id="protocol-message-formats">
+ <sect1 id="protocol-message-formats" xreflabel="Message Formats">
   <title>Message Formats</title>
 
   <para>
@@ -6225,7 +6225,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
   </variablelist>
  </sect1>
 
- <sect1 id="protocol-error-fields">
+ <sect1 id="protocol-error-fields" xreflabel="Error and Notice Message Fields">
   <title>Error and Notice Message Fields</title>
 
   <para>
@@ -6463,7 +6463,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
   </para>
  </sect1>
 
- <sect1 id="protocol-logicalrep-message-formats">
+ <sect1 id="protocol-logicalrep-message-formats" xreflabel="Logical Replication Message Formats">
   <title>Logical Replication Message Formats</title>
 
   <para>
@@ -7760,7 +7760,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
   </variablelist>
  </sect1>
 
- <sect1 id="protocol-changes">
+ <sect1 id="protocol-changes" xreflabel="Summary of Changes since Protocol 2.0">
   <title>Summary of Changes since Protocol 2.0</title>
 
   <para>
diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgml
index 4b522213171..0abeecb159b 100644
--- a/doc/src/sgml/queries.sgml
+++ b/doc/src/sgml/queries.sgml
@@ -18,7 +18,7 @@
  </para>
 
 
- <sect1 id="queries-overview">
+ <sect1 id="queries-overview" xreflabel="Overview">
   <title>Overview</title>
 
   <para>
@@ -80,7 +80,7 @@ SELECT random();
  </sect1>
 
 
- <sect1 id="queries-table-expressions">
+ <sect1 id="queries-table-expressions" xreflabel="Table Expressions">
   <title>Table Expressions</title>
 
   <indexterm zone="queries-table-expressions">
@@ -106,7 +106,7 @@ SELECT random();
    the select list to compute the output rows of the query.
   </para>
 
-  <sect2 id="queries-from">
+  <sect2 id="queries-from" xreflabel="The FROM Clause">
    <title>The <literal>FROM</literal> Clause</title>
 
    <para>
@@ -150,7 +150,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
     However, it is supported for compatibility with older releases.
    </para>
 
-   <sect3 id="queries-join">
+   <sect3 id="queries-join" xreflabel="Joined Tables">
     <title>Joined Tables</title>
 
     <indexterm zone="queries-join">
@@ -530,7 +530,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
     </para>
    </sect3>
 
-   <sect3 id="queries-table-aliases">
+   <sect3 id="queries-table-aliases" xreflabel="Table and Column Aliases">
     <title>Table and Column Aliases</title>
 
     <indexterm zone="queries-table-aliases">
@@ -628,7 +628,7 @@ SELECT a.* FROM (my_table AS a JOIN your_table AS b ON ...) AS c
     </para>
    </sect3>
 
-   <sect3 id="queries-subqueries">
+   <sect3 id="queries-subqueries" xreflabel="Subqueries">
     <title>Subqueries</title>
 
     <indexterm zone="queries-subqueries">
@@ -672,7 +672,7 @@ FROM (VALUES ('anne', 'smith'), ('bob', 'jones'), ('joe', 'blow'))
     </para>
    </sect3>
 
-   <sect3 id="queries-tablefunctions">
+   <sect3 id="queries-tablefunctions" xreflabel="Table Functions">
     <title>Table Functions</title>
 
     <indexterm zone="queries-tablefunctions"><primary>table function</primary></indexterm>
@@ -839,7 +839,7 @@ ORDER BY p;
     </para>
    </sect3>
 
-   <sect3 id="queries-lateral">
+   <sect3 id="queries-lateral" xreflabel="LATERAL Subqueries">
     <title><literal>LATERAL</literal> Subqueries</title>
 
     <indexterm zone="queries-lateral">
@@ -933,7 +933,7 @@ WHERE pname IS NULL;
    </sect3>
   </sect2>
 
-  <sect2 id="queries-where">
+  <sect2 id="queries-where" xreflabel="The WHERE Clause">
    <title>The <literal>WHERE</literal> Clause</title>
 
    <indexterm zone="queries-where">
@@ -1022,7 +1022,7 @@ SELECT ... FROM fdt WHERE EXISTS (SELECT c1 FROM t2 WHERE c2 &gt; fdt.c1)
   </sect2>
 
 
-  <sect2 id="queries-group">
+  <sect2 id="queries-group" xreflabel="The GROUP BY and HAVING Clauses">
    <title>The <literal>GROUP BY</literal> and <literal>HAVING</literal> Clauses</title>
 
    <indexterm zone="queries-group">
@@ -1241,7 +1241,7 @@ SELECT product_id, p.name, (sum(s.units) * (p.price - p.cost)) AS profit
    </para>
   </sect2>
 
-  <sect2 id="queries-grouping-sets">
+  <sect2 id="queries-grouping-sets" xreflabel="GROUPING SETS, CUBE, and ROLLUP">
    <title><literal>GROUPING SETS</literal>, <literal>CUBE</literal>, and <literal>ROLLUP</literal></title>
 
    <indexterm zone="queries-grouping-sets">
@@ -1465,7 +1465,7 @@ GROUP BY GROUPING SETS (
   </note>
   </sect2>
 
-  <sect2 id="queries-window">
+  <sect2 id="queries-window" xreflabel="Window Function Processing">
    <title>Window Function Processing</title>
 
    <indexterm zone="queries-window">
@@ -1510,7 +1510,7 @@ GROUP BY GROUPING SETS (
  </sect1>
 
 
- <sect1 id="queries-select-lists">
+ <sect1 id="queries-select-lists" xreflabel="Select Lists">
   <title>Select Lists</title>
 
   <indexterm>
@@ -1528,7 +1528,7 @@ GROUP BY GROUPING SETS (
    intermediate table are actually output.
   </para>
 
-  <sect2 id="queries-select-list-items">
+  <sect2 id="queries-select-list-items" xreflabel="Select-List Items">
    <title>Select-List Items</title>
 
    <indexterm>
@@ -1579,7 +1579,7 @@ SELECT tbl1.*, tbl2.a FROM ...
    </para>
   </sect2>
 
-  <sect2 id="queries-column-labels">
+  <sect2 id="queries-column-labels" xreflabel="Column Labels">
    <title>Column Labels</title>
 
    <indexterm zone="queries-column-labels">
@@ -1638,7 +1638,7 @@ SELECT a "from", b + c AS sum FROM ...
    </note>
   </sect2>
 
-  <sect2 id="queries-distinct">
+  <sect2 id="queries-distinct" xreflabel="DISTINCT">
    <title><literal>DISTINCT</literal></title>
 
    <indexterm zone="queries-distinct">
@@ -1706,7 +1706,7 @@ SELECT DISTINCT ON (<replaceable>expression</replaceable> <optional>, <replaceab
  </sect1>
 
 
- <sect1 id="queries-union">
+ <sect1 id="queries-union" xreflabel="Combining Queries (UNION, INTERSECT, EXCEPT)">
   <title>Combining Queries (<literal>UNION</literal>, <literal>INTERSECT</literal>, <literal>EXCEPT</literal>)</title>
 
   <indexterm zone="queries-union">
@@ -1819,7 +1819,7 @@ SELECT a FROM b UNION (SELECT x FROM y LIMIT 10)
  </sect1>
 
 
- <sect1 id="queries-order">
+ <sect1 id="queries-order" xreflabel="Sorting Rows (ORDER BY)">
   <title>Sorting Rows (<literal>ORDER BY</literal>)</title>
 
   <indexterm zone="queries-order">
@@ -1920,7 +1920,7 @@ SELECT a + b AS sum, c FROM table1 ORDER BY sum + c;          -- wrong
  </sect1>
 
 
- <sect1 id="queries-limit">
+ <sect1 id="queries-limit" xreflabel="LIMIT and OFFSET">
   <title><literal>LIMIT</literal> and <literal>OFFSET</literal></title>
 
   <indexterm zone="queries-limit">
@@ -1994,7 +1994,7 @@ SELECT <replaceable>select_list</replaceable>
  </sect1>
 
 
- <sect1 id="queries-values">
+ <sect1 id="queries-values" xreflabel="VALUES Lists">
   <title><literal>VALUES</literal> Lists</title>
 
   <indexterm zone="queries-values">
@@ -2070,7 +2070,7 @@ SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression
  </sect1>
 
 
- <sect1 id="queries-with">
+ <sect1 id="queries-with" xreflabel="WITH Queries (Common Table Expressions)">
   <title><literal>WITH</literal> Queries (Common Table Expressions)</title>
 
   <indexterm zone="queries-with">
@@ -2096,7 +2096,7 @@ SELECT <replaceable>select_list</replaceable> FROM <replaceable>table_expression
    <command>DELETE</command>, or <command>MERGE</command>.
   </para>
 
- <sect2 id="queries-with-select">
+ <sect2 id="queries-with-select" xreflabel="SELECT in WITH">
    <title><command>SELECT</command> in <literal>WITH</literal></title>
 
   <para>
@@ -2134,7 +2134,7 @@ GROUP BY region, product;
   </para>
  </sect2>
 
- <sect2 id="queries-with-recursive">
+ <sect2 id="queries-with-recursive" xreflabel="Recursive Queries">
   <title>Recursive Queries</title>
 
   <para>
@@ -2238,7 +2238,7 @@ GROUP BY sub_part
 </programlisting>
   </para>
 
-  <sect3 id="queries-with-search">
+  <sect3 id="queries-with-search" xreflabel="Search Order">
    <title>Search Order</title>
 
    <para>
@@ -2373,7 +2373,7 @@ SELECT * FROM search_tree ORDER BY ordercol;
    </para>
   </sect3>
 
-  <sect3 id="queries-with-cycle">
+  <sect3 id="queries-with-cycle" xreflabel="Cycle Detection">
    <title>Cycle Detection</title>
 
   <para>
@@ -2520,7 +2520,7 @@ SELECT n FROM t <emphasis>LIMIT 100</emphasis>;
   </sect3>
  </sect2>
 
- <sect2 id="queries-with-cte-materialization">
+ <sect2 id="queries-with-cte-materialization" xreflabel="Common Table Expression Materialization">
   <title>Common Table Expression Materialization</title>
 
   <para>
@@ -2622,7 +2622,7 @@ SELECT * FROM w AS w1 JOIN w AS w2 ON w1.f = w2.f;
   </para>
  </sect2>
 
- <sect2 id="queries-with-modifying">
+ <sect2 id="queries-with-modifying" xreflabel="Data-Modifying Statements in WITH">
    <title>Data-Modifying Statements in <literal>WITH</literal></title>
 
    <para>
diff --git a/doc/src/sgml/query.sgml b/doc/src/sgml/query.sgml
index b190f28d41e..49b973d2253 100644
--- a/doc/src/sgml/query.sgml
+++ b/doc/src/sgml/query.sgml
@@ -3,7 +3,7 @@
  <chapter id="tutorial-sql">
   <title>The <acronym>SQL</acronym> Language</title>
 
-  <sect1 id="tutorial-sql-intro">
+  <sect1 id="tutorial-sql-intro" xreflabel="Introduction">
    <title>Introduction</title>
 
    <para>
@@ -56,7 +56,7 @@
   </sect1>
 
 
-  <sect1 id="tutorial-concepts">
+  <sect1 id="tutorial-concepts" xreflabel="Concepts">
    <title>Concepts</title>
 
    <para>
@@ -102,7 +102,7 @@
   </sect1>
 
 
-  <sect1 id="tutorial-table">
+  <sect1 id="tutorial-table" xreflabel="Creating a New Table">
    <title>Creating a New Table</title>
 
    <indexterm zone="tutorial-table">
@@ -192,7 +192,7 @@ DROP TABLE <replaceable>tablename</replaceable>;
   </sect1>
 
 
-  <sect1 id="tutorial-populate">
+  <sect1 id="tutorial-populate" xreflabel="Populating a Table With Rows">
    <title>Populating a Table With Rows</title>
 
    <indexterm zone="tutorial-populate">
@@ -280,7 +280,7 @@ Hayward    37    54    \N    1994-11-29
   </sect1>
 
 
-  <sect1 id="tutorial-select">
+  <sect1 id="tutorial-select" xreflabel="Querying a Table">
    <title>Querying a Table</title>
 
    <para>
@@ -439,7 +439,7 @@ SELECT DISTINCT city
   </sect1>
 
 
-  <sect1 id="tutorial-join">
+  <sect1 id="tutorial-join" xreflabel="Joins Between Tables">
    <title>Joins Between Tables</title>
 
    <indexterm zone="tutorial-join">
@@ -640,7 +640,7 @@ SELECT *
   </sect1>
 
 
-  <sect1 id="tutorial-agg">
+  <sect1 id="tutorial-agg" xreflabel="Aggregate Functions">
    <title>Aggregate Functions</title>
 
    <indexterm zone="tutorial-agg">
@@ -837,7 +837,7 @@ SELECT city, count(*) FILTER (WHERE temp_lo &lt; 45), max(temp_lo)
   </sect1>
 
 
-  <sect1 id="tutorial-update">
+  <sect1 id="tutorial-update" xreflabel="Updates">
    <title>Updates</title>
 
    <indexterm zone="tutorial-update">
@@ -873,7 +873,7 @@ SELECT * FROM weather;
    </para>
   </sect1>
 
-  <sect1 id="tutorial-delete">
+  <sect1 id="tutorial-delete" xreflabel="Deletions">
    <title>Deletions</title>
 
    <indexterm zone="tutorial-delete">
diff --git a/doc/src/sgml/rangetypes.sgml b/doc/src/sgml/rangetypes.sgml
index 92ea0e83dab..b8eeb68462e 100644
--- a/doc/src/sgml/rangetypes.sgml
+++ b/doc/src/sgml/rangetypes.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/rangetypes.sgml -->
 
-<sect1 id="rangetypes">
+<sect1 id="rangetypes" xreflabel="Range Types">
  <title>Range Types</title>
 
  <indexterm>
@@ -38,7 +38,7 @@
   of their own.
  </para>
 
- <sect2 id="rangetypes-builtin">
+ <sect2 id="rangetypes-builtin" xreflabel="Built-in Range and Multirange Types">
   <title>Built-in Range and Multirange Types</title>
 
  <para>
@@ -86,7 +86,7 @@
  </para>
  </sect2>
 
- <sect2 id="rangetypes-examples">
+ <sect2 id="rangetypes-examples" xreflabel="Examples">
   <title>Examples</title>
 
   <para>
@@ -117,7 +117,7 @@ SELECT isempty(numrange(1, 5));
   </para>
  </sect2>
 
- <sect2 id="rangetypes-inclusivity">
+ <sect2 id="rangetypes-inclusivity" xreflabel="Inclusive and Exclusive Bounds">
   <title>Inclusive and Exclusive Bounds</title>
 
   <para>
@@ -144,7 +144,7 @@ SELECT isempty(numrange(1, 5));
   </para>
  </sect2>
 
- <sect2 id="rangetypes-infinite">
+ <sect2 id="rangetypes-infinite" xreflabel="Infinite (Unbounded) Ranges">
   <title>Infinite (Unbounded) Ranges</title>
 
   <para>
@@ -177,7 +177,7 @@ SELECT isempty(numrange(1, 5));
   </para>
  </sect2>
 
- <sect2 id="rangetypes-io">
+ <sect2 id="rangetypes-io" xreflabel="Range Input/Output">
   <title>Range Input/Output</title>
 
   <para>
@@ -271,7 +271,7 @@ SELECT '{[3,7), [8,9)}'::int4multirange;
 
  </sect2>
 
- <sect2 id="rangetypes-construct">
+ <sect2 id="rangetypes-construct" xreflabel="Constructing Ranges and Multiranges">
   <title>Constructing Ranges and Multiranges</title>
 
   <para>
@@ -321,7 +321,7 @@ SELECT nummultirange(numrange(1.0, 14.0), numrange(20.0, 25.0));
   </para>
  </sect2>
 
- <sect2 id="rangetypes-discrete">
+ <sect2 id="rangetypes-discrete" xreflabel="Discrete Range Types">
   <title>Discrete Range Types</title>
 
   <para>
@@ -368,7 +368,7 @@ SELECT nummultirange(numrange(1.0, 14.0), numrange(20.0, 25.0));
   </para>
  </sect2>
 
- <sect2 id="rangetypes-defining">
+ <sect2 id="rangetypes-defining" xreflabel="Defining New Range Types">
   <title>Defining New Range Types</title>
 
   <para>
@@ -463,7 +463,7 @@ SELECT '[11:10, 23:00]'::timerange;
   </para>
  </sect2>
 
- <sect2 id="rangetypes-indexing">
+ <sect2 id="rangetypes-indexing" xreflabel="Indexing">
   <title>Indexing</title>
 
   <indexterm>
@@ -517,7 +517,7 @@ CREATE INDEX reservation_idx ON reservation USING GIST (during);
   </para>
  </sect2>
 
- <sect2 id="rangetypes-constraint">
+ <sect2 id="rangetypes-constraint" xreflabel="Constraints on Ranges">
   <title>Constraints on Ranges</title>
 
   <indexterm>
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index d80dd46c5fd..c25b4c29b48 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -18,7 +18,7 @@
    <productname>PostgreSQL</productname>.
   </para>
 
-  <sect1 id="regress-run">
+  <sect1 id="regress-run" xreflabel="Running the Tests">
    <title>Running the Tests</title>
 
   <para>
@@ -34,7 +34,7 @@
    mode in case this is required by the test.
   </para>
 
-  <sect2 id="regress-run-temp-inst">
+  <sect2 id="regress-run-temp-inst" xreflabel="Running the Tests Against a Temporary Installation">
    <title>Running the Tests Against a Temporary Installation</title>
 
   <para>
@@ -95,7 +95,7 @@ make MAX_CONNECTIONS=10 check
    </para>
   </sect2>
 
-  <sect2 id="regress-run-existing-inst">
+  <sect2 id="regress-run-existing-inst" xreflabel="Running the Tests Against an Existing Installation">
    <title>Running the Tests Against an Existing Installation</title>
 
   <para>
@@ -125,7 +125,7 @@ make installcheck-parallel
   </para>
   </sect2>
 
-  <sect2 id="regress-subset">
+  <sect2 id="regress-subset" xreflabel="Running Specific Tests">
    <title>Running Specific Tests</title>
 
    <para>
@@ -137,7 +137,7 @@ make installcheck-parallel
    </para>
   </sect2>
 
-  <sect2 id="regress-additional">
+  <sect2 id="regress-additional" xreflabel="Additional Test Suites">
    <title>Additional Test Suites</title>
 
   <para>
@@ -401,7 +401,7 @@ make check-world PG_TEST_EXTRA='kerberos ldap ssl load_balance libpq_encryption'
   </para>
   </sect2>
 
-  <sect2 id="regress-run-locale">
+  <sect2 id="regress-run-locale" xreflabel="Locale and Encoding">
    <title>Locale and Encoding</title>
 
    <para>
@@ -444,7 +444,7 @@ make check LANG=C ENCODING=EUC_JP
    </para>
   </sect2>
 
-  <sect2 id="regress-run-custom-settings">
+  <sect2 id="regress-run-custom-settings" xreflabel="Custom Server Settings">
    <title>Custom Server Settings</title>
 
    <para>
@@ -490,7 +490,7 @@ make check EXTRA_REGRESS_OPTS="--temp-config=test_postgresql.conf"
 
   </sect2>
 
-  <sect2 id="regress-run-extra-tests">
+  <sect2 id="regress-run-extra-tests" xreflabel="Extra Tests">
    <title>Extra Tests</title>
 
    <para>
@@ -506,7 +506,7 @@ make check EXTRA_TESTS=numeric_big
   </sect2>
   </sect1>
 
-  <sect1 id="regress-evaluation">
+  <sect1 id="regress-evaluation" xreflabel="Test Evaluation">
    <title>Test Evaluation</title>
 
    <para>
@@ -554,7 +554,7 @@ make check EXTRA_TESTS=numeric_big
     <xref linkend="regress-variant"/> for details.
    </para>
 
-   <sect2 id="regress-evaluation-message-differences">
+   <sect2 id="regress-evaluation-message-differences" xreflabel="Error Message Differences">
     <title>Error Message Differences</title>
 
     <para>
@@ -569,7 +569,7 @@ make check EXTRA_TESTS=numeric_big
     </para>
    </sect2>
 
-   <sect2 id="regress-evaluation-locale-differences">
+   <sect2 id="regress-evaluation-locale-differences" xreflabel="Locale Differences">
     <title>Locale Differences</title>
 
     <para>
@@ -616,7 +616,7 @@ make check NO_LOCALE=1
     </para>
    </sect2>
 
-   <sect2 id="regress-evaluation-date-time-differences">
+   <sect2 id="regress-evaluation-date-time-differences" xreflabel="Date and Time Differences">
     <title>Date and Time Differences</title>
 
     <para>
@@ -630,7 +630,7 @@ make check NO_LOCALE=1
     </para>
    </sect2>
 
-   <sect2 id="regress-evaluation-float-differences">
+   <sect2 id="regress-evaluation-float-differences" xreflabel="Floating-Point Differences">
     <title>Floating-Point Differences</title>
 
     <para>
@@ -658,7 +658,7 @@ make check NO_LOCALE=1
     </para>
    </sect2>
 
-   <sect2 id="regress-evaluation-ordering-differences">
+   <sect2 id="regress-evaluation-ordering-differences" xreflabel="Row Ordering Differences">
     <title>Row Ordering Differences</title>
 
     <para>
@@ -694,7 +694,7 @@ exclusion of those that don't.
     </para>
    </sect2>
 
-   <sect2 id="regress-evaluation-stack-depth">
+   <sect2 id="regress-evaluation-stack-depth" xreflabel="Insufficient Stack Depth">
     <title>Insufficient Stack Depth</title>
 
     <para>
@@ -716,7 +716,7 @@ exclusion of those that don't.
     </para>
    </sect2>
 
-   <sect2 id="regress-evaluation-random-test">
+   <sect2 id="regress-evaluation-random-test" xreflabel="The random Test">
     <title>The <quote>random</quote> Test</title>
 
     <para>
@@ -731,7 +731,7 @@ diff results/random.out expected/random.out
     </para>
    </sect2>
 
-   <sect2 id="regress-evaluation-config-params">
+   <sect2 id="regress-evaluation-config-params" xreflabel="Configuration Parameters">
     <title>Configuration Parameters</title>
 
     <para>
@@ -745,7 +745,7 @@ diff results/random.out expected/random.out
   </sect1>
 
 <!-- We might want to move the following section into the developer's guide. -->
-  <sect1 id="regress-variant">
+  <sect1 id="regress-variant" xreflabel="Variant Comparison Files">
    <title>Variant Comparison Files</title>
 
    <para>
@@ -839,7 +839,7 @@ float4:out:.*-.*-cygwin.*=float4-misrounded-input.out
 
   </sect1>
 
-  <sect1 id="regress-tap">
+  <sect1 id="regress-tap" xreflabel="TAP Tests">
    <title>TAP Tests</title>
 
    <para>
@@ -894,7 +894,7 @@ make check PROVE_TESTS='t/001_test1.pl t/003_test3.pl'
     results from temporary servers and the already-running test server.
    </para>
 
-  <sect2 id="regress-tap-vars">
+  <sect2 id="regress-tap-vars" xreflabel="Environment Variables">
    <title>Environment Variables</title>
 
    <para>
@@ -929,7 +929,7 @@ PG_TEST_NOCLEAN=1 make -C src/bin/pg_dump check
 
   </sect1>
 
-  <sect1 id="regress-coverage">
+  <sect1 id="regress-coverage" xreflabel="Test Coverage Examination">
    <title>Test Coverage Examination</title>
 
    <para>
@@ -941,7 +941,7 @@ PG_TEST_NOCLEAN=1 make -C src/bin/pg_dump check
     and <literal>lcov</literal> packages.
    </para>
 
-   <sect2 id="regress-coverage-configure">
+   <sect2 id="regress-coverage-configure" xreflabel="Coverage with Autoconf and Make">
     <title>Coverage with Autoconf and Make</title>
     <para>
      A typical workflow looks like this:
@@ -988,7 +988,7 @@ make coverage-clean
     </para>
    </sect2>
 
-   <sect2 id="regress-coverage-meson">
+   <sect2 id="regress-coverage-meson" xreflabel="Coverage with Meson">
     <title>Coverage with Meson</title>
     <para>
      A typical workflow looks like this:
diff --git a/doc/src/sgml/release-19.sgml b/doc/src/sgml/release-19.sgml
index 8d242b5b281..3bfcd8af86b 100644
--- a/doc/src/sgml/release-19.sgml
+++ b/doc/src/sgml/release-19.sgml
@@ -1,7 +1,7 @@
 <!-- doc/src/sgml/release-19.sgml -->
 <!-- See header comment in release.sgml about typical markup -->
 
-<sect1 id="release-19">
+<sect1 id="release-19" xreflabel="Release 19">
  <title>Release 19</title>
 
  <formalpara>
diff --git a/doc/src/sgml/release.sgml b/doc/src/sgml/release.sgml
index a659d382db9..75b4cd3006b 100644
--- a/doc/src/sgml/release.sgml
+++ b/doc/src/sgml/release.sgml
@@ -72,7 +72,7 @@ For new features, add links to the documentation sections.
 
 &release-19;
 
- <sect1 id="release-prior">
+ <sect1 id="release-prior" xreflabel="Prior Releases">
   <title>Prior Releases</title>
 
   <para>
diff --git a/doc/src/sgml/rowtypes.sgml b/doc/src/sgml/rowtypes.sgml
index bbeac84d46a..ed2469e2138 100644
--- a/doc/src/sgml/rowtypes.sgml
+++ b/doc/src/sgml/rowtypes.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/rowtypes.sgml -->
 
-<sect1 id="rowtypes">
+<sect1 id="rowtypes" xreflabel="Composite Types">
  <title>Composite Types</title>
 
  <indexterm>
@@ -19,7 +19,7 @@
   column of a table can be declared to be of a composite type.
  </para>
 
- <sect2 id="rowtypes-declaring">
+ <sect2 id="rowtypes-declaring" xreflabel="Declaration of Composite Types">
   <title>Declaration of Composite Types</title>
 
  <para>
@@ -91,7 +91,7 @@ CREATE TABLE inventory_item (
  </para>
  </sect2>
 
- <sect2 id="rowtypes-constructing">
+ <sect2 id="rowtypes-constructing" xreflabel="Constructing Composite Values">
   <title>Constructing Composite Values</title>
 
   <indexterm>
@@ -157,7 +157,7 @@ ROW('', 42, NULL)
  </para>
  </sect2>
 
- <sect2 id="rowtypes-accessing">
+ <sect2 id="rowtypes-accessing" xreflabel="Accessing Composite Types">
   <title>Accessing Composite Types</title>
 
  <para>
@@ -209,7 +209,7 @@ SELECT (my_func(...)).field FROM ...
  </para>
  </sect2>
 
- <sect2 id="rowtypes-modifying">
+ <sect2 id="rowtypes-modifying" xreflabel="Modifying Composite Types">
   <title>Modifying Composite Types</title>
 
  <para>
@@ -252,7 +252,7 @@ INSERT INTO mytab (complex_col.r, complex_col.i) VALUES(1.1, 2.2);
  </para>
  </sect2>
 
- <sect2 id="rowtypes-usage">
+ <sect2 id="rowtypes-usage" xreflabel="Using Composite Types in Queries">
   <title>Using Composite Types in Queries</title>
 
   <para>
@@ -453,7 +453,7 @@ SELECT c.somefunc FROM inventory_item c;
   </tip>
  </sect2>
 
- <sect2 id="rowtypes-io-syntax">
+ <sect2 id="rowtypes-io-syntax" xreflabel="Composite Type Input and Output Syntax">
   <title>Composite Type Input and Output Syntax</title>
 
   <para>
diff --git a/doc/src/sgml/rules.sgml b/doc/src/sgml/rules.sgml
index 7f23962f524..d9d340bd969 100644
--- a/doc/src/sgml/rules.sgml
+++ b/doc/src/sgml/rules.sgml
@@ -33,7 +33,7 @@
      linkend="ong90"/>.
 </para>
 
-<sect1 id="querytree">
+<sect1 id="querytree" xreflabel="The Query Tree">
 <title>The Query Tree</title>
 
 <indexterm zone="querytree">
@@ -266,7 +266,7 @@
 </para>
 </sect1>
 
-<sect1 id="rules-views">
+<sect1 id="rules-views" xreflabel="Views and the Rule System">
 <title>Views and the Rule System</title>
 
 <indexterm zone="rules-views">
@@ -311,7 +311,7 @@ CREATE RULE "_RETURN" AS ON SELECT TO myview DO INSTEAD
     <xref linkend="rules-views-update"/>.
 </para>
 
-<sect2 id="rules-select">
+<sect2 id="rules-select" xreflabel="How SELECT Rules Work">
 <title>How <command>SELECT</command> Rules Work</title>
 
 <indexterm zone="rules-select">
@@ -644,7 +644,7 @@ SELECT shoe_ready.shoename, shoe_ready.sh_avail,
    </para>
 </sect2>
 
-<sect2 id="rules-views-non-select">
+<sect2 id="rules-views-non-select" xreflabel="View Rules in Non-SELECT Statements">
 <title>View Rules in Non-<command>SELECT</command> Statements</title>
 
 <para>
@@ -764,7 +764,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
 </para>
 </sect2>
 
-<sect2 id="rules-views-power">
+<sect2 id="rules-views-power" xreflabel="The Power of Views in PostgreSQL">
 <title>The Power of Views in <productname>PostgreSQL</productname></title>
 
 <para>
@@ -793,7 +793,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
 </para>
 </sect2>
 
-<sect2 id="rules-views-update">
+<sect2 id="rules-views-update" xreflabel="Updating a View">
 <title>Updating a View</title>
 
 <para>
@@ -893,7 +893,7 @@ SELECT t1.a, t2.b, t1.ctid FROM t1, t2 WHERE t1.a = t2.a;
 
 </sect1>
 
-<sect1 id="rules-materializedviews">
+<sect1 id="rules-materializedviews" xreflabel="Materialized Views">
 <title>Materialized Views</title>
 
 <indexterm zone="rules-materializedviews">
@@ -1103,7 +1103,7 @@ SELECT word FROM words ORDER BY word &lt;-&gt; 'caterpiler' LIMIT 10;
 
 </sect1>
 
-<sect1 id="rules-update">
+<sect1 id="rules-update" xreflabel="Rules on INSERT, UPDATE, and DELETE">
 <title>Rules on <command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command></title>
 
 <indexterm zone="rules-update">
@@ -1185,7 +1185,7 @@ SELECT word FROM words ORDER BY word &lt;-&gt; 'caterpiler' LIMIT 10;
  </para>
 </caution>
 
-<sect2 id="rules-update-how">
+<sect2 id="rules-update-how" xreflabel="How Update Rules Work">
 <title>How Update Rules Work</title>
 
 <para>
@@ -1309,7 +1309,7 @@ CREATE [ OR REPLACE ] RULE <replaceable class="parameter">name</replaceable> AS
     there is no need to apply update rules to the output of view rewriting.
 </para>
 
-<sect3 id="rules-update-how-first">
+<sect3 id="rules-update-how-first" xreflabel="A First Rule Step by Step">
 <title>A First Rule Step by Step</title>
 
 <para>
@@ -1556,7 +1556,7 @@ SELECT shoelace_data.sl_name, 0,
 
 </sect2>
 
-<sect2 id="rules-update-views">
+<sect2 id="rules-update-views" xreflabel="Cooperation with Views">
 <title>Cooperation with Views</title>
 
 <indexterm zone="rules-update-views"><primary>view</primary><secondary>updating</secondary></indexterm>
@@ -2012,7 +2012,7 @@ SELECT * FROM shoelace;
 
 </sect1>
 
-<sect1 id="rules-privileges">
+<sect1 id="rules-privileges" xreflabel="Rules and Privileges">
 <title>Rules and Privileges</title>
 
 <indexterm zone="rules-privileges">
@@ -2215,7 +2215,7 @@ CREATE VIEW phone_number WITH (security_barrier) AS
 </para>
 </sect1>
 
-<sect1 id="rules-status">
+<sect1 id="rules-status" xreflabel="Rules and Command Status">
 <title>Rules and Command Status</title>
 
 <para>
@@ -2266,7 +2266,7 @@ CREATE VIEW phone_number WITH (security_barrier) AS
 </para>
 </sect1>
 
-<sect1 id="rules-triggers">
+<sect1 id="rules-triggers" xreflabel="Rules Versus Triggers">
 <title>Rules Versus Triggers</title>
 
 <indexterm zone="rules-triggers">
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index 0c60bafac63..74c1ce88d26 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -20,7 +20,7 @@
   Consult the package-level documentation for details.
  </para>
 
- <sect1 id="postgres-user">
+ <sect1 id="postgres-user" xreflabel="The PostgreSQL User Account">
   <title>The <productname>PostgreSQL</productname> User Account</title>
 
   <indexterm>
@@ -52,7 +52,7 @@
   </para>
  </sect1>
 
- <sect1 id="creating-cluster">
+ <sect1 id="creating-cluster" xreflabel="Creating a Database Cluster">
   <title>Creating a Database Cluster</title>
 
   <indexterm>
@@ -240,7 +240,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
    different operating system, or an operating system upgrade.
   </para>
 
-  <sect2 id="creating-cluster-mount-points">
+  <sect2 id="creating-cluster-mount-points" xreflabel="Use of Secondary File Systems">
    <title>Use of Secondary File Systems</title>
 
    <indexterm zone="creating-cluster-mount-points">
@@ -262,7 +262,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
 
   </sect2>
 
-  <sect2 id="creating-cluster-filesystem">
+  <sect2 id="creating-cluster-filesystem" xreflabel="File Systems">
    <title>File Systems</title>
 
    <para>
@@ -274,7 +274,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
     making minor file system configuration changes.
    </para>
 
-   <sect3 id="creating-cluster-nfs">
+   <sect3 id="creating-cluster-nfs" xreflabel="NFS">
     <title>NFS</title>
 
     <indexterm zone="creating-cluster-nfs">
@@ -335,7 +335,7 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
 
  </sect1>
 
- <sect1 id="server-start">
+ <sect1 id="server-start" xreflabel="Starting the Database Server">
   <title>Starting the Database Server</title>
 
   <para>
@@ -546,7 +546,7 @@ su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -l logfile -D /usr/local/pgs
     shutting down the server.
    </para>
 
-   <sect2 id="server-start-failures">
+   <sect2 id="server-start-failures" xreflabel="Server Start-up Failures">
     <title>Server Start-up Failures</title>
 
     <para>
@@ -618,7 +618,7 @@ DETAIL:  Failed system call was semget(5440126, 17, 03600).
     </para>
    </sect2>
 
-   <sect2 id="client-connection-problems">
+   <sect2 id="client-connection-problems" xreflabel="Client Connection Problems">
     <title>Client Connection Problems</title>
 
     <para>
@@ -673,7 +673,7 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
    </sect2>
   </sect1>
 
- <sect1 id="kernel-resources">
+ <sect1 id="kernel-resources" xreflabel="Managing Kernel Resources">
   <title>Managing Kernel Resources</title>
 
   <para>
@@ -684,7 +684,7 @@ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such
    can take to resolve problems related to kernel resource consumption.
   </para>
 
-  <sect2 id="sysvipc">
+  <sect2 id="sysvipc" xreflabel="Shared Memory and Semaphores">
    <title>Shared Memory and Semaphores</title>
 
    <indexterm zone="sysvipc">
@@ -1127,7 +1127,7 @@ project.max-msg-ids=(priv,4096,deny)
 
   </sect2>
 
-  <sect2 id="systemd-removeipc">
+  <sect2 id="systemd-removeipc" xreflabel="systemd RemoveIPC">
    <title>systemd RemoveIPC</title>
 
    <indexterm>
@@ -1207,7 +1207,7 @@ RemoveIPC=no
    </caution>
   </sect2>
 
-  <sect2 id="kernel-resources-limits">
+  <sect2 id="kernel-resources-limits" xreflabel="Resource Limits">
    <title>Resource Limits</title>
 
    <para>
@@ -1306,7 +1306,7 @@ default:\
    </para>
   </sect2>
 
-  <sect2 id="linux-memory-overcommit">
+  <sect2 id="linux-memory-overcommit" xreflabel="Linux Memory Overcommit">
    <title>Linux Memory Overcommit</title>
 
    <indexterm>
@@ -1419,7 +1419,7 @@ export PG_OOM_ADJUST_VALUE=0
 
   </sect2>
 
-  <sect2 id="linux-huge-pages">
+  <sect2 id="linux-huge-pages" xreflabel="Linux Huge Pages">
    <title>Linux Huge Pages</title>
 
    <para>
@@ -1504,7 +1504,7 @@ $ <userinput>cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages</userinp
  </sect1>
 
 
- <sect1 id="server-shutdown">
+ <sect1 id="server-shutdown" xreflabel="Shutting Down the Server">
   <title>Shutting Down the Server</title>
 
   <indexterm zone="server-shutdown">
@@ -1612,7 +1612,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
   </para>
  </sect1>
 
- <sect1 id="upgrading">
+ <sect1 id="upgrading" xreflabel="Upgrading a PostgreSQL Cluster">
   <title>Upgrading a <productname>PostgreSQL</productname> Cluster</title>
 
   <indexterm zone="upgrading">
@@ -1737,7 +1737,7 @@ $ <userinput>kill -INT `head -1 /usr/local/pgsql/data/postmaster.pid`</userinput
 
   </variablelist>
 
-  <sect2 id="upgrading-via-pgdumpall">
+  <sect2 id="upgrading-via-pgdumpall" xreflabel="Upgrading Data via pg_dumpall">
    <title>Upgrading Data via <application>pg_dumpall</application></title>
 
    <para>
@@ -1900,7 +1900,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
 
   </sect2>
 
-  <sect2 id="upgrading-via-pg-upgrade">
+  <sect2 id="upgrading-via-pg-upgrade" xreflabel="Upgrading Data via pg_upgrade">
    <title>Upgrading Data via <application>pg_upgrade</application></title>
 
    <para>
@@ -1915,7 +1915,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
 
   </sect2>
 
-  <sect2 id="upgrading-via-replication">
+  <sect2 id="upgrading-via-replication" xreflabel="Upgrading Data via Replication">
    <title>Upgrading Data via Replication</title>
 
    <para>
@@ -1941,7 +1941,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
   </sect2>
  </sect1>
 
- <sect1 id="preventing-server-spoofing">
+ <sect1 id="preventing-server-spoofing" xreflabel="Preventing Server Spoofing">
   <title>Preventing Server Spoofing</title>
 
   <indexterm zone="preventing-server-spoofing">
@@ -2023,7 +2023,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
   </para>
  </sect1>
 
- <sect1 id="encryption-options">
+ <sect1 id="encryption-options" xreflabel="Encryption Options">
   <title>Encryption Options</title>
 
   <indexterm zone="encryption-options">
@@ -2186,7 +2186,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
 
  </sect1>
 
- <sect1 id="ssl-tcp">
+ <sect1 id="ssl-tcp" xreflabel="Secure TCP/IP Connections with SSL">
   <title>Secure TCP/IP Connections with SSL</title>
 
   <indexterm zone="ssl-tcp">
@@ -2214,7 +2214,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
    in <productname>PostgreSQL</productname>.
 
   </para>
-  <sect2 id="ssl-setup">
+  <sect2 id="ssl-setup" xreflabel="Basic Setup">
    <title>Basic Setup</title>
 
   <para>
@@ -2290,7 +2290,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
   </para>
   </sect2>
 
-  <sect2 id="ssl-openssl-config">
+  <sect2 id="ssl-openssl-config" xreflabel="OpenSSL Configuration">
    <title>OpenSSL Configuration</title>
 
   <para>
@@ -2323,7 +2323,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
   </note>
   </sect2>
 
-  <sect2 id="ssl-client-certificates">
+  <sect2 id="ssl-client-certificates" xreflabel="Using Client Certificates">
    <title>Using Client Certificates</title>
 
   <para>
@@ -2397,7 +2397,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
   </para>
   </sect2>
 
-  <sect2 id="ssl-server-files">
+  <sect2 id="ssl-server-files" xreflabel="SSL Server File Usage">
    <title>SSL Server File Usage</title>
 
    <para>
@@ -2467,7 +2467,7 @@ pg_dumpall -p 5432 | psql -d postgres -p 5433
    </para>
   </sect2>
 
-  <sect2 id="ssl-certificate-creation">
+  <sect2 id="ssl-certificate-creation" xreflabel="Creating Certificates">
    <title>Creating Certificates</title>
 
    <para>
@@ -2574,7 +2574,7 @@ openssl x509 -req -in server.csr -text -days 365 \
 
  </sect1>
 
- <sect1 id="gssapi-enc">
+ <sect1 id="gssapi-enc" xreflabel="Secure TCP/IP Connections with GSSAPI Encryption">
   <title>Secure TCP/IP Connections with GSSAPI Encryption</title>
 
   <indexterm zone="gssapi-enc">
@@ -2590,7 +2590,7 @@ openssl x509 -req -in server.csr -text -days 365 \
    enabled at build time (see <xref linkend="installation"/>).
   </para>
 
-  <sect2 id="gssapi-setup">
+  <sect2 id="gssapi-setup" xreflabel="Basic Setup">
    <title>Basic Setup</title>
 
    <para>
@@ -2623,7 +2623,7 @@ openssl x509 -req -in server.csr -text -days 365 \
   </sect2>
  </sect1>
 
- <sect1 id="ssh-tunnels">
+ <sect1 id="ssh-tunnels" xreflabel="Secure TCP/IP Connections with SSH Tunnels">
   <title>Secure TCP/IP Connections with <application>SSH</application> Tunnels</title>
 
   <indexterm zone="ssh-tunnels">
@@ -2720,7 +2720,7 @@ ssh -L 63333:db.foo.com:5432 joe@shell.foo.com
 
  </sect1>
 
- <sect1 id="event-log-registration">
+ <sect1 id="event-log-registration" xreflabel="Registering Event Log on Windows">
   <title>Registering <application>Event Log</application> on <systemitem
   class="osname">Windows</systemitem></title>
 
diff --git a/doc/src/sgml/seg.sgml b/doc/src/sgml/seg.sgml
index 2e879c3e452..0eb6880e734 100644
--- a/doc/src/sgml/seg.sgml
+++ b/doc/src/sgml/seg.sgml
@@ -20,7 +20,7 @@
   on the current database.
  </para>
 
- <sect2 id="seg-rationale">
+ <sect2 id="seg-rationale" xreflabel="Rationale">
   <title>Rationale</title>
 
   <para>
@@ -81,7 +81,7 @@ test=&gt; SELECT '6.25 .. 6.50'::seg AS "pH";
   </para>
  </sect2>
 
- <sect2 id="seg-syntax">
+ <sect2 id="seg-syntax" xreflabel="Syntax">
   <title>Syntax</title>
 
   <para>
@@ -220,7 +220,7 @@ test=&gt; SELECT '6.25 .. 6.50'::seg AS "pH";
 
  </sect2>
 
- <sect2 id="seg-precision">
+ <sect2 id="seg-precision" xreflabel="Precision">
   <title>Precision</title>
 
   <para>
@@ -239,7 +239,7 @@ test=&gt; SELECT '6.25 .. 6.50'::seg AS "pH";
   </para>
  </sect2>
 
- <sect2 id="seg-usage">
+ <sect2 id="seg-usage" xreflabel="Usage">
   <title>Usage</title>
 
   <para>
@@ -363,7 +363,7 @@ test=&gt; SELECT '6.25 .. 6.50'::seg AS "pH";
   </para>
  </sect2>
 
- <sect2 id="seg-notes">
+ <sect2 id="seg-notes" xreflabel="Notes">
   <title>Notes</title>
 
   <para>
@@ -392,7 +392,7 @@ postgres=&gt; SELECT '10(+-)1'::seg AS seg;
   </para>
  </sect2>
 
- <sect2 id="seg-credits">
+ <sect2 id="seg-credits" xreflabel="Credits">
   <title>Credits</title>
 
   <para>
diff --git a/doc/src/sgml/sepgsql.sgml b/doc/src/sgml/sepgsql.sgml
index ddac6253557..02439b52870 100644
--- a/doc/src/sgml/sepgsql.sgml
+++ b/doc/src/sgml/sepgsql.sgml
@@ -22,7 +22,7 @@
    </para>
  </warning>
 
- <sect2 id="sepgsql-overview">
+ <sect2 id="sepgsql-overview" xreflabel="Overview">
   <title>Overview</title>
 
   <para>
@@ -57,7 +57,7 @@
   </para>
 
  </sect2>
- <sect2 id="sepgsql-installation">
+ <sect2 id="sepgsql-installation" xreflabel="Installation">
   <title>Installation</title>
 
   <para>
@@ -148,7 +148,7 @@ $ for DBNAME in template0 template1 postgres; do
   </para>
  </sect2>
 
- <sect2 id="sepgsql-regression">
+ <sect2 id="sepgsql-regression" xreflabel="Regression Tests">
   <title>Regression Tests</title>
 
   <para>
@@ -269,7 +269,7 @@ $ sudo semodule -r sepgsql-regtest
 </screen>
  </sect2>
 
- <sect2 id="sepgsql-parameters">
+ <sect2 id="sepgsql-parameters" xreflabel="GUC Parameters">
   <title>GUC Parameters</title>
 
   <variablelist>
@@ -328,9 +328,9 @@ $ sudo semodule -r sepgsql-regtest
   </variablelist>
  </sect2>
 
- <sect2 id="sepgsql-features">
+ <sect2 id="sepgsql-features" xreflabel="Features">
   <title>Features</title>
-  <sect3 id="sepgsql-features-controlled-obj-classes">
+  <sect3 id="sepgsql-features-controlled-obj-classes" xreflabel="Controlled Object Classes">
    <title>Controlled Object Classes</title>
    <para>
     The security model of <productname>SELinux</productname> describes all the access
@@ -363,7 +363,7 @@ $ sudo semodule -r sepgsql-regtest
    </para>
   </sect3>
 
-  <sect3 id="sepgsql-features-dml-permissions">
+  <sect3 id="sepgsql-features-dml-permissions" xreflabel="DML Permissions">
    <title>DML Permissions</title>
 
    <para>
@@ -447,7 +447,7 @@ UPDATE t1 SET x = 2, y = func1(y) WHERE z = 100;
    </para>
   </sect3>
 
-  <sect3 id="sepgsql-features-ddl-permissions">
+  <sect3 id="sepgsql-features-ddl-permissions" xreflabel="DDL Permissions">
    <title>DDL Permissions</title>
    <para>
     <productname>SELinux</productname> defines several permissions to control common
@@ -538,7 +538,7 @@ UPDATE t1 SET x = 2, y = func1(y) WHERE z = 100;
 
   </sect3>
 
-  <sect3 id="sepgsql-features-trusted-procedures">
+  <sect3 id="sepgsql-features-trusted-procedures" xreflabel="Trusted Procedures">
    <title>Trusted Procedures</title>
    <para>
     Trusted procedures are similar to security definer functions or setuid
@@ -594,7 +594,7 @@ postgres=# SELECT cid, cname, show_credit(cid) FROM customer;
    </para>
   </sect3>
 
-  <sect3 id="sepgsql-features-dynamic-domain-transitions">
+  <sect3 id="sepgsql-features-dynamic-domain-transitions" xreflabel="Dynamic Domain Transitions">
    <title>Dynamic Domain Transitions</title>
    <para>
     It is possible to use SELinux's dynamic domain transition feature
@@ -656,7 +656,7 @@ ERROR:  SELinux: security policy violation
    </para>
   </sect3>
 
-  <sect3 id="sepgsql-features-misc">
+  <sect3 id="sepgsql-features-misc" xreflabel="Miscellaneous">
    <title>Miscellaneous</title>
    <para>
     We reject the <link linkend="sql-load"><command>LOAD</command></link> command across the board, because
@@ -666,7 +666,7 @@ ERROR:  SELinux: security policy violation
   </sect3>
 </sect2>
 
- <sect2 id="sepgsql-functions">
+ <sect2 id="sepgsql-functions" xreflabel="Sepgsql Functions">
   <title>Sepgsql Functions</title>
   <para>
    <xref linkend="sepgsql-functions-table"/> shows the available functions.
@@ -748,7 +748,7 @@ ERROR:  SELinux: security policy violation
   </table>
  </sect2>
 
- <sect2 id="sepgsql-limitations">
+ <sect2 id="sepgsql-limitations" xreflabel="Limitations">
   <title>Limitations</title>
 
   <variablelist>
@@ -799,7 +799,7 @@ ERROR:  SELinux: security policy violation
   </variablelist>
  </sect2>
 
- <sect2 id="sepgsql-resources">
+ <sect2 id="sepgsql-resources" xreflabel="External Resources">
   <title>External Resources</title>
   <variablelist>
    <varlistentry>
@@ -834,7 +834,7 @@ ERROR:  SELinux: security policy violation
   </variablelist>
  </sect2>
 
- <sect2 id="sepgsql-author">
+ <sect2 id="sepgsql-author" xreflabel="Author">
   <title>Author</title>
   <para>
    KaiGai Kohei <email>kaigai@ak.jp.nec.com</email>
diff --git a/doc/src/sgml/sourcerepo.sgml b/doc/src/sgml/sourcerepo.sgml
index f4368e83ab3..413b2c08034 100644
--- a/doc/src/sgml/sourcerepo.sgml
+++ b/doc/src/sgml/sourcerepo.sgml
@@ -16,7 +16,7 @@
   has some discussion on working with Git.
  </para>
 
- <sect1 id="git">
+ <sect1 id="git" xreflabel="Getting the Source via Git">
   <title>Getting the Source via <productname>Git</productname></title>
 
   <para>
diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml
index 760f9b69d47..59f9783a14a 100644
--- a/doc/src/sgml/sources.sgml
+++ b/doc/src/sgml/sources.sgml
@@ -3,7 +3,7 @@
  <chapter id="source">
   <title>PostgreSQL Coding Conventions</title>
 
-  <sect1 id="source-format">
+  <sect1 id="source-format" xreflabel="Formatting">
    <title>Formatting</title>
 
    <para>
@@ -86,7 +86,7 @@ less -x4
    </para>
   </sect1>
 
-  <sect1 id="error-message-reporting">
+  <sect1 id="error-message-reporting" xreflabel="Reporting Errors Within the Server">
    <title>Reporting Errors Within the Server</title>
 
    <indexterm>
@@ -438,7 +438,7 @@ ereport(level, errmsg_internal("format string", ...));
    </para>
   </sect1>
 
-  <sect1 id="error-style-guide">
+  <sect1 id="error-style-guide" xreflabel="Error Message Style Guide">
    <title>Error Message Style Guide</title>
 
    <para>
@@ -901,7 +901,7 @@ BETTER: unrecognized node type: 42
 
   </sect1>
 
-  <sect1 id="source-conventions">
+  <sect1 id="source-conventions" xreflabel="Miscellaneous Coding Conventions">
    <title>Miscellaneous Coding Conventions</title>
 
    <simplesect id="source-conventions-c-standard">
diff --git a/doc/src/sgml/spgist.sgml b/doc/src/sgml/spgist.sgml
index 6af93719b84..a070b640417 100644
--- a/doc/src/sgml/spgist.sgml
+++ b/doc/src/sgml/spgist.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/spgist.sgml -->
 
-<sect1 id="spgist">
+<sect1 id="spgist" xreflabel="SP-GiST Indexes">
 <title>SP-GiST Indexes</title>
 
    <indexterm>
@@ -8,7 +8,7 @@
     <secondary>SP-GiST</secondary>
    </indexterm>
 
-<sect2 id="spgist-intro">
+<sect2 id="spgist-intro" xreflabel="Introduction">
  <title>Introduction</title>
 
  <para>
@@ -53,7 +53,7 @@
 
 </sect2>
 
-<sect2 id="spgist-builtin-opclasses">
+<sect2 id="spgist-builtin-opclasses" xreflabel="Built-in Operator Classes">
  <title>Built-in Operator Classes</title>
 
  <para>
@@ -193,7 +193,7 @@
 
 </sect2>
 
-<sect2 id="spgist-extensibility">
+<sect2 id="spgist-extensibility" xreflabel="Extensibility">
  <title>Extensibility</title>
 
  <para>
@@ -935,7 +935,7 @@ LANGUAGE C STRICT;
 
 </sect2>
 
-<sect2 id="spgist-implementation">
+<sect2 id="spgist-implementation" xreflabel="Implementation">
  <title>Implementation</title>
 
   <para>
@@ -944,7 +944,7 @@ LANGUAGE C STRICT;
    know.
   </para>
 
- <sect3 id="spgist-limits">
+ <sect3 id="spgist-limits" xreflabel="SP-GiST Limits">
   <title>SP-GiST Limits</title>
 
   <para>
@@ -993,7 +993,7 @@ LANGUAGE C STRICT;
   </para>
  </sect3>
 
- <sect3 id="spgist-null-labels">
+ <sect3 id="spgist-null-labels" xreflabel="SP-GiST Without Node Labels">
   <title>SP-GiST Without Node Labels</title>
 
   <para>
@@ -1020,7 +1020,7 @@ LANGUAGE C STRICT;
   </para>
  </sect3>
 
- <sect3 id="spgist-all-the-same">
+ <sect3 id="spgist-all-the-same" xreflabel="All-the-Same Inner Tuples">
   <title><quote>All-the-Same</quote> Inner Tuples</title>
 
   <para>
@@ -1060,7 +1060,7 @@ LANGUAGE C STRICT;
 
 </sect2>
 
-<sect2 id="spgist-examples">
+<sect2 id="spgist-examples" xreflabel="Examples">
  <title>Examples</title>
 
  <para>
diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml
index e30d0962ae7..0bdb7f42500 100644
--- a/doc/src/sgml/spi.sgml
+++ b/doc/src/sgml/spi.sgml
@@ -51,7 +51,7 @@
  </para>
 
 
-<sect1 id="spi-interface">
+<sect1 id="spi-interface" xreflabel="Interface Functions">
  <title>Interface Functions</title>
 
  <refentry id="spi-spi-connect">
@@ -3663,7 +3663,7 @@ int SPI_register_trigger_data(TriggerData *<parameter>tdata</parameter>)
 
 </sect1>
 
-<sect1 id="spi-interface-support">
+<sect1 id="spi-interface-support" xreflabel="Interface Support Functions">
  <title>Interface Support Functions</title>
 
  <para>
@@ -4294,7 +4294,7 @@ const char * SPI_result_code_string(int <parameter>code</parameter>);
 
  </sect1>
 
- <sect1 id="spi-memory">
+ <sect1 id="spi-memory" xreflabel="Memory Management">
   <title>Memory Management</title>
 
   <para>
@@ -5018,7 +5018,7 @@ int SPI_freeplan(SPIPlanPtr <parameter>plan</parameter>)
 
  </sect1>
 
- <sect1 id="spi-transaction">
+ <sect1 id="spi-transaction" xreflabel="Transaction Management">
   <title>Transaction Management</title>
 
   <para>
@@ -5185,7 +5185,7 @@ void SPI_start_transaction(void)
 
  </sect1>
 
- <sect1 id="spi-visibility">
+ <sect1 id="spi-visibility" xreflabel="Visibility of Data Changes">
   <title>Visibility of Data Changes</title>
 
   <para>
@@ -5245,7 +5245,7 @@ INSERT INTO a SELECT * FROM a;
   </para>
  </sect1>
 
- <sect1 id="spi-examples">
+ <sect1 id="spi-examples" xreflabel="Examples">
   <title>Examples</title>
 
   <para>
diff --git a/doc/src/sgml/sslinfo.sgml b/doc/src/sgml/sslinfo.sgml
index 85d49f66537..55a62063536 100644
--- a/doc/src/sgml/sslinfo.sgml
+++ b/doc/src/sgml/sslinfo.sgml
@@ -25,7 +25,7 @@
   configured with <literal>--with-ssl=openssl</literal>.
  </para>
 
- <sect2 id="sslinfo-functions">
+ <sect2 id="sslinfo-functions" xreflabel="Functions Provided">
   <title>Functions Provided</title>
 
   <variablelist>
@@ -243,7 +243,7 @@ emailAddress
   </variablelist>
  </sect2>
 
- <sect2 id="sslinfo-author">
+ <sect2 id="sslinfo-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/start.sgml b/doc/src/sgml/start.sgml
index 0263a700591..c1acf79fdd4 100644
--- a/doc/src/sgml/start.sgml
+++ b/doc/src/sgml/start.sgml
@@ -3,7 +3,7 @@
  <chapter id="tutorial-start">
   <title>Getting Started</title>
 
-  <sect1 id="tutorial-install">
+  <sect1 id="tutorial-install" xreflabel="Installation">
    <title>Installation</title>
 
    <para>
@@ -52,7 +52,7 @@
   </sect1>
 
 
-  <sect1 id="tutorial-arch">
+  <sect1 id="tutorial-arch" xreflabel="Architectural Fundamentals">
    <title>Architectural Fundamentals</title>
 
    <para>
@@ -121,7 +121,7 @@
   </sect1>
 
 
-  <sect1 id="tutorial-createdb">
+  <sect1 id="tutorial-createdb" xreflabel="Creating a Database">
    <title>Creating a Database</title>
 
    <indexterm zone="tutorial-createdb">
@@ -273,7 +273,7 @@ createdb: error: database creation failed: ERROR:  permission denied to create d
   </sect1>
 
 
-  <sect1 id="tutorial-accessdb">
+  <sect1 id="tutorial-accessdb" xreflabel="Accessing a Database">
    <title>Accessing a Database</title>
 
    <indexterm zone="tutorial-accessdb">
diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml
index 02ddfda834a..2e91f070cbf 100644
--- a/doc/src/sgml/storage.sgml
+++ b/doc/src/sgml/storage.sgml
@@ -9,7 +9,7 @@ This chapter provides an overview of the physical storage format used by
 <productname>PostgreSQL</productname> databases.
 </para>
 
-<sect1 id="storage-file-layout">
+<sect1 id="storage-file-layout" xreflabel="Database File Layout">
 
 <title>Database File Layout</title>
 
@@ -303,7 +303,7 @@ where <replaceable>PPP</replaceable> is the PID of the owning backend and
 
 </sect1>
 
-<sect1 id="storage-toast">
+<sect1 id="storage-toast" xreflabel="TOAST">
 
 <title>TOAST</title>
 
@@ -404,7 +404,7 @@ useful for avoiding copying and redundant processing of large data values.
 Further details appear in <xref linkend="storage-toast-inmemory"/>.
 </para>
 
-<sect2 id="storage-toast-ondisk">
+<sect2 id="storage-toast-ondisk" xreflabel="Out-of-Line, On-Disk TOAST Storage">
  <title>Out-of-Line, On-Disk TOAST Storage</title>
 
 <para>
@@ -519,7 +519,7 @@ comparison table, in which all the HTML pages were cut down to 7 kB to fit.
 
 </sect2>
 
-<sect2 id="storage-toast-inmemory">
+<sect2 id="storage-toast-inmemory" xreflabel="Out-of-Line, In-Memory TOAST Storage">
  <title>Out-of-Line, In-Memory TOAST Storage</title>
 
 <para>
@@ -592,7 +592,7 @@ tuple would otherwise be too big.
 
 </sect1>
 
-<sect1 id="storage-fsm">
+<sect1 id="storage-fsm" xreflabel="Free Space Map">
 
 <title>Free Space Map</title>
 
@@ -635,7 +635,7 @@ can be used to examine the information stored in free space maps.
 
 </sect1>
 
-<sect1 id="storage-vm">
+<sect1 id="storage-vm" xreflabel="Visibility Map">
 
 <title>Visibility Map</title>
 
@@ -681,7 +681,7 @@ information stored in the visibility map.
 
 </sect1>
 
-<sect1 id="storage-init">
+<sect1 id="storage-init" xreflabel="The Initialization Fork">
 
 <title>The Initialization Fork</title>
 
@@ -699,7 +699,7 @@ erased (they will be recreated automatically as needed).
 
 </sect1>
 
-<sect1 id="storage-page-layout">
+<sect1 id="storage-page-layout" xreflabel="Database Page Layout">
 
 <title>Database Page Layout</title>
 
@@ -946,7 +946,7 @@ data. Empty in ordinary tables.</entry>
   </mediaobject>
  </figure>
 
- <sect2 id="storage-tuple-layout">
+ <sect2 id="storage-tuple-layout" xreflabel="Table Row Layout">
 
  <title>Table Row Layout</title>
 
@@ -1077,7 +1077,7 @@ data. Empty in ordinary tables.</entry>
  </sect2>
 </sect1>
 
-<sect1 id="storage-hot">
+<sect1 id="storage-hot" xreflabel="Heap-Only Tuples (HOT)">
 
  <title>Heap-Only Tuples (<acronym>HOT</acronym>)</title>
 
diff --git a/doc/src/sgml/syntax.sgml b/doc/src/sgml/syntax.sgml
index 34c83880a66..9b81ac38bb8 100644
--- a/doc/src/sgml/syntax.sgml
+++ b/doc/src/sgml/syntax.sgml
@@ -21,7 +21,7 @@
   specific to <productname>PostgreSQL</productname>.
  </para>
 
- <sect1 id="sql-syntax-lexical">
+ <sect1 id="sql-syntax-lexical" xreflabel="Lexical Structure">
   <title>Lexical Structure</title>
 
   <indexterm>
@@ -78,7 +78,7 @@ INSERT INTO MY_TABLE VALUES (3, 'hi there');
    precise syntax rules for each command are described in <xref linkend="reference"/>.
   </para>
 
-  <sect2 id="sql-syntax-identifiers">
+  <sect2 id="sql-syntax-identifiers" xreflabel="Identifiers and Key Words">
    <title>Identifiers and Key Words</title>
 
    <indexterm zone="sql-syntax-identifiers">
@@ -273,7 +273,7 @@ U&amp;"d!0061t!+000061" UESCAPE '!'
   </sect2>
 
 
-  <sect2 id="sql-syntax-constants">
+  <sect2 id="sql-syntax-constants" xreflabel="Constants">
    <title>Constants</title>
 
    <indexterm zone="sql-syntax-constants">
@@ -290,7 +290,7 @@ U&amp;"d!0061t!+000061" UESCAPE '!'
     subsections.
    </para>
 
-   <sect3 id="sql-syntax-strings">
+   <sect3 id="sql-syntax-strings" xreflabel="String Constants">
     <title>String Constants</title>
 
     <indexterm zone="sql-syntax-strings">
@@ -336,7 +336,7 @@ SELECT 'foo'      'bar';
     </para>
    </sect3>
 
-   <sect3 id="sql-syntax-strings-escape">
+   <sect3 id="sql-syntax-strings-escape" xreflabel="String Constants with C-Style Escapes">
     <title>String Constants with C-Style Escapes</title>
 
      <indexterm zone="sql-syntax-strings-escape">
@@ -467,7 +467,7 @@ SELECT 'foo'      'bar';
     </para>
    </sect3>
 
-   <sect3 id="sql-syntax-strings-uescape">
+   <sect3 id="sql-syntax-strings-uescape" xreflabel="String Constants with Unicode Escapes">
     <title>String Constants with Unicode Escapes</title>
 
     <indexterm  zone="sql-syntax-strings-uescape">
@@ -545,7 +545,7 @@ U&amp;'d!0061t!+000061' UESCAPE '!'
     </para>
    </sect3>
 
-   <sect3 id="sql-syntax-dollar-quoting">
+   <sect3 id="sql-syntax-dollar-quoting" xreflabel="Dollar-Quoted String Constants">
     <title>Dollar-Quoted String Constants</title>
 
      <indexterm>
@@ -625,7 +625,7 @@ $function$
     </para>
    </sect3>
 
-   <sect3 id="sql-syntax-bit-strings">
+   <sect3 id="sql-syntax-bit-strings" xreflabel="Bit-String Constants">
     <title>Bit-String Constants</title>
 
     <indexterm zone="sql-syntax-bit-strings">
@@ -656,7 +656,7 @@ $function$
     </para>
    </sect3>
 
-   <sect3 id="sql-syntax-constants-numeric">
+   <sect3 id="sql-syntax-constants-numeric" xreflabel="Numeric Constants">
     <title>Numeric Constants</title>
 
     <indexterm>
@@ -772,7 +772,7 @@ REAL '1.23'  -- string style
     </para>
    </sect3>
 
-   <sect3 id="sql-syntax-constants-generic">
+   <sect3 id="sql-syntax-constants-generic" xreflabel="Constants of Other Types">
     <title>Constants of Other Types</title>
 
     <indexterm>
@@ -836,7 +836,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
    </sect3>
   </sect2>
 
-  <sect2 id="sql-syntax-operators">
+  <sect2 id="sql-syntax-operators" xreflabel="Operators">
    <title>Operators</title>
 
    <indexterm zone="sql-syntax-operators">
@@ -888,7 +888,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
    </para>
   </sect2>
 
-  <sect2 id="sql-syntax-special-chars">
+  <sect2 id="sql-syntax-special-chars" xreflabel="Special Characters">
    <title>Special Characters</title>
 
   <para>
@@ -971,7 +971,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
    </para>
   </sect2>
 
-  <sect2 id="sql-syntax-comments">
+  <sect2 id="sql-syntax-comments" xreflabel="Comments">
    <title>Comments</title>
 
    <indexterm zone="sql-syntax-comments">
@@ -1007,7 +1007,7 @@ CAST ( '<replaceable>string</replaceable>' AS <replaceable>type</replaceable> )
    </para>
   </sect2>
 
-  <sect2 id="sql-precedence">
+  <sect2 id="sql-precedence" xreflabel="Operator Precedence">
    <title>Operator Precedence</title>
 
    <indexterm zone="sql-precedence">
@@ -1183,7 +1183,7 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
   </sect2>
  </sect1>
 
- <sect1 id="sql-expressions">
+ <sect1 id="sql-expressions" xreflabel="Value Expressions">
   <title>Value Expressions</title>
 
   <indexterm zone="sql-expressions">
@@ -1328,7 +1328,7 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
    the remaining options.
   </para>
 
-  <sect2 id="sql-expressions-column-refs">
+  <sect2 id="sql-expressions-column-refs" xreflabel="Column References">
    <title>Column References</title>
 
    <indexterm>
@@ -1351,7 +1351,7 @@ SELECT 3 OPERATOR(pg_catalog.+) 4;
    </para>
   </sect2>
 
-  <sect2 id="sql-expressions-parameters-positional">
+  <sect2 id="sql-expressions-parameters-positional" xreflabel="Positional Parameters">
    <title>Positional Parameters</title>
 
    <indexterm>
@@ -1391,7 +1391,7 @@ CREATE FUNCTION dept(text) RETURNS dept
    </para>
   </sect2>
 
-  <sect2 id="sql-expressions-subscripts">
+  <sect2 id="sql-expressions-subscripts" xreflabel="Subscripts">
    <title>Subscripts</title>
 
    <indexterm>
@@ -1434,7 +1434,7 @@ $1[10:42]
    </para>
   </sect2>
 
-  <sect2 id="field-selection">
+  <sect2 id="field-selection" xreflabel="Field Selection">
    <title>Field Selection</title>
 
    <indexterm>
@@ -1487,7 +1487,7 @@ $1.somecolumn
    </para>
   </sect2>
 
-  <sect2 id="sql-expressions-operator-calls">
+  <sect2 id="sql-expressions-operator-calls" xreflabel="Operator Invocations">
    <title>Operator Invocations</title>
 
    <indexterm>
@@ -1515,7 +1515,7 @@ $1.somecolumn
    </para>
   </sect2>
 
-  <sect2 id="sql-expressions-function-calls">
+  <sect2 id="sql-expressions-function-calls" xreflabel="Function Calls">
    <title>Function Calls</title>
 
    <indexterm>
@@ -1570,7 +1570,7 @@ sqrt(2)
    </note>
   </sect2>
 
-  <sect2 id="syntax-aggregates">
+  <sect2 id="syntax-aggregates" xreflabel="Aggregate Expressions">
    <title>Aggregate Expressions</title>
 
    <indexterm zone="syntax-aggregates">
@@ -1810,7 +1810,7 @@ FROM generate_series(1,10) AS s(i);
    </para>
   </sect2>
 
-  <sect2 id="syntax-window-functions">
+  <sect2 id="syntax-window-functions" xreflabel="Window Function Calls">
    <title>Window Function Calls</title>
 
    <indexterm zone="syntax-window-functions">
@@ -2079,7 +2079,7 @@ EXCLUDE NO OTHERS
    </para>
   </sect2>
 
-  <sect2 id="sql-syntax-type-casts">
+  <sect2 id="sql-syntax-type-casts" xreflabel="Type Casts">
    <title>Type Casts</title>
 
    <indexterm>
@@ -2162,7 +2162,7 @@ CAST ( <replaceable>expression</replaceable> AS <replaceable>type</replaceable>
    </note>
   </sect2>
 
-  <sect2 id="sql-syntax-collate-exprs">
+  <sect2 id="sql-syntax-collate-exprs" xreflabel="Collation Expressions">
    <title>Collation Expressions</title>
 
    <indexterm>
@@ -2223,7 +2223,7 @@ SELECT * FROM tbl WHERE (a &gt; 'foo') COLLATE "C";
    </para>
   </sect2>
 
-  <sect2 id="sql-syntax-scalar-subqueries">
+  <sect2 id="sql-syntax-scalar-subqueries" xreflabel="Scalar Subqueries">
    <title>Scalar Subqueries</title>
 
    <indexterm>
@@ -2255,7 +2255,7 @@ SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name)
    </para>
   </sect2>
 
-  <sect2 id="sql-syntax-array-constructors">
+  <sect2 id="sql-syntax-array-constructors" xreflabel="Array Constructors">
    <title>Array Constructors</title>
 
    <indexterm>
@@ -2393,7 +2393,7 @@ SELECT ARRAY(SELECT ARRAY[i, i*2] FROM generate_series(1,5) AS a(i));
 
   </sect2>
 
-  <sect2 id="sql-syntax-row-constructors">
+  <sect2 id="sql-syntax-row-constructors" xreflabel="Row Constructors">
    <title>Row Constructors</title>
 
    <indexterm>
@@ -2503,7 +2503,7 @@ SELECT getf1(CAST(ROW(11,'this is a test',2.5) AS myrowtype));
 
   </sect2>
 
-  <sect2 id="syntax-express-eval">
+  <sect2 id="syntax-express-eval" xreflabel="Expression Evaluation Rules">
    <title>Expression Evaluation Rules</title>
 
    <indexterm>
@@ -2613,7 +2613,7 @@ SELECT CASE WHEN min(employees) > 0
   </sect2>
  </sect1>
 
- <sect1 id="sql-syntax-calling-funcs">
+ <sect1 id="sql-syntax-calling-funcs" xreflabel="Calling Functions">
   <title>Calling Functions</title>
 
    <indexterm zone="sql-syntax-calling-funcs">
@@ -2677,7 +2677,7 @@ LANGUAGE SQL IMMUTABLE STRICT;
     more information).
    </para>
 
-   <sect2 id="sql-syntax-calling-funcs-positional">
+   <sect2 id="sql-syntax-calling-funcs-positional" xreflabel="Using Positional Notation">
     <title>Using Positional Notation</title>
 
     <indexterm>
@@ -2712,7 +2712,7 @@ SELECT concat_lower_or_upper('Hello', 'World');
     </para>
    </sect2>
 
-   <sect2 id="sql-syntax-calling-funcs-named">
+   <sect2 id="sql-syntax-calling-funcs-named" xreflabel="Using Named Notation">
     <title>Using Named Notation</title>
 
     <indexterm>
@@ -2762,7 +2762,7 @@ SELECT concat_lower_or_upper(a := 'Hello', uppercase := true, b := 'World');
     </para>
    </sect2>
 
-  <sect2 id="sql-syntax-calling-funcs-mixed">
+  <sect2 id="sql-syntax-calling-funcs-mixed" xreflabel="Using Mixed Notation">
    <title>Using Mixed Notation</title>
 
    <indexterm>
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index 162c76b729a..080a04b753c 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -30,7 +30,7 @@
    <xref linkend="monitoring-stats-views-table"/>.
   </para>
 
- <sect1 id="views-overview">
+ <sect1 id="views-overview" xreflabel="Overview">
   <title>Overview</title>
 
   <para>
@@ -251,7 +251,7 @@
   </table>
  </sect1>
 
- <sect1 id="view-pg-aios">
+ <sect1 id="view-pg-aios" xreflabel="pg_aios">
   <title><structname>pg_aios</structname></title>
 
   <indexterm zone="view-pg-aios">
@@ -540,7 +540,7 @@
   </para>
  </sect1>
 
- <sect1 id="view-pg-available-extensions">
+ <sect1 id="view-pg-available-extensions" xreflabel="pg_available_extensions">
   <title><structname>pg_available_extensions</structname></title>
 
   <indexterm zone="view-pg-available-extensions">
@@ -616,7 +616,7 @@
   </para>
  </sect1>
 
- <sect1 id="view-pg-available-extension-versions">
+ <sect1 id="view-pg-available-extension-versions" xreflabel="pg_available_extension_versions">
   <title><structname>pg_available_extension_versions</structname></title>
 
   <indexterm zone="view-pg-available-extension-versions">
@@ -741,7 +741,7 @@
   </para>
  </sect1>
 
- <sect1 id="view-pg-backend-memory-contexts">
+ <sect1 id="view-pg-backend-memory-contexts" xreflabel="pg_backend_memory_contexts">
   <title><structname>pg_backend_memory_contexts</structname></title>
 
   <indexterm zone="view-pg-backend-memory-contexts">
@@ -901,7 +901,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
   </para>
  </sect1>
 
- <sect1 id="view-pg-config">
+ <sect1 id="view-pg-config" xreflabel="pg_config">
   <title><structname>pg_config</structname></title>
 
   <indexterm zone="view-pg-config">
@@ -962,7 +962,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
 
  </sect1>
 
- <sect1 id="view-pg-cursors">
+ <sect1 id="view-pg-cursors" xreflabel="pg_cursors">
   <title><structname>pg_cursors</structname></title>
 
   <indexterm zone="view-pg-cursors">
@@ -1096,7 +1096,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
 
  </sect1>
 
- <sect1 id="view-pg-dsm-registry-allocations">
+ <sect1 id="view-pg-dsm-registry-allocations" xreflabel="pg_dsm_registry_allocations">
   <title><structname>pg_dsm_registry_allocations</structname></title>
 
   <indexterm zone="view-pg-dsm-registry-allocations">
@@ -1165,7 +1165,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
   </para>
  </sect1>
 
- <sect1 id="view-pg-file-settings">
+ <sect1 id="view-pg-file-settings" xreflabel="pg_file_settings">
   <title><structname>pg_file_settings</structname></title>
 
   <indexterm zone="view-pg-file-settings">
@@ -1300,7 +1300,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
 
 </sect1>
 
- <sect1 id="view-pg-group">
+ <sect1 id="view-pg-group" xreflabel="pg_group">
   <title><structname>pg_group</structname></title>
 
   <indexterm zone="view-pg-group">
@@ -1369,7 +1369,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
 
  </sect1>
 
- <sect1 id="view-pg-hba-file-rules">
+ <sect1 id="view-pg-hba-file-rules" xreflabel="pg_hba_file_rules">
   <title><structname>pg_hba_file_rules</structname></title>
 
   <indexterm zone="view-pg-hba-file-rules">
@@ -1530,7 +1530,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
   </para>
  </sect1>
 
- <sect1 id="view-pg-ident-file-mappings">
+ <sect1 id="view-pg-ident-file-mappings" xreflabel="pg_ident_file_mappings">
   <title><structname>pg_ident_file_mappings</structname></title>
 
   <indexterm zone="view-pg-ident-file-mappings">
@@ -1651,7 +1651,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
   </para>
  </sect1>
 
- <sect1 id="view-pg-indexes">
+ <sect1 id="view-pg-indexes" xreflabel="pg_indexes">
   <title><structname>pg_indexes</structname></title>
 
   <indexterm zone="view-pg-indexes">
@@ -1733,7 +1733,7 @@ AND c1.path[c2.level] = c2.path[c2.level];
 
  </sect1>
 
- <sect1 id="view-pg-locks">
+ <sect1 id="view-pg-locks" xreflabel="pg_locks">
   <title><structname>pg_locks</structname></title>
 
   <indexterm zone="view-pg-locks">
@@ -2114,7 +2114,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-matviews">
+ <sect1 id="view-pg-matviews" xreflabel="pg_matviews">
   <title><structname>pg_matviews</structname></title>
 
   <indexterm zone="view-pg-matviews">
@@ -2217,7 +2217,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-policies">
+ <sect1 id="view-pg-policies" xreflabel="pg_policies">
   <title><structname>pg_policies</structname></title>
 
   <indexterm zone="view-pg-policies">
@@ -2326,7 +2326,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-prepared-statements">
+ <sect1 id="view-pg-prepared-statements" xreflabel="pg_prepared_statements">
   <title><structname>pg_prepared_statements</structname></title>
 
   <indexterm zone="view-pg-prepared-statements">
@@ -2458,7 +2458,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </para>
  </sect1>
 
- <sect1 id="view-pg-prepared-xacts">
+ <sect1 id="view-pg-prepared-xacts" xreflabel="pg_prepared_xacts">
   <title><structname>pg_prepared_xacts</structname></title>
 
   <indexterm zone="view-pg-prepared-xacts">
@@ -2554,7 +2554,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-publication-sequences">
+ <sect1 id="view-pg-publication-sequences" xreflabel="pg_publication_sequences">
   <title><structname>pg_publication_sequences</structname></title>
 
   <indexterm zone="view-pg-publication-sequences">
@@ -2615,7 +2615,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </table>
  </sect1>
 
- <sect1 id="view-pg-publication-tables">
+ <sect1 id="view-pg-publication-tables" xreflabel="pg_publication_tables">
   <title><structname>pg_publication_tables</structname></title>
 
   <indexterm zone="view-pg-publication-tables">
@@ -2703,7 +2703,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </table>
  </sect1>
 
-  <sect1 id="view-pg-replication-origin-status">
+  <sect1 id="view-pg-replication-origin-status" xreflabel="pg_replication_origin_status">
   <title><structname>pg_replication_origin_status</structname></title>
 
   <indexterm zone="view-pg-replication-origin-status">
@@ -2776,7 +2776,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </table>
  </sect1>
 
- <sect1 id="view-pg-replication-slots">
+ <sect1 id="view-pg-replication-slots" xreflabel="pg_replication_slots">
   <title><structname>pg_replication_slots</structname></title>
 
   <indexterm zone="view-pg-replication-slots">
@@ -3150,7 +3150,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </table>
  </sect1>
 
- <sect1 id="view-pg-roles">
+ <sect1 id="view-pg-roles" xreflabel="pg_roles">
   <title><structname>pg_roles</structname></title>
 
   <indexterm zone="view-pg-roles">
@@ -3309,7 +3309,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-rules">
+ <sect1 id="view-pg-rules" xreflabel="pg_rules">
   <title><structname>pg_rules</structname></title>
 
   <indexterm zone="view-pg-rules">
@@ -3386,7 +3386,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-seclabels">
+ <sect1 id="view-pg-seclabels" xreflabel="pg_seclabels">
   <title><structname>pg_seclabels</structname></title>
 
   <indexterm zone="view-pg-seclabels">
@@ -3499,7 +3499,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </table>
  </sect1>
 
- <sect1 id="view-pg-sequences">
+ <sect1 id="view-pg-sequences" xreflabel="pg_sequences">
   <title><structname>pg_sequences</structname></title>
 
   <indexterm zone="view-pg-sequences">
@@ -3659,7 +3659,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-settings">
+ <sect1 id="view-pg-settings" xreflabel="pg_settings">
   <title><structname>pg_settings</structname></title>
 
   <indexterm zone="view-pg-settings">
@@ -4010,7 +4010,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-shadow">
+ <sect1 id="view-pg-shadow" xreflabel="pg_shadow">
   <title><structname>pg_shadow</structname></title>
 
   <indexterm zone="view-pg-shadow">
@@ -4141,7 +4141,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-shmem-allocations">
+ <sect1 id="view-pg-shmem-allocations" xreflabel="pg_shmem_allocations">
   <title><structname>pg_shmem_allocations</structname></title>
 
   <indexterm zone="view-pg-shmem-allocations">
@@ -4236,7 +4236,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </para>
  </sect1>
 
- <sect1 id="view-pg-shmem-allocations-numa">
+ <sect1 id="view-pg-shmem-allocations-numa" xreflabel="pg_shmem_allocations_numa">
   <title><structname>pg_shmem_allocations_numa</structname></title>
 
   <indexterm zone="view-pg-shmem-allocations-numa">
@@ -4326,7 +4326,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
   </para>
  </sect1>
 
- <sect1 id="view-pg-stats">
+ <sect1 id="view-pg-stats" xreflabel="pg_stats">
   <title><structname>pg_stats</structname></title>
 
   <indexterm zone="view-pg-stats">
@@ -4576,7 +4576,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-stats-ext">
+ <sect1 id="view-pg-stats-ext" xreflabel="pg_stats_ext">
   <title><structname>pg_stats_ext</structname></title>
 
   <indexterm zone="view-pg-stats-ext">
@@ -4787,7 +4787,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-stats-ext-exprs">
+ <sect1 id="view-pg-stats-ext-exprs" xreflabel="pg_stats_ext_exprs">
   <title><structname>pg_stats_ext_exprs</structname></title>
 
   <indexterm zone="view-pg-stats-ext-exprs">
@@ -5029,7 +5029,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-tables">
+ <sect1 id="view-pg-tables" xreflabel="pg_tables">
   <title><structname>pg_tables</structname></title>
 
   <indexterm zone="view-pg-tables">
@@ -5141,7 +5141,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-timezone-abbrevs">
+ <sect1 id="view-pg-timezone-abbrevs" xreflabel="pg_timezone_abbrevs">
   <title><structname>pg_timezone_abbrevs</structname></title>
 
   <indexterm zone="view-pg-timezone-abbrevs">
@@ -5211,7 +5211,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-timezone-names">
+ <sect1 id="view-pg-timezone-names" xreflabel="pg_timezone_names">
   <title><structname>pg_timezone_names</structname></title>
 
   <indexterm zone="view-pg-timezone-names">
@@ -5288,7 +5288,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-user">
+ <sect1 id="view-pg-user" xreflabel="pg_user">
   <title><structname>pg_user</structname></title>
 
   <indexterm zone="view-pg-user">
@@ -5406,7 +5406,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
 
  </sect1>
 
- <sect1 id="view-pg-user-mappings">
+ <sect1 id="view-pg-user-mappings" xreflabel="pg_user_mappings">
   <title><structname>pg_user_mappings</structname></title>
 
   <indexterm zone="view-pg-user-mappings">
@@ -5525,7 +5525,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
  </sect1>
 
 
- <sect1 id="view-pg-views">
+ <sect1 id="view-pg-views" xreflabel="pg_views">
   <title><structname>pg_views</structname></title>
 
   <indexterm zone="view-pg-views">
@@ -5596,7 +5596,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
  </sect1>
 
 
- <sect1 id="view-pg-wait-events">
+ <sect1 id="view-pg-wait-events" xreflabel="pg_wait_events">
   <title><structname>pg_wait_events</structname></title>
 
   <indexterm zone="view-pg-wait-events">
diff --git a/doc/src/sgml/tablefunc.sgml b/doc/src/sgml/tablefunc.sgml
index 69cafa00ad6..0131b355ac8 100644
--- a/doc/src/sgml/tablefunc.sgml
+++ b/doc/src/sgml/tablefunc.sgml
@@ -20,7 +20,7 @@
   on the current database.
  </para>
 
- <sect2 id="tablefunc-functions-sect">
+ <sect2 id="tablefunc-functions-sect" xreflabel="Functions Provided">
   <title>Functions Provided</title>
 
   <para>
@@ -119,7 +119,7 @@
     </tgroup>
   </table>
 
-  <sect3 id="tablefunc-functions-normal-rand">
+  <sect3 id="tablefunc-functions-normal-rand" xreflabel="normal_rand">
    <title><function>normal_rand</function></title>
 
    <indexterm>
@@ -166,7 +166,7 @@ test=# SELECT * FROM normal_rand(1000, 5, 3);
 </screen>
   </sect3>
 
-  <sect3 id="tablefunc-functions-crosstab-text">
+  <sect3 id="tablefunc-functions-crosstab-text" xreflabel="crosstab(text)">
    <title><function>crosstab(text)</function></title>
 
    <indexterm>
@@ -325,7 +325,7 @@ AS ct(row_name text, category_1 text, category_2 text, category_3 text);
 
   </sect3>
 
-  <sect3 id="tablefunc-functions-crosstab-n-text">
+  <sect3 id="tablefunc-functions-crosstab-n-text" xreflabel="crosstab N (text)">
    <title><function>crosstab<replaceable>N</replaceable>(text)</function></title>
 
    <indexterm>
@@ -436,7 +436,7 @@ CREATE OR REPLACE FUNCTION crosstab_float8_5_cols(
 
   </sect3>
 
-  <sect3 id="tablefunc-functions-crosstab-text-2">
+  <sect3 id="tablefunc-functions-crosstab-text-2" xreflabel="crosstab(text, text)">
    <title><function>crosstab(text, text)</function></title>
 
    <indexterm>
@@ -646,7 +646,7 @@ AS
 
   </sect3>
 
-  <sect3 id="tablefunc-functions-connectby">
+  <sect3 id="tablefunc-functions-connectby" xreflabel="connectby">
    <title><function>connectby</function></title>
 
    <indexterm>
@@ -853,7 +853,7 @@ SELECT * FROM connectby('connectby_tree', 'keyid', 'parent_keyid', 'pos', 'row2'
 
  </sect2>
 
- <sect2 id="tablefunc-author">
+ <sect2 id="tablefunc-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/tablesample-method.sgml b/doc/src/sgml/tablesample-method.sgml
index c821941b71b..f59d7a21129 100644
--- a/doc/src/sgml/tablesample-method.sgml
+++ b/doc/src/sgml/tablesample-method.sgml
@@ -99,7 +99,7 @@ method_name(internal) RETURNS tsm_handler
   subdirectory for add-on methods.
  </para>
 
- <sect1 id="tablesample-support-functions">
+ <sect1 id="tablesample-support-functions" xreflabel="Sampling Method Support Functions">
   <title>Sampling Method Support Functions</title>
 
   <para>
diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml
index d20484cb232..5674d86e7f2 100644
--- a/doc/src/sgml/textsearch.sgml
+++ b/doc/src/sgml/textsearch.sgml
@@ -11,7 +11,7 @@
    <primary>text search</primary>
   </indexterm>
 
- <sect1 id="textsearch-intro">
+ <sect1 id="textsearch-intro" xreflabel="Introduction">
   <title>Introduction</title>
 
   <para>
@@ -169,7 +169,7 @@
   </para>
 
 
-  <sect2 id="textsearch-document">
+  <sect2 id="textsearch-document" xreflabel="What Is a Document?">
    <title>What Is a Document?</title>
 
    <indexterm zone="textsearch-document">
@@ -236,7 +236,7 @@ WHERE m.mid = d.did AND m.mid = 12;
    </para>
   </sect2>
 
-  <sect2 id="textsearch-matching">
+  <sect2 id="textsearch-matching" xreflabel="Basic Text Matching">
    <title>Basic Text Matching</title>
 
    <para>
@@ -403,7 +403,7 @@ SELECT phraseto_tsquery('the cats ate the rats');
    </para>
   </sect2>
 
-  <sect2 id="textsearch-intro-configurations">
+  <sect2 id="textsearch-intro-configurations" xreflabel="Configurations">
    <title>Configurations</title>
 
    <para>
@@ -490,7 +490,7 @@ SELECT phraseto_tsquery('the cats ate the rats');
 
  </sect1>
 
- <sect1 id="textsearch-tables">
+ <sect1 id="textsearch-tables" xreflabel="Tables and Indexes">
   <title>Tables and Indexes</title>
 
   <para>
@@ -499,7 +499,7 @@ SELECT phraseto_tsquery('the cats ate the rats');
    optionally using indexes.
   </para>
 
-  <sect2 id="textsearch-tables-search">
+  <sect2 id="textsearch-tables-search" xreflabel="Searching a Table">
    <title>Searching a Table</title>
 
    <para>
@@ -560,7 +560,7 @@ LIMIT 10;
 
   </sect2>
 
-  <sect2 id="textsearch-tables-index">
+  <sect2 id="textsearch-tables-index" xreflabel="Creating Indexes">
    <title>Creating Indexes</title>
 
    <para>
@@ -668,7 +668,7 @@ LIMIT 10;
 
  </sect1>
 
- <sect1 id="textsearch-controls">
+ <sect1 id="textsearch-controls" xreflabel="Controlling Text Search">
   <title>Controlling Text Search</title>
 
   <para>
@@ -681,7 +681,7 @@ LIMIT 10;
    functions.
   </para>
 
-  <sect2 id="textsearch-parsing-documents">
+  <sect2 id="textsearch-parsing-documents" xreflabel="Parsing Documents">
    <title>Parsing Documents</title>
 
    <para>
@@ -785,7 +785,7 @@ UPDATE tt SET ti =
 
   </sect2>
 
-  <sect2 id="textsearch-parsing-queries">
+  <sect2 id="textsearch-parsing-queries" xreflabel="Parsing Queries">
    <title>Parsing Queries</title>
 
    <para>
@@ -1046,7 +1046,7 @@ SELECT websearch_to_tsquery('english', '""" )( dummy \\ query &lt;-&gt;');
     </para>
   </sect2>
 
-  <sect2 id="textsearch-ranking">
+  <sect2 id="textsearch-ranking" xreflabel="Ranking Search Results">
    <title>Ranking Search Results</title>
 
    <para>
@@ -1265,7 +1265,7 @@ LIMIT 10;
 
   </sect2>
 
-  <sect2 id="textsearch-headline">
+  <sect2 id="textsearch-headline" xreflabel="Highlighting Results">
    <title>Highlighting Results</title>
 
    <para>
@@ -1432,7 +1432,7 @@ occurrences to display in the result.',
 
  </sect1>
 
- <sect1 id="textsearch-features">
+ <sect1 id="textsearch-features" xreflabel="Additional Features">
   <title>Additional Features</title>
 
   <para>
@@ -1440,7 +1440,7 @@ occurrences to display in the result.',
    useful in connection with text search.
   </para>
 
-  <sect2 id="textsearch-manipulate-tsvector">
+  <sect2 id="textsearch-manipulate-tsvector" xreflabel="Manipulating Documents">
    <title>Manipulating Documents</title>
 
    <para>
@@ -1571,7 +1571,7 @@ occurrences to display in the result.',
 
   </sect2>
 
-  <sect2 id="textsearch-manipulate-tsquery">
+  <sect2 id="textsearch-manipulate-tsquery" xreflabel="Manipulating Queries">
    <title>Manipulating Queries</title>
 
    <para>
@@ -1747,7 +1747,7 @@ SELECT querytree(to_tsquery('!defined'));
 
    </variablelist>
 
-   <sect3 id="textsearch-query-rewriting">
+   <sect3 id="textsearch-query-rewriting" xreflabel="Query Rewriting">
     <title>Query Rewriting</title>
 
     <indexterm zone="textsearch-query-rewriting">
@@ -1884,7 +1884,7 @@ SELECT ts_rewrite('a &amp; b'::tsquery,
 
   </sect2>
 
-  <sect2 id="textsearch-update-triggers">
+  <sect2 id="textsearch-update-triggers" xreflabel="Triggers for Automatic Updates">
    <title>Triggers for Automatic Updates</title>
 
    <indexterm>
@@ -1997,7 +1997,7 @@ CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE
 
   </sect2>
 
-  <sect2 id="textsearch-statistics">
+  <sect2 id="textsearch-statistics" xreflabel="Gathering Document Statistics">
    <title>Gathering Document Statistics</title>
 
    <indexterm>
@@ -2069,7 +2069,7 @@ LIMIT 10;
 
  </sect1>
 
- <sect1 id="textsearch-parsers">
+ <sect1 id="textsearch-parsers" xreflabel="Parsers">
   <title>Parsers</title>
 
   <para>
@@ -2288,7 +2288,7 @@ SELECT alias, description, token FROM ts_debug('http://example.com/stuff/index.h
 
  </sect1>
 
- <sect1 id="textsearch-dictionaries">
+ <sect1 id="textsearch-dictionaries" xreflabel="Dictionaries">
   <title>Dictionaries</title>
 
   <para>
@@ -2437,7 +2437,7 @@ ALTER TEXT SEARCH CONFIGURATION astro_en
    letters, as is done by the <xref linkend="unaccent"/> module.
   </para>
 
-  <sect2 id="textsearch-stopwords">
+  <sect2 id="textsearch-stopwords" xreflabel="Stop Words">
    <title>Stop Words</title>
 
    <para>
@@ -2482,7 +2482,7 @@ SELECT ts_rank_cd (to_tsvector('english', 'list stop words'), to_tsquery('list &
 
   </sect2>
 
-  <sect2 id="textsearch-simple-dictionary">
+  <sect2 id="textsearch-simple-dictionary" xreflabel="Simple Dictionary">
    <title>Simple Dictionary</title>
 
    <para>
@@ -2586,7 +2586,7 @@ SELECT ts_lexize('public.simple_dict', 'The');
 
   </sect2>
 
-  <sect2 id="textsearch-synonym-dictionary">
+  <sect2 id="textsearch-synonym-dictionary" xreflabel="Synonym Dictionary">
    <title>Synonym Dictionary</title>
 
    <para>
@@ -2698,7 +2698,7 @@ mydb=# SELECT 'indexes are very useful'::tsvector @@ to_tsquery('tst', 'indices'
    </para>
   </sect2>
 
-  <sect2 id="textsearch-thesaurus">
+  <sect2 id="textsearch-thesaurus" xreflabel="Thesaurus Dictionary">
    <title>Thesaurus Dictionary</title>
 
    <para>
@@ -2780,7 +2780,7 @@ more sample word(s) : more indexed word(s)
     </para>
    </caution>
 
-  <sect3 id="textsearch-thesaurus-config">
+  <sect3 id="textsearch-thesaurus-config" xreflabel="Thesaurus Configuration">
    <title>Thesaurus Configuration</title>
 
    <para>
@@ -2833,7 +2833,7 @@ ALTER TEXT SEARCH CONFIGURATION russian
 
   </sect3>
 
-  <sect3 id="textsearch-thesaurus-examples">
+  <sect3 id="textsearch-thesaurus-examples" xreflabel="Thesaurus Example">
    <title>Thesaurus Example</title>
 
    <para>
@@ -2912,7 +2912,7 @@ SELECT plainto_tsquery('supernova star');
 
   </sect2>
 
-  <sect2 id="textsearch-ispell-dictionary">
+  <sect2 id="textsearch-ispell-dictionary" xreflabel="Ispell Dictionary">
    <title><application>Ispell</application> Dictionary</title>
 
    <para>
@@ -3130,7 +3130,7 @@ largehearted
 
   </sect2>
 
-  <sect2 id="textsearch-snowball-dictionary">
+  <sect2 id="textsearch-snowball-dictionary" xreflabel="Snowball Dictionary">
    <title><application>Snowball</application> Dictionary</title>
 
    <para>
@@ -3170,7 +3170,7 @@ CREATE TEXT SEARCH DICTIONARY english_stem (
 
  </sect1>
 
- <sect1 id="textsearch-configuration">
+ <sect1 id="textsearch-configuration" xreflabel="Configuration Example">
   <title>Configuration Example</title>
 
    <para>
@@ -3293,7 +3293,7 @@ SHOW default_text_search_config;
 
  </sect1>
 
- <sect1 id="textsearch-debugging">
+ <sect1 id="textsearch-debugging" xreflabel="Testing and Debugging Text Search">
   <title>Testing and Debugging Text Search</title>
 
   <para>
@@ -3303,7 +3303,7 @@ SHOW default_text_search_config;
    test a complete configuration, or test parsers and dictionaries separately.
   </para>
 
-  <sect2 id="textsearch-configuration-testing">
+  <sect2 id="textsearch-configuration-testing" xreflabel="Configuration Testing">
    <title>Configuration Testing</title>
 
   <para>
@@ -3487,7 +3487,7 @@ FROM ts_debug('public.english', 'The Brightest supernovaes');
 
   </sect2>
 
-  <sect2 id="textsearch-parser-testing">
+  <sect2 id="textsearch-parser-testing" xreflabel="Parser Testing">
    <title>Parser Testing</title>
 
   <para>
@@ -3576,7 +3576,7 @@ SELECT * FROM ts_token_type('default');
 
   </sect2>
 
-  <sect2 id="textsearch-dictionary-testing">
+  <sect2 id="textsearch-dictionary-testing" xreflabel="Dictionary Testing">
    <title>Dictionary Testing</title>
 
    <para>
@@ -3647,7 +3647,7 @@ SELECT plainto_tsquery('supernovae stars');
 
  </sect1>
 
- <sect1 id="textsearch-indexes">
+ <sect1 id="textsearch-indexes" xreflabel="Preferred Index Types for Text Search">
   <title>Preferred Index Types for Text Search</title>
 
   <indexterm zone="textsearch-indexes">
@@ -3780,7 +3780,7 @@ SELECT plainto_tsquery('supernovae stars');
 
  </sect1>
 
- <sect1 id="textsearch-psql">
+ <sect1 id="textsearch-psql" xreflabel="psql Support">
   <title><application>psql</application> Support</title>
 
   <para>
@@ -3983,7 +3983,7 @@ Parser: "pg_catalog.default"
 
  </sect1>
 
- <sect1 id="textsearch-limitations">
+ <sect1 id="textsearch-limitations" xreflabel="Limitations">
   <title>Limitations</title>
 
   <para>
diff --git a/doc/src/sgml/trigger.sgml b/doc/src/sgml/trigger.sgml
index 0062f1a3fd1..140cb334884 100644
--- a/doc/src/sgml/trigger.sgml
+++ b/doc/src/sgml/trigger.sgml
@@ -27,7 +27,7 @@
    plain SQL function language.
   </para>
 
-  <sect1 id="trigger-definition">
+  <sect1 id="trigger-definition" xreflabel="Overview of Trigger Behavior">
    <title>Overview of Trigger Behavior</title>
 
    <para>
@@ -422,7 +422,7 @@
 
   </sect1>
 
-  <sect1 id="trigger-datachanges">
+  <sect1 id="trigger-datachanges" xreflabel="Visibility of Data Changes">
    <title>Visibility of Data Changes</title>
 
    <para>
@@ -498,7 +498,7 @@
    </para>
   </sect1>
 
-  <sect1 id="trigger-interface">
+  <sect1 id="trigger-interface" xreflabel="Writing Trigger Functions in C">
    <title>Writing Trigger Functions in C</title>
 
    <indexterm zone="trigger-interface">
@@ -850,7 +850,7 @@ typedef struct Trigger
    </para>
   </sect1>
 
-  <sect1 id="trigger-example">
+  <sect1 id="trigger-example" xreflabel="A Complete Trigger Example">
    <title>A Complete Trigger Example</title>
 
    <para>
diff --git a/doc/src/sgml/tsm-system-rows.sgml b/doc/src/sgml/tsm-system-rows.sgml
index e3fb4d15dd5..daff9cd2f4a 100644
--- a/doc/src/sgml/tsm-system-rows.sgml
+++ b/doc/src/sgml/tsm-system-rows.sgml
@@ -40,7 +40,7 @@
   on the current database.
  </para>
 
- <sect2 id="tsm-system-rows-examples">
+ <sect2 id="tsm-system-rows-examples" xreflabel="Examples">
   <title>Examples</title>
 
   <para>
diff --git a/doc/src/sgml/tsm-system-time.sgml b/doc/src/sgml/tsm-system-time.sgml
index 05c6be0caca..3dfa3e2001f 100644
--- a/doc/src/sgml/tsm-system-time.sgml
+++ b/doc/src/sgml/tsm-system-time.sgml
@@ -42,7 +42,7 @@
   on the current database.
  </para>
 
- <sect2 id="tsm-system-time-examples">
+ <sect2 id="tsm-system-time-examples" xreflabel="Examples">
   <title>Examples</title>
 
   <para>
diff --git a/doc/src/sgml/typeconv.sgml b/doc/src/sgml/typeconv.sgml
index 96aa02e4fab..94b8857e5db 100644
--- a/doc/src/sgml/typeconv.sgml
+++ b/doc/src/sgml/typeconv.sgml
@@ -31,7 +31,7 @@ for more information on specific data types and allowed functions and
 operators.
 </para>
 
-<sect1 id="typeconv-overview">
+<sect1 id="typeconv-overview" xreflabel="Overview">
 <title>Overview</title>
 
 <para>
@@ -201,7 +201,7 @@ should use this new function and no longer do implicit conversion to use the old
 
 </sect1>
 
-<sect1 id="typeconv-oper">
+<sect1 id="typeconv-oper" xreflabel="Operators">
 <title>Operators</title>
 
 <indexterm zone="typeconv-oper">
@@ -555,7 +555,7 @@ usable in all the same cases as a similarly-named operator on the base type.
 
 </sect1>
 
-<sect1 id="typeconv-func">
+<sect1 id="typeconv-func" xreflabel="Functions">
 <title>Functions</title>
 
 <indexterm zone="typeconv-func">
@@ -920,7 +920,7 @@ SELECT substr(CAST (1234 AS text), 3);
 
 </sect1>
 
-<sect1 id="typeconv-query">
+<sect1 id="typeconv-query" xreflabel="Value Storage">
 <title>Value Storage</title>
 
   <para>
@@ -1004,7 +1004,7 @@ padding spaces.
 </example>
 </sect1>
 
-<sect1 id="typeconv-union-case">
+<sect1 id="typeconv-union-case" xreflabel="UNION, CASE, and Related Constructs">
 <title><literal>UNION</literal>, <literal>CASE</literal>, and Related Constructs</title>
 
 <indexterm zone="typeconv-union-case">
@@ -1212,7 +1212,7 @@ section consider all of their inputs in one resolution step.
 </example>
 </sect1>
 
-<sect1 id="typeconv-select">
+<sect1 id="typeconv-select" xreflabel="SELECT Output Columns">
 <title><literal>SELECT</literal> Output Columns</title>
 
 <indexterm zone="typeconv-select">
diff --git a/doc/src/sgml/unaccent.sgml b/doc/src/sgml/unaccent.sgml
index 744821ca997..ea275a98677 100644
--- a/doc/src/sgml/unaccent.sgml
+++ b/doc/src/sgml/unaccent.sgml
@@ -27,7 +27,7 @@
   on the current database.
  </para>
 
- <sect2 id="unaccent-configuration">
+ <sect2 id="unaccent-configuration" xreflabel="Configuration">
   <title>Configuration</title>
 
   <para>
@@ -123,7 +123,7 @@
   </para>
  </sect2>
 
- <sect2 id="unaccent-usage">
+ <sect2 id="unaccent-usage" xreflabel="Usage">
   <title>Usage</title>
 
   <para>
@@ -181,7 +181,7 @@ mydb=# SELECT ts_headline('fr', 'H&ocirc;tel de la Mer', to_tsquery('fr', 'Hotel
   </para>
  </sect2>
 
- <sect2 id="unaccent-functions">
+ <sect2 id="unaccent-functions" xreflabel="Functions">
  <title>Functions</title>
 
  <para>
diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml
index ed18704a9c2..b50b89bbf8e 100644
--- a/doc/src/sgml/user-manag.sgml
+++ b/doc/src/sgml/user-manag.sgml
@@ -27,7 +27,7 @@
   database objects can be found in <xref linkend="ddl-priv"/>.
  </para>
 
- <sect1 id="database-roles">
+ <sect1 id="database-roles" xreflabel="Database Roles">
   <title>Database Roles</title>
 
   <indexterm zone="database-roles">
@@ -140,7 +140,7 @@ SELECT rolname FROM pg_roles WHERE rolcanlogin;
   </para>
  </sect1>
 
- <sect1 id="role-attributes">
+ <sect1 id="role-attributes" xreflabel="Role Attributes">
   <title>Role Attributes</title>
 
    <para>
@@ -359,7 +359,7 @@ ALTER ROLE myname SET enable_indexscan TO off;
   </para>
  </sect1>
 
- <sect1 id="role-membership">
+ <sect1 id="role-membership" xreflabel="Role Membership">
   <title>Role Membership</title>
 
   <indexterm zone="role-membership">
@@ -506,7 +506,7 @@ DROP ROLE <replaceable>name</replaceable>;
   </para>
  </sect1>
 
- <sect1 id="role-removal">
+ <sect1 id="role-removal" xreflabel="Dropping Roles">
   <title>Dropping Roles</title>
 
   <para>
@@ -577,7 +577,7 @@ DROP ROLE doomed_role;
   </para>
  </sect1>
 
- <sect1 id="predefined-roles">
+ <sect1 id="predefined-roles" xreflabel="Predefined Roles">
   <title>Predefined Roles</title>
 
   <indexterm zone="predefined-roles">
@@ -800,7 +800,7 @@ GRANT pg_signal_backend TO admin_user;
 
  </sect1>
 
- <sect1 id="perm-functions">
+ <sect1 id="perm-functions" xreflabel="Function Security">
   <title>Function Security</title>
 
   <para>
diff --git a/doc/src/sgml/uuid-ossp.sgml b/doc/src/sgml/uuid-ossp.sgml
index acd20a51f01..3026b4b6684 100644
--- a/doc/src/sgml/uuid-ossp.sgml
+++ b/doc/src/sgml/uuid-ossp.sgml
@@ -22,7 +22,7 @@
   on the current database.
  </para>
 
- <sect2 id="uuid-ossp-functions-sect">
+ <sect2 id="uuid-ossp-functions-sect" xreflabel="uuid-ossp Functions">
   <title><literal>uuid-ossp</literal> Functions</title>
 
   <para>
@@ -205,7 +205,7 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org');
   </table>
  </sect2>
 
- <sect2 id="uuid-ossp-building">
+ <sect2 id="uuid-ossp-building" xreflabel="Building uuid-ossp">
   <title>Building <filename>uuid-ossp</filename></title>
 
   <para>
@@ -230,7 +230,7 @@ SELECT uuid_generate_v3(uuid_ns_url(), 'http://www.postgresql.org');
   </para>
  </sect2>
 
- <sect2 id="uuid-ossp-author">
+ <sect2 id="uuid-ossp-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml
index f3b86b26be9..2f0f0595e1f 100644
--- a/doc/src/sgml/wal.sgml
+++ b/doc/src/sgml/wal.sgml
@@ -9,7 +9,7 @@
   Write-Ahead Log.
  </para>
 
- <sect1 id="wal-reliability">
+ <sect1 id="wal-reliability" xreflabel="Reliability">
   <title>Reliability</title>
 
   <para>
@@ -229,7 +229,7 @@
   </para>
  </sect1>
 
- <sect1 id="checksums">
+ <sect1 id="checksums" xreflabel="Data Checksums">
   <title>Data Checksums</title>
   <indexterm>
    <primary>checksums</primary>
@@ -264,7 +264,7 @@
    configuration parameter <xref linkend="guc-ignore-checksum-failure" />.
   </para>
 
-  <sect2 id="checksums-offline-enable-disable">
+  <sect2 id="checksums-offline-enable-disable" xreflabel="Off-line Enabling of Checksums">
    <title>Off-line Enabling of Checksums</title>
 
    <para>
@@ -276,7 +276,7 @@
   </sect2>
  </sect1>
 
-  <sect1 id="wal-intro">
+  <sect1 id="wal-intro" xreflabel="Write-Ahead Logging (WAL)">
    <title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
 
    <indexterm zone="wal">
@@ -347,7 +347,7 @@
    </para>
   </sect1>
 
- <sect1 id="wal-async-commit">
+ <sect1 id="wal-async-commit" xreflabel="Asynchronous Commit">
   <title>Asynchronous Commit</title>
 
    <indexterm>
@@ -479,7 +479,7 @@
 
  </sect1>
 
- <sect1 id="wal-configuration">
+ <sect1 id="wal-configuration" xreflabel="WAL Configuration">
   <title><acronym>WAL</acronym> Configuration</title>
 
   <para>
@@ -849,7 +849,7 @@
   </para>
  </sect1>
 
- <sect1 id="wal-internals">
+ <sect1 id="wal-internals" xreflabel="WAL Internals">
   <title>WAL Internals</title>
 
   <indexterm zone="wal-internals">
diff --git a/doc/src/sgml/xact.sgml b/doc/src/sgml/xact.sgml
index 3aa7ee1383e..5c19a141fa9 100644
--- a/doc/src/sgml/xact.sgml
+++ b/doc/src/sgml/xact.sgml
@@ -10,7 +10,7 @@
   The word transaction is often abbreviated as <firstterm>xact</firstterm>.
  </para>
 
- <sect1 id="transaction-id">
+ <sect1 id="transaction-id" xreflabel="Transactions and Identifiers">
 
   <title>Transactions and Identifiers</title>
 
@@ -79,7 +79,7 @@
   </para>
  </sect1>
 
- <sect1 id="xact-locking">
+ <sect1 id="xact-locking" xreflabel="Transactions and Locking">
 
   <title>Transactions and Locking</title>
 
@@ -171,7 +171,7 @@
   </para>
  </sect1>
 
- <sect1 id="two-phase">
+ <sect1 id="two-phase" xreflabel="Two-Phase Transactions">
 
   <title>Two-Phase Transactions</title>
 
diff --git a/doc/src/sgml/xaggr.sgml b/doc/src/sgml/xaggr.sgml
index bdad8d3dc2b..0a5c51bdbf0 100644
--- a/doc/src/sgml/xaggr.sgml
+++ b/doc/src/sgml/xaggr.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/xaggr.sgml -->
 
- <sect1 id="xaggr">
+ <sect1 id="xaggr" xreflabel="User-Defined Aggregates">
   <title>User-Defined Aggregates</title>
 
   <indexterm zone="xaggr">
@@ -145,7 +145,7 @@ CREATE AGGREGATE avg (float8)
    command.
   </para>
 
- <sect2 id="xaggr-moving-aggregates">
+ <sect2 id="xaggr-moving-aggregates" xreflabel="Moving-Aggregate Mode">
   <title>Moving-Aggregate Mode</title>
 
   <indexterm>
@@ -273,7 +273,7 @@ FROM (VALUES (1, 1.0e20::float8),
 
  </sect2>
 
- <sect2 id="xaggr-polymorphic-aggregates">
+ <sect2 id="xaggr-polymorphic-aggregates" xreflabel="Polymorphic and Variadic Aggregates">
   <title>Polymorphic and Variadic Aggregates</title>
 
   <indexterm>
@@ -418,7 +418,7 @@ SELECT myaggregate(a, b, c ORDER BY a) FROM ...
 
  </sect2>
 
- <sect2 id="xaggr-ordered-set-aggregates">
+ <sect2 id="xaggr-ordered-set-aggregates" xreflabel="Ordered-Set Aggregates">
   <title>Ordered-Set Aggregates</title>
 
   <indexterm>
@@ -518,7 +518,7 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households;
 
  </sect2>
 
-  <sect2 id="xaggr-partial-aggregates">
+  <sect2 id="xaggr-partial-aggregates" xreflabel="Partial Aggregation">
   <title>Partial Aggregation</title>
 
   <indexterm>
@@ -614,7 +614,7 @@ SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households;
 
  </sect2>
 
- <sect2 id="xaggr-support-functions">
+ <sect2 id="xaggr-support-functions" xreflabel="Support Functions for Aggregates">
   <title>Support Functions for Aggregates</title>
 
   <indexterm>
diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
index e9288bd6b5e..c6c36f4843f 100644
--- a/doc/src/sgml/xfunc.sgml
+++ b/doc/src/sgml/xfunc.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/xfunc.sgml -->
 
- <sect1 id="xfunc">
+ <sect1 id="xfunc" xreflabel="User-Defined Functions">
   <title>User-Defined Functions</title>
 
   <indexterm zone="xfunc">
@@ -73,7 +73,7 @@
   </para>
   </sect1>
 
-  <sect1 id="xproc">
+  <sect1 id="xproc" xreflabel="User-Defined Procedures">
    <title>User-Defined Procedures</title>
 
   <indexterm zone="xproc">
@@ -143,7 +143,7 @@
    </para>
   </sect1>
 
-  <sect1 id="xfunc-sql">
+  <sect1 id="xfunc-sql" xreflabel="Query Language (SQL) Functions">
    <title>Query Language (<acronym>SQL</acronym>) Functions</title>
 
    <indexterm zone="xfunc-sql">
@@ -245,7 +245,7 @@ CALL clean_emp();
     the function (see <xref linkend="sql-syntax-strings"/>).
    </para>
 
-   <sect2 id="xfunc-sql-function-arguments">
+   <sect2 id="xfunc-sql-function-arguments" xreflabel="Arguments for SQL Functions">
     <title>Arguments for <acronym>SQL</acronym> Functions</title>
 
    <indexterm>
@@ -307,7 +307,7 @@ INSERT INTO $1 VALUES (42);
     </note>
    </sect2>
 
-   <sect2 id="xfunc-sql-base-functions">
+   <sect2 id="xfunc-sql-base-functions" xreflabel="SQL Functions on Base Types">
     <title><acronym>SQL</acronym> Functions on Base Types</title>
 
     <para>
@@ -454,7 +454,7 @@ $$ LANGUAGE SQL;
     </para>
    </sect2>
 
-   <sect2 id="xfunc-sql-composite-functions">
+   <sect2 id="xfunc-sql-composite-functions" xreflabel="SQL Functions on Composite Types">
     <title><acronym>SQL</acronym> Functions on Composite Types</title>
 
     <para>
@@ -670,7 +670,7 @@ SELECT getname(new_emp());
     </para>
    </sect2>
 
-   <sect2 id="xfunc-output-parameters">
+   <sect2 id="xfunc-output-parameters" xreflabel="SQL Functions with Output Parameters">
     <title><acronym>SQL</acronym> Functions with Output Parameters</title>
 
    <indexterm>
@@ -756,7 +756,7 @@ DROP FUNCTION sum_n_product (int, int);
     </para>
    </sect2>
 
-   <sect2 id="xfunc-output-parameters-proc">
+   <sect2 id="xfunc-output-parameters-proc" xreflabel="SQL Procedures with Output Parameters">
     <title><acronym>SQL</acronym> Procedures with Output Parameters</title>
 
     <indexterm>
@@ -797,7 +797,7 @@ CALL tp1(17, 100.0, NULL);
     </para>
    </sect2>
 
-   <sect2 id="xfunc-sql-variadic-functions">
+   <sect2 id="xfunc-sql-variadic-functions" xreflabel="SQL Functions with Variable Numbers of Arguments">
     <title><acronym>SQL</acronym> Functions with Variable Numbers of Arguments</title>
 
     <indexterm>
@@ -896,7 +896,7 @@ SELECT mleast(arr =&gt; ARRAY[10, -1, 5, 4.4]);
     </para>
    </sect2>
 
-   <sect2 id="xfunc-sql-parameter-defaults">
+   <sect2 id="xfunc-sql-parameter-defaults" xreflabel="SQL Functions with Default Values for Arguments">
     <title><acronym>SQL</acronym> Functions with Default Values for Arguments</title>
 
     <indexterm>
@@ -954,7 +954,7 @@ ERROR:  function foo() does not exist
     </para>
    </sect2>
 
-   <sect2 id="xfunc-sql-table-functions">
+   <sect2 id="xfunc-sql-table-functions" xreflabel="SQL Functions as Table Sources">
     <title><acronym>SQL</acronym> Functions as Table Sources</title>
 
     <para>
@@ -997,7 +997,7 @@ SELECT *, upper(fooname) FROM getfoo(1) AS t1;
     </para>
    </sect2>
 
-   <sect2 id="xfunc-sql-functions-returning-set">
+   <sect2 id="xfunc-sql-functions-returning-set" xreflabel="SQL Functions Returning Sets">
     <title><acronym>SQL</acronym> Functions Returning Sets</title>
 
     <indexterm>
@@ -1275,7 +1275,7 @@ SELECT x, case_generate_series(y &gt; 0, 1, z, 5) FROM tab;
     </note>
    </sect2>
 
-   <sect2 id="xfunc-sql-functions-returning-table">
+   <sect2 id="xfunc-sql-functions-returning-table" xreflabel="SQL Functions Returning TABLE">
     <title><acronym>SQL</acronym> Functions Returning <literal>TABLE</literal></title>
 
     <indexterm>
@@ -1311,7 +1311,7 @@ $$ LANGUAGE SQL;
     </para>
    </sect2>
 
-   <sect2 id="xfunc-sql-polymorphic-functions">
+   <sect2 id="xfunc-sql-polymorphic-functions" xreflabel="Polymorphic SQL Functions">
     <title>Polymorphic <acronym>SQL</acronym> Functions</title>
 
     <para>
@@ -1452,7 +1452,7 @@ SELECT concat_values('|', 1, 4, 2);
     </para>
    </sect2>
 
-   <sect2 id="xfunc-sql-collations">
+   <sect2 id="xfunc-sql-collations" xreflabel="SQL Functions with Collations">
     <title><acronym>SQL</acronym> Functions with Collations</title>
 
     <indexterm>
@@ -1508,7 +1508,7 @@ $$ LANGUAGE SQL;
    </sect2>
   </sect1>
 
-  <sect1 id="xfunc-overload">
+  <sect1 id="xfunc-overload" xreflabel="Function Overloading">
    <title>Function Overloading</title>
 
    <indexterm zone="xfunc-overload">
@@ -1592,7 +1592,7 @@ CREATE FUNCTION test(int, int) RETURNS int
    </para>
   </sect1>
 
-  <sect1 id="xfunc-volatility">
+  <sect1 id="xfunc-volatility" xreflabel="Function Volatility Categories">
    <title>Function Volatility Categories</title>
 
    <indexterm zone="xfunc-volatility">
@@ -1751,7 +1751,7 @@ CREATE FUNCTION test(int, int) RETURNS int
    </note>
   </sect1>
 
-  <sect1 id="xfunc-pl">
+  <sect1 id="xfunc-pl" xreflabel="Procedural Language Functions">
    <title>Procedural Language Functions</title>
 
    <para>
@@ -1767,7 +1767,7 @@ CREATE FUNCTION test(int, int) RETURNS int
    </para>
   </sect1>
 
-  <sect1 id="xfunc-internal">
+  <sect1 id="xfunc-internal" xreflabel="Internal Functions">
    <title>Internal Functions</title>
 
    <indexterm zone="xfunc-internal"><primary>function</primary><secondary>internal</secondary></indexterm>
@@ -1810,7 +1810,7 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision
    </note>
   </sect1>
 
-  <sect1 id="xfunc-c">
+  <sect1 id="xfunc-c" xreflabel="C-Language Functions">
    <title>C-Language Functions</title>
 
    <indexterm zone="xfunc-c">
@@ -1838,7 +1838,7 @@ CREATE FUNCTION square_root(double precision) RETURNS double precision
     call for the function, as illustrated below.
    </para>
 
-  <sect2 id="xfunc-c-dynload">
+  <sect2 id="xfunc-c-dynload" xreflabel="Dynamic Loading">
    <title>Dynamic Loading</title>
 
    <indexterm zone="xfunc-c-dynload">
@@ -2007,7 +2007,7 @@ PG_MODULE_MAGIC_EXT(
 
   </sect2>
 
-   <sect2 id="xfunc-c-basetype">
+   <sect2 id="xfunc-c-basetype" xreflabel="Base Types in C-Language Functions">
     <title>Base Types in C-Language Functions</title>
 
     <indexterm zone="xfunc-c-basetype">
@@ -2681,7 +2681,7 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
     </para>
    </sect2>
 
-   <sect2 id="xfunc-c-code">
+   <sect2 id="xfunc-c-code" xreflabel="Writing Code">
     <title>Writing Code</title>
 
     <para>
@@ -2788,7 +2788,7 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
 
 &dfunc;
 
-   <sect2 id="xfunc-api-abi-stability-guidance">
+   <sect2 id="xfunc-api-abi-stability-guidance" xreflabel="Server API and ABI Stability Guidance">
     <title>Server API and ABI Stability Guidance</title>
 
     <para>
@@ -2797,7 +2797,7 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
      <productname>PostgreSQL</productname> server.
     </para>
 
-    <sect3 id="xfunc-guidance-general">
+    <sect3 id="xfunc-guidance-general" xreflabel="General">
      <title>General</title>
 
      <para>
@@ -2823,14 +2823,14 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
      </para>
     </sect3>
 
-    <sect3 id="xfunc-guidance-api-compatibility">
+    <sect3 id="xfunc-guidance-api-compatibility" xreflabel="API Compatibility">
      <title>API Compatibility</title>
      <para>
       The <acronym>API</acronym>, or application programming interface, is the
       interface used at compile time.
      </para>
 
-     <sect4 id="xfunc-guidance-api-major-versions">
+     <sect4 id="xfunc-guidance-api-major-versions" xreflabel="Major Versions">
       <title>Major Versions</title>
       <para>
        There is <emphasis>no</emphasis> promise of API compatibility between
@@ -2843,7 +2843,7 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
       </para>
      </sect4>
 
-     <sect4 id="xfunc-guidance-api-mninor-versions">
+     <sect4 id="xfunc-guidance-api-mninor-versions" xreflabel="Minor Versions">
       <title>Minor Versions</title>
       <para>
        <productname>PostgreSQL</productname> makes an effort to avoid server
@@ -2861,14 +2861,14 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
      </sect4>
     </sect3>
 
-    <sect3 id="xfunc-guidance-abi-compatibility">
+    <sect3 id="xfunc-guidance-abi-compatibility" xreflabel="ABI Compatibility">
      <title>ABI Compatibility</title>
       <para>
        The <acronym>ABI</acronym>, or application binary interface, is the
        interface used at run time.
       </para>
 
-     <sect4 id="xfunc-guidance-abi-major-versions">
+     <sect4 id="xfunc-guidance-abi-major-versions" xreflabel="Major Versions">
       <title>Major Versions</title>
       <para>
        Servers of different major versions have intentionally incompatible
@@ -2879,7 +2879,7 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
       </para>
      </sect4>
 
-     <sect4 id="xfunc-guidance-abi-mninor-versions">
+     <sect4 id="xfunc-guidance-abi-mninor-versions" xreflabel="Minor Versions">
       <title>Minor Versions</title>
       <para>
        <productname>PostgreSQL</productname> makes an effort to avoid server
@@ -2924,7 +2924,7 @@ CREATE FUNCTION t_starts_with(text, text) RETURNS boolean
     </sect3>
   </sect2>
 
-   <sect2 id="xfunc-c-composite-type-args">
+   <sect2 id="xfunc-c-composite-type-args" xreflabel="Composite-Type Arguments">
     <title>Composite-Type Arguments</title>
 
     <para>
@@ -3012,7 +3012,7 @@ CREATE FUNCTION c_overpaid(emp, integer) RETURNS boolean
     </para>
    </sect2>
 
-   <sect2 id="xfunc-c-returning-rows">
+   <sect2 id="xfunc-c-returning-rows" xreflabel="Returning Rows (Composite Types)">
     <title>Returning Rows (Composite Types)</title>
 
     <para>
@@ -3163,7 +3163,7 @@ HeapTupleGetDatum(HeapTuple tuple)
 
    </sect2>
 
-   <sect2 id="xfunc-c-return-set">
+   <sect2 id="xfunc-c-return-set" xreflabel="Returning Sets">
     <title>Returning Sets</title>
 
     <para>
@@ -3507,7 +3507,7 @@ CREATE OR REPLACE FUNCTION retcomposite(IN integer, IN integer,
     </para>
    </sect2>
 
-   <sect2 id="xfunc-c-polymorphic">
+   <sect2 id="xfunc-c-polymorphic" xreflabel="Polymorphic Arguments and Return Types">
     <title>Polymorphic Arguments and Return Types</title>
 
     <para>
@@ -3618,10 +3618,10 @@ CREATE FUNCTION make_array(anyelement) RETURNS anyarray
     </para>
    </sect2>
 
-   <sect2 id="xfunc-shared-addin">
+   <sect2 id="xfunc-shared-addin" xreflabel="Shared Memory">
     <title>Shared Memory</title>
 
-    <sect3 id="xfunc-shared-addin-at-startup">
+    <sect3 id="xfunc-shared-addin-at-startup" xreflabel="Requesting Shared Memory at Startup">
      <title>Requesting Shared Memory at Startup</title>
 
      <para>
@@ -3686,7 +3686,7 @@ LWLockRelease(AddinShmemInitLock);
      </para>
     </sect3>
 
-    <sect3 id="xfunc-shared-addin-after-startup">
+    <sect3 id="xfunc-shared-addin-after-startup" xreflabel="Requesting Shared Memory After Startup">
      <title>Requesting Shared Memory After Startup</title>
 
      <para>
@@ -3729,10 +3729,10 @@ void *GetNamedDSMSegment(const char *name, size_t size,
     </sect3>
    </sect2>
 
-   <sect2 id="xfunc-addin-lwlocks">
+   <sect2 id="xfunc-addin-lwlocks" xreflabel="LWLocks">
     <title>LWLocks</title>
 
-    <sect3 id="xfunc-addin-lwlocks-at-startup">
+    <sect3 id="xfunc-addin-lwlocks-at-startup" xreflabel="Requesting LWLocks at Startup">
      <title>Requesting LWLocks at Startup</title>
 
      <para>
@@ -3756,7 +3756,7 @@ LWLockPadded *GetNamedLWLockTranche(const char *tranche_name)
      </para>
     </sect3>
 
-    <sect3 id="xfunc-addin-lwlocks-after-startup">
+    <sect3 id="xfunc-addin-lwlocks-after-startup" xreflabel="Requesting LWLocks After Startup">
      <title>Requesting LWLocks After Startup</title>
 
      <para>
@@ -3791,7 +3791,7 @@ void LWLockInitialize(LWLock *lock, int tranche_id)
     </sect3>
    </sect2>
 
-   <sect2 id="xfunc-addin-wait-events">
+   <sect2 id="xfunc-addin-wait-events" xreflabel="Custom Wait Events">
     <title>Custom Wait Events</title>
 
     <para>
@@ -3818,7 +3818,7 @@ uint32 WaitEventExtensionNew(const char *wait_event_name)
     </para>
    </sect2>
 
-   <sect2 id="xfunc-addin-injection-points">
+   <sect2 id="xfunc-addin-injection-points" xreflabel="Injection Points">
     <title>Injection Points</title>
 
     <para>
@@ -3950,7 +3950,7 @@ extern bool InjectionPointDetach(const char *name);
     </para>
    </sect2>
 
-   <sect2 id="xfunc-addin-custom-cumulative-statistics">
+   <sect2 id="xfunc-addin-custom-cumulative-statistics" xreflabel="Custom Cumulative Statistics">
     <title>Custom Cumulative Statistics</title>
 
     <para>
@@ -4012,7 +4012,7 @@ extern PgStat_Kind pgstat_register_kind(PgStat_Kind kind,
     </para>
    </sect2>
 
-   <sect2 id="extend-cpp">
+   <sect2 id="extend-cpp" xreflabel="Using C++ for Extensibility">
     <title>Using C++ for Extensibility</title>
 
     <indexterm zone="extend-cpp">
@@ -4077,7 +4077,7 @@ extern PgStat_Kind pgstat_register_kind(PgStat_Kind kind,
 
   </sect1>
 
-  <sect1 id="xfunc-optimization">
+  <sect1 id="xfunc-optimization" xreflabel="Function Optimization Information">
    <title>Function Optimization Information</title>
 
   <indexterm zone="xfunc-optimization">
diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml
index 3d315df2f98..49ff5ca4da6 100644
--- a/doc/src/sgml/xindex.sgml
+++ b/doc/src/sgml/xindex.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/xindex.sgml -->
 
-<sect1 id="xindex">
+<sect1 id="xindex" xreflabel="Interfacing Extensions to Indexes">
  <title>Interfacing Extensions to Indexes</title>
 
  <indexterm zone="xindex">
@@ -25,7 +25,7 @@
    so we'll focus on that case first and then return to operator families.
   </para>
 
- <sect2 id="xindex-opclass">
+ <sect2 id="xindex-opclass" xreflabel="Index Methods and Operator Classes">
   <title>Index Methods and Operator Classes</title>
 
   <para>
@@ -75,7 +75,7 @@
   </para>
  </sect2>
 
- <sect2 id="xindex-strategies">
+ <sect2 id="xindex-strategies" xreflabel="Index Method Strategies">
   <title>Index Method Strategies</title>
 
   <para>
@@ -373,7 +373,7 @@
   </para>
  </sect2>
 
- <sect2 id="xindex-support">
+ <sect2 id="xindex-support" xreflabel="Index Method Support Routines">
   <title>Index Method Support Routines</title>
 
   <para>
@@ -811,7 +811,7 @@
   </para>
  </sect2>
 
- <sect2 id="xindex-example">
+ <sect2 id="xindex-example" xreflabel="An Example">
   <title>An Example</title>
 
   <para>
@@ -997,7 +997,7 @@ CREATE OPERATOR CLASS complex_abs_ops
   </para>
  </sect2>
 
- <sect2 id="xindex-opfamily">
+ <sect2 id="xindex-opfamily" xreflabel="Operator Classes and Operator Families">
   <title>Operator Classes and Operator Families</title>
 
   <para>
@@ -1224,7 +1224,7 @@ ALTER OPERATOR FAMILY integer_ops USING btree ADD
   </note>
  </sect2>
 
- <sect2 id="xindex-opclass-dependencies">
+ <sect2 id="xindex-opclass-dependencies" xreflabel="System Dependencies on Operator Classes">
   <title>System Dependencies on Operator Classes</title>
 
    <indexterm>
@@ -1332,7 +1332,7 @@ SELECT sum(x) OVER (ORDER BY x RANGE BETWEEN 5 PRECEDING AND 10 FOLLOWING)
   </para>
  </sect2>
 
- <sect2 id="xindex-ordering-ops">
+ <sect2 id="xindex-ordering-ops" xreflabel="Ordering Operators">
   <title>Ordering Operators</title>
 
   <para>
@@ -1388,7 +1388,7 @@ OPERATOR 15    <-> (point, point) FOR ORDER BY float_ops
   </para>
  </sect2>
 
- <sect2 id="xindex-opclass-features">
+ <sect2 id="xindex-opclass-features" xreflabel="Special Features of Operator Classes">
   <title>Special Features of Operator Classes</title>
 
   <para>
diff --git a/doc/src/sgml/xml2.sgml b/doc/src/sgml/xml2.sgml
index 9fd613f9675..79a1b72d38e 100644
--- a/doc/src/sgml/xml2.sgml
+++ b/doc/src/sgml/xml2.sgml
@@ -12,7 +12,7 @@
   XSLT functionality.
  </para>
 
- <sect2 id="xml2-deprecation">
+ <sect2 id="xml2-deprecation" xreflabel="Deprecation Notice">
   <title>Deprecation Notice</title>
 
   <para>
@@ -30,7 +30,7 @@
   </para>
  </sect2>
 
- <sect2 id="xml2-functions">
+ <sect2 id="xml2-functions" xreflabel="Description of Functions">
   <title>Description of Functions</title>
 
   <para>
@@ -168,7 +168,7 @@
   </table>
  </sect2>
 
- <sect2 id="xml2-xpath-table">
+ <sect2 id="xml2-xpath-table" xreflabel="xpath_table">
   <title><literal>xpath_table</literal></title>
 
   <indexterm>
@@ -318,7 +318,7 @@ WHERE t.author_id = p.person_id;
    of this in a view for convenience.
   </para>
 
-  <sect3 id="xml2-xpath-table-multivalued-results">
+  <sect3 id="xml2-xpath-table-multivalued-results" xreflabel="Multivalued Results">
    <title>Multivalued Results</title>
 
    <para>
@@ -393,14 +393,14 @@ ORDER BY doc_num, line_num;
   </sect3>
  </sect2>
 
- <sect2 id="xml2-xslt">
+ <sect2 id="xml2-xslt" xreflabel="XSLT Functions">
   <title>XSLT Functions</title>
 
   <para>
    The following functions are available if libxslt is installed:
   </para>
 
-  <sect3 id="xml2-xslt-xslt-process">
+  <sect3 id="xml2-xslt-xslt-process" xreflabel="xslt_process">
    <title><literal>xslt_process</literal></title>
 
   <indexterm>
@@ -427,7 +427,7 @@ xslt_process(text document, text stylesheet, text paramlist) returns text
   </sect3>
  </sect2>
 
- <sect2 id="xml2-author">
+ <sect2 id="xml2-author" xreflabel="Author">
   <title>Author</title>
 
   <para>
diff --git a/doc/src/sgml/xoper.sgml b/doc/src/sgml/xoper.sgml
index 853b07a9f14..c039c308a17 100644
--- a/doc/src/sgml/xoper.sgml
+++ b/doc/src/sgml/xoper.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/xoper.sgml -->
 
- <sect1 id="xoper">
+ <sect1 id="xoper" xreflabel="User-Defined Operators">
   <title>User-Defined Operators</title>
 
   <indexterm zone="xoper">
@@ -75,7 +75,7 @@ SELECT (a + b) AS c FROM test_complex;
   </para>
  </sect1>
 
-  <sect1 id="xoper-optimization">
+  <sect1 id="xoper-optimization" xreflabel="Operator Optimization Information">
    <title>Operator Optimization Information</title>
 
   <indexterm zone="xoper-optimization">
@@ -109,7 +109,7 @@ SELECT (a + b) AS c FROM test_complex;
     See <xref linkend="xfunc-optimization"/> for more information.
    </para>
 
-   <sect2 id="xoper-commutator">
+   <sect2 id="xoper-commutator" xreflabel="COMMUTATOR">
     <title><literal>COMMUTATOR</literal></title>
 
     <para>
@@ -148,7 +148,7 @@ SELECT (a + b) AS c FROM test_complex;
     </para>
    </sect2>
 
-   <sect2 id="xoper-negator">
+   <sect2 id="xoper-negator" xreflabel="NEGATOR">
     <title><literal>NEGATOR</literal></title>
 
     <para>
@@ -181,7 +181,7 @@ SELECT (a + b) AS c FROM test_complex;
    </para>
   </sect2>
 
-  <sect2 id="xoper-restrict">
+  <sect2 id="xoper-restrict" xreflabel="RESTRICT">
    <title><literal>RESTRICT</literal></title>
 
    <para>
@@ -258,7 +258,7 @@ column OP constant
    </para>
    </sect2>
 
-   <sect2 id="xoper-join">
+   <sect2 id="xoper-join" xreflabel="JOIN">
     <title><literal>JOIN</literal></title>
 
     <para>
@@ -295,7 +295,7 @@ table1.column1 OP table2.column2
     </para>
    </sect2>
 
-   <sect2 id="xoper-hashes">
+   <sect2 id="xoper-hashes" xreflabel="HASHES">
     <title><literal>HASHES</literal></title>
 
     <para>
@@ -383,7 +383,7 @@ table1.column1 OP table2.column2
 
    </sect2>
 
-   <sect2 id="xoper-merges">
+   <sect2 id="xoper-merges" xreflabel="MERGES">
     <title><literal>MERGES</literal></title>
 
     <para>
diff --git a/doc/src/sgml/xplang.sgml b/doc/src/sgml/xplang.sgml
index 31d403c4806..e5ba26c5521 100644
--- a/doc/src/sgml/xplang.sgml
+++ b/doc/src/sgml/xplang.sgml
@@ -38,7 +38,7 @@
    language are covered in <xref linkend="plhandler"/>.
   </para>
 
-  <sect1 id="xplang-install">
+  <sect1 id="xplang-install" xreflabel="Installing Procedural Languages">
    <title>Installing Procedural Languages</title>
 
    <para>
diff --git a/doc/src/sgml/xtypes.sgml b/doc/src/sgml/xtypes.sgml
index df56d1c3ace..afee2875f50 100644
--- a/doc/src/sgml/xtypes.sgml
+++ b/doc/src/sgml/xtypes.sgml
@@ -1,6 +1,6 @@
 <!-- doc/src/sgml/xtypes.sgml -->
 
- <sect1 id="xtypes">
+ <sect1 id="xtypes" xreflabel="User-Defined Types">
   <title>User-Defined Types</title>
 
   <indexterm zone="xtypes">
@@ -249,7 +249,7 @@ CREATE TYPE complex (
   <xref linkend="sql-createtype"/> command.
  </para>
 
- <sect2 id="xtypes-toast">
+ <sect2 id="xtypes-toast" xreflabel="TOAST Considerations">
   <title>TOAST Considerations</title>
    <indexterm>
     <primary>TOAST</primary>
-- 
2.51.2.windows.1