Re: Connection slots reserved for replication - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: Connection slots reserved for replication
Date
Msg-id 20190124.204743.42441183.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: Connection slots reserved for replication  (Oleksii Kliukin <alexk@hintbits.com>)
Responses Re: Connection slots reserved for replication  (Oleksii Kliukin <alexk@hintbits.com>)
List pgsql-hackers
Hello.

Documentation looks fine for me. By the way, a comment for the
caller-site of CheckRequreParameterValues() in xlog.c looks
somewhat stale.

> /* Check to see if any changes to max_connections give problems */
> CheckRequiredParameterValues();

may be better something like this?:

> /* Check to see if any parameter change gives a problem on replication */


In postinit.c:
>    /*
>     * The last few connection slots are reserved for superusers.
>     */
>    if ((!am_superuser && !am_walsender) &&
>        ReservedBackends > 0 &&

This is forgetting about explaing about walsenders.

> The last few connection slots are reserved for
> superusers. Replication connections don't share the same slot
> pool.

Or something?

And the parentheses enclosing "!am_superuser..walsender" seems no
longer needed.


In guc.c:
-        /* see max_connections and max_wal_senders */
+        /* see max_connections */

I don't understand for what reason we should see max_connections
just above. (Or even max_wal_senders) Do we need this comment?
(There're some other instances, but they wont'be for this patch.)


In pg_controldata.c:
+    printf(_("max_wal_senders setting:         %d\n"),
+           ControlFile->max_wal_senders);
     printf(_("max_worker_processes setting:         %d\n"),
            ControlFile->max_worker_processes);
     printf(_("max_prepared_xacts setting:           %d\n"),

The added item seems to want some additional spaces.


regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Use an enum for RELKIND_*?
Next
From: Alvaro Herrera
Date:
Subject: Re: Simplify set of flags used by MyXactFlags