Clean up some GUC declarations and comments
authorMichael Paquier <[email protected]>
Tue, 25 Oct 2022 05:06:07 +0000 (14:06 +0900)
committerMichael Paquier <[email protected]>
Tue, 25 Oct 2022 05:06:07 +0000 (14:06 +0900)
This adjusts a few things for GUCs related to logical replication,
replication slots and WAL senders, in the shape of incorrect comments
and values inconsistent with their initial default value.

Author: Peter Smith
Reviewed-by: Nathan Bossart, Tom Lane, Justin Pryzby
Discussion: https://postgr.es/m/CAHut+PtHE0XSfjjRQ6D4v7+dqzCw=d+1a64ujra4EX8aoc_Z+w@mail.gmail.com

src/backend/replication/logical/launcher.c
src/backend/replication/slot.c
src/backend/replication/walsender.c

index f2c55f3f6a2aa9945958fa43e02016cc46c14825..73594c698ad13eb847bc67494f8678bb098ee96b 100644 (file)
@@ -52,6 +52,7 @@
 /* max sleep time between cycles (3min) */
 #define DEFAULT_NAPTIME_PER_CYCLE 180000L
 
+/* GUC variables */
 int            max_logical_replication_workers = 4;
 int            max_sync_workers_per_subscription = 2;
 
index d58d16e992a3f53e9df02a7ff8e907bdeb0a8a26..b514a4d97c507d5130c9f302377977c7c45b9ebb 100644 (file)
@@ -97,8 +97,8 @@ ReplicationSlotCtlData *ReplicationSlotCtl = NULL;
 /* My backend's replication slot in the shared memory array */
 ReplicationSlot *MyReplicationSlot = NULL;
 
-/* GUCs */
-int            max_replication_slots = 0;  /* the maximum number of replication
+/* GUC variable */
+int            max_replication_slots = 10; /* the maximum number of replication
                                         * slots */
 
 static void ReplicationSlotShmemExit(int code, Datum arg);
index 2193dcaec611d74d1cb93091909f501d6007cc5d..a81ef6a2014fb6b51c3738acf04a791f0880b333 100644 (file)
@@ -118,8 +118,8 @@ bool        am_cascading_walsender = false; /* Am I cascading WAL to another
                                             * standby? */
 bool       am_db_walsender = false;    /* Connected to a database? */
 
-/* User-settable parameters for walsender */
-int            max_wal_senders = 0;    /* the maximum number of concurrent
+/* GUC variables */
+int            max_wal_senders = 10;   /* the maximum number of concurrent
                                     * walsenders */
 int            wal_sender_timeout = 60 * 1000; /* maximum time to send one WAL
                                             * data message */