Re: Patch for reserved connections for replication users

From: Gibheer <gibheer(at)zero-knowledge(dot)org>
To: Marko Tiikkaja <marko(at)joh(dot)to>, Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch for reserved connections for replication users
Date: 2013-07-30 07:10:01
Message-ID: 20130730091001.6abce68f@linse.fritz.box
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

here is an update off my patch based on the discussion with Marko
Tiikkaja and Andres Freund.

Marko and I had the idea of introducing reserved connections based on
roles as it would create a way to garantuee specific roles to connect
when other roles use up all connections for whatever reason. But
Andreas said, that it would make connecting take much too long.

So to just fix the issue at hand, we decided that adding
max_wal_senders to the pool of reserved connections is better. With
that, we are sure that streaming replication can connect to the master.

So instead of creating a new configuration option I added
max_wal_senders to the reserved connections and changed the check for
new connections.

The test.pl is a small script to test, if the patch does what it should.

regards,

Stefan Radomski

Attachment Content-Type Size
replication_reserved_connections-v2.patch text/x-patch 1.8 KB
test.pl application/x-perl 4.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2013-07-30 07:39:05 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Previous Message Arulappan, Arul Shaji 2013-07-30 07:03:11 Re: Proposal - Support for National Characters functionality