Re: Connection slots reserved for replication

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: alexk(at)hintbits(dot)com
Cc: petr(dot)jelinek(at)2ndquadrant(dot)com, cyberdemn(at)gmail(dot)com, sfrost(at)snowman(dot)net, magnus(at)hagander(dot)net, sawada(dot)mshk(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection slots reserved for replication
Date: 2019-01-24 11:47:43
Message-ID: 20190124.204743.42441183.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-01-24 11:56:05 Re: Simplify set of flags used by MyXactFlags
Previous Message Greg Stark 2019-01-24 11:21:02 Re: Use an enum for RELKIND_*?