Fix some inconsistencies with GUC categories
authorMichael Paquier <michael@paquier.xyz>
Tue, 9 Aug 2022 11:01:44 +0000 (20:01 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 9 Aug 2022 11:01:44 +0000 (20:01 +0900)
This commit addresses a few things around GUCs:
- The TCP-related parameters (the four tcp_keepalives_* and
client_connection_check_interval are listed in postgresql.conf.sample in
a subsection called "TCP settings" of "CONNECTIONS AND AUTHENTICATION",
but they did not have their own group name in guc.c.
- enable_group_by_reordering, stats_fetch_consistency and
recovery_prefetch had an inconsistent description, missing a dot at the
end.
- In postgresql.conf.sample, "Process title" should not have a section
of its own, but it should be a subsection of "REPORTING AND LOGGING".

This impacts the contents of pg_settings, which could be seen as a
compatibility break, so no backpatch is done.  This is similar to the
cleanup done in a55a984.

Author: Shinya Kato
Discussion: https://postgr.es/m/5e0c9c608624eafbba910c344282cb14@oss.nttdata.com

doc/src/sgml/config.sgml
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/utils/guc_tables.h

index e2d728e0c4f5b82c9b5db709519748dc95582280..2522f4c8c57f143b7603de821c4636642f5107fd 100644 (file)
@@ -896,6 +896,13 @@ include_dir 'conf.d'
        </para>
       </listitem>
      </varlistentry>
+     </variablelist>
+     </sect2>
+
+     <sect2 id="runtime-config-tcp-settings">
+     <title>TCP Settings</title>
+
+     <variablelist>
 
      <varlistentry id="guc-tcp-keepalives-idle" xreflabel="tcp_keepalives_idle">
       <term><varname>tcp_keepalives_idle</varname> (<type>integer</type>)
index af4a1c306894e4975896ca0c216ec04d51027be4..5db5df62854737d2ab0382c95ff55ab02f44e9c5 100644 (file)
@@ -778,6 +778,8 @@ const char *const config_group_names[] =
        gettext_noop("File Locations"),
        /* CONN_AUTH_SETTINGS */
        gettext_noop("Connections and Authentication / Connection Settings"),
+       /* CONN_AUTH_TCP */
+       gettext_noop("Connections and Authentication / TCP Settings"),
        /* CONN_AUTH_AUTH */
        gettext_noop("Connections and Authentication / Authentication"),
        /* CONN_AUTH_SSL */
@@ -1216,7 +1218,7 @@ static struct config_bool ConfigureNamesBool[] =
        },
        {
                {"enable_group_by_reordering", PGC_USERSET, QUERY_TUNING_METHOD,
-                       gettext_noop("enable reordering of GROUP BY key"),
+                       gettext_noop("Enable reordering of GROUP BY key."),
                        NULL,
                        GUC_EXPLAIN
                },
@@ -3460,7 +3462,7 @@ static struct config_int ConfigureNamesInt[] =
        },
 
        {
-               {"tcp_keepalives_idle", PGC_USERSET, CONN_AUTH_SETTINGS,
+               {"tcp_keepalives_idle", PGC_USERSET, CONN_AUTH_TCP,
                        gettext_noop("Time between issuing TCP keepalives."),
                        gettext_noop("A value of 0 uses the system default."),
                        GUC_UNIT_S
@@ -3471,7 +3473,7 @@ static struct config_int ConfigureNamesInt[] =
        },
 
        {
-               {"tcp_keepalives_interval", PGC_USERSET, CONN_AUTH_SETTINGS,
+               {"tcp_keepalives_interval", PGC_USERSET, CONN_AUTH_TCP,
                        gettext_noop("Time between TCP keepalive retransmits."),
                        gettext_noop("A value of 0 uses the system default."),
                        GUC_UNIT_S
@@ -3493,7 +3495,7 @@ static struct config_int ConfigureNamesInt[] =
        },
 
        {
-               {"tcp_keepalives_count", PGC_USERSET, CONN_AUTH_SETTINGS,
+               {"tcp_keepalives_count", PGC_USERSET, CONN_AUTH_TCP,
                        gettext_noop("Maximum number of TCP keepalive retransmits."),
                        gettext_noop("This controls the number of consecutive keepalive retransmits that can be "
                                                 "lost before a connection is considered dead. A value of 0 uses the "
@@ -3595,7 +3597,7 @@ static struct config_int ConfigureNamesInt[] =
        },
 
        {
-               {"tcp_user_timeout", PGC_USERSET, CONN_AUTH_SETTINGS,
+               {"tcp_user_timeout", PGC_USERSET, CONN_AUTH_TCP,
                        gettext_noop("TCP user timeout."),
                        gettext_noop("A value of 0 uses the system default."),
                        GUC_UNIT_MS
@@ -3640,7 +3642,7 @@ static struct config_int ConfigureNamesInt[] =
        },
 
        {
-               {"client_connection_check_interval", PGC_USERSET, CONN_AUTH_SETTINGS,
+               {"client_connection_check_interval", PGC_USERSET, CONN_AUTH_TCP,
                        gettext_noop("Sets the time interval between checks for disconnection while running queries."),
                        NULL,
                        GUC_UNIT_MS
@@ -4953,7 +4955,7 @@ static struct config_enum ConfigureNamesEnum[] =
 
        {
                {"stats_fetch_consistency", PGC_USERSET, STATS_CUMULATIVE,
-                       gettext_noop("Sets the consistency of accesses to statistics data"),
+                       gettext_noop("Sets the consistency of accesses to statistics data."),
                        NULL
                },
                &pgstat_fetch_consistency,
@@ -5044,7 +5046,7 @@ static struct config_enum ConfigureNamesEnum[] =
 
        {
                {"recovery_prefetch", PGC_SIGHUP, WAL_RECOVERY,
-                       gettext_noop("Prefetch referenced blocks during recovery"),
+                       gettext_noop("Prefetch referenced blocks during recovery."),
                        gettext_noop("Look ahead in the WAL to find references to uncached data.")
                },
                &recovery_prefetch,
index b4bc06e5f5a636857a8caa104431e5b21ec356aa..90bec0502c437c97bf3cbce436211077f272137a 100644 (file)
                                        # -1 disables, 0 logs all temp files
 #log_timezone = 'GMT'
 
-
-#------------------------------------------------------------------------------
-# PROCESS TITLE
-#------------------------------------------------------------------------------
+# - Process Title -
 
 #cluster_name = ''                     # added to process titles if nonempty
                                        # (change requires restart)
index 067d82ada95946cc6df249db0c2365c863a8e459..90565b992125f64c40a27f9479c405c748c6758c 100644 (file)
@@ -56,6 +56,7 @@ enum config_group
        UNGROUPED,                                      /* use for options not shown in pg_settings */
        FILE_LOCATIONS,
        CONN_AUTH_SETTINGS,
+       CONN_AUTH_TCP,
        CONN_AUTH_AUTH,
        CONN_AUTH_SSL,
        RESOURCES_MEM,