Re: Patch for reserved connections for replication users - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Patch for reserved connections for replication users
Date
Msg-id CAA4eK1Jz6R4S8L+mP_kbWHxEvOuB68CcWLzx1YK8t3SerjKAOA@mail.gmail.com
Whole thread Raw
In response to Re: Patch for reserved connections for replication users  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
On Mon, Oct 14, 2013 at 10:56 PM, Josh Berkus <josh@agliodbs.com> wrote:
> On 10/13/2013 01:38 AM, Gibheer wrote:
>> So it will ensure that max_wal_senders is used for reserving
>>> connection slots from being used by non-super user connections. I find
>>> new usage of max_wal_senders acceptable, if anyone else thinks
>>> otherwise, please let us know.
>
> I think otherwise.
>
> Changing max_wal_senders requires a restart.  As such, we currently
> advise users to set the setting generously: "as many replication
> connections as you think you'll ever need, plus two".  If
> max_wal_senders is a reservation which could cause the user to run out
> of other connections sooner than expected, then the user is faced with a
> new "hard to set" parameter: they don't want to set it too high *or* too
> low.

It is documented in the patch that configuration max_wal_senders is
reserved from max_connections.
So it will not cause the user to run out of other connections sooner
than expected, if both the variables are configured properly.

> This would result in a lot of user frustration as they try to get thier
> connection configuration right and have to restart the server multiple
> times.  I find few new features worth making it *harder* to configure
> PostgreSQL, and reserved replication connections certainly don't qualify.
>
> If it's worth having reserved replication connections (and I can see
> some reasons to want it), then we need a new GUC for this:
> "reserved_walsender_connections"

Having new variable also might make users life difficult, as with new
variable he needs to take care of setting 3 parameters
(max_wal_senders, reserved_walsender_connections, max_connections)
appropriately for this purpose and then choosing value for
reserved_walsender_connections will be another thing for which he has
to consult.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: KONDO Mitsumasa
Date:
Subject: Re: Compression of full-page-writes
Next
From: Amit Kapila
Date:
Subject: Re: Patch for reserved connections for replication users