Re: [HACKERS] Patch for reserved connections for replication users

2013-10-20 Thread Euler Taveira
On 15-10-2013 14:34, Josh Berkus wrote: > On 10/15/2013 07:36 AM, Robert Haas wrote: >> On Tue, Oct 15, 2013 at 10:34 AM, Andres Freund >> wrote: >>> Josh said we should treat replication connections in a separate "pool" >>> from normal database connections, right? So you withdraw your earlier >>

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-19 Thread Amit Kapila
On Sun, Oct 20, 2013 at 1:26 AM, Gibheer wrote: > On Sat, 19 Oct 2013 12:09:57 +0530 > Amit Kapila wrote: > >> On Thu, Oct 17, 2013 at 8:57 AM, Amit Kapila >> wrote: >> > On Wed, Oct 16, 2013 at 4:30 AM, Gibheer >> > wrote: >> >> On Mon, 14 Oct 2013 11:52:57 +0530 >> >> Amit Kapila wrote: >> >

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-19 Thread Gibheer
On Sat, 19 Oct 2013 12:09:57 +0530 Amit Kapila wrote: > On Thu, Oct 17, 2013 at 8:57 AM, Amit Kapila > wrote: > > On Wed, Oct 16, 2013 at 4:30 AM, Gibheer > > wrote: > >> On Mon, 14 Oct 2013 11:52:57 +0530 > >> Amit Kapila wrote: > >> > >>> On Sun, Oct 13, 2013 at 2:08 PM, Gibheer > >>> wrote

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-18 Thread Amit Kapila
On Thu, Oct 17, 2013 at 8:57 AM, Amit Kapila wrote: > On Wed, Oct 16, 2013 at 4:30 AM, Gibheer wrote: >> On Mon, 14 Oct 2013 11:52:57 +0530 >> Amit Kapila wrote: >> >>> On Sun, Oct 13, 2013 at 2:08 PM, Gibheer >>> wrote: >>> > On Sun, 13 Oct 2013 11:38:17 +0530 >>> > Amit Kapila wrote: >>> > >

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-16 Thread Amit Kapila
On Wed, Oct 16, 2013 at 4:30 AM, Gibheer wrote: > On Mon, 14 Oct 2013 11:52:57 +0530 > Amit Kapila wrote: > >> On Sun, Oct 13, 2013 at 2:08 PM, Gibheer >> wrote: >> > On Sun, 13 Oct 2013 11:38:17 +0530 >> > Amit Kapila wrote: >> > >> >> On Thu, Oct 10, 2013 at 3:17 AM, Gibheer >> >> wrote: >>

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-15 Thread Gibheer
On Mon, 14 Oct 2013 11:52:57 +0530 Amit Kapila wrote: > On Sun, Oct 13, 2013 at 2:08 PM, Gibheer > wrote: > > On Sun, 13 Oct 2013 11:38:17 +0530 > > Amit Kapila wrote: > > > >> On Thu, Oct 10, 2013 at 3:17 AM, Gibheer > >> wrote: > >> > On Mon, 7 Oct 2013 11:39:55 +0530 > >> > Amit Kapila wro

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-15 Thread Josh Berkus
On 10/15/2013 07:36 AM, Robert Haas wrote: > On Tue, Oct 15, 2013 at 10:34 AM, Andres Freund > wrote: >> Josh said we should treat replication connections in a separate "pool" >> from normal database connections, right? So you withdraw your earlier >> objection to that? > > I don't think that's

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-15 Thread Andres Freund
On 2013-10-15 10:36:41 -0400, Robert Haas wrote: > On Tue, Oct 15, 2013 at 10:34 AM, Andres Freund > wrote: > >> But I also agree that making max_wal_senders act as both a minimum and > >> a maximum is no good. +1 to everything Josh Berkus said. > > > > Josh said we should treat replication conn

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-15 Thread Robert Haas
On Tue, Oct 15, 2013 at 10:34 AM, Andres Freund wrote: >> But I also agree that making max_wal_senders act as both a minimum and >> a maximum is no good. +1 to everything Josh Berkus said. > > Josh said we should treat replication connections in a separate "pool" > from normal database connection

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-15 Thread Andres Freund
On 2013-10-15 10:29:58 -0400, Robert Haas wrote: > On Tue, Oct 15, 2013 at 12:13 AM, Amit Kapila wrote: > > If we think this way, then may be we should have max_user_connections > > instead of max_connections and then max_wal_connections. But still > > there are other's like pg_basebackup who need

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-15 Thread Robert Haas
On Tue, Oct 15, 2013 at 12:13 AM, Amit Kapila wrote: > If we think this way, then may be we should have max_user_connections > instead of max_connections and then max_wal_connections. But still > there are other's like pg_basebackup who needs connections and > tomorrow there can be new such entiti

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-14 Thread Amit Kapila
On Mon, Oct 14, 2013 at 11:21 PM, Andres Freund wrote: > On 2013-10-14 10:26:25 -0700, Josh Berkus 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 >> >> n

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-14 Thread Amit Kapila
On Mon, Oct 14, 2013 at 10:56 PM, Josh Berkus 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 think

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-14 Thread Josh Berkus
On 10/14/2013 10:51 AM, Andres Freund wrote: > Imo the complications around this prove my (way earlier) point that it'd > be much better to treat replication connections as something entirely > different to normal SQL connections. There's really not much overlap > here and while there's some philos

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-14 Thread Andres Freund
On 2013-10-14 10:26:25 -0700, Josh Berkus 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

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-14 Thread Josh Berkus
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. Ch

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-13 Thread Amit Kapila
On Sun, Oct 13, 2013 at 2:08 PM, Gibheer wrote: > On Sun, 13 Oct 2013 11:38:17 +0530 > Amit Kapila wrote: > >> On Thu, Oct 10, 2013 at 3:17 AM, Gibheer >> wrote: >> > On Mon, 7 Oct 2013 11:39:55 +0530 >> > Amit Kapila wrote: >> >> Robert Haas wrote: >> >> On Mon, Aug 5, 2013 at 2:04 AM, Andres

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-13 Thread Gibheer
On Sun, 13 Oct 2013 11:38:17 +0530 Amit Kapila wrote: > On Thu, Oct 10, 2013 at 3:17 AM, Gibheer > wrote: > > On Mon, 7 Oct 2013 11:39:55 +0530 > > Amit Kapila wrote: > >> Robert Haas wrote: > >> On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund > >> wrote: > >> >>> Hmm. It seems like this match

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-12 Thread Amit Kapila
On Thu, Oct 10, 2013 at 3:17 AM, Gibheer wrote: > On Mon, 7 Oct 2013 11:39:55 +0530 > Amit Kapila wrote: >> Robert Haas wrote: >> On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund >> wrote: >> >>> Hmm. It seems like this match is making MaxConnections no longer >> >>> mean the maximum number of con

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-11 Thread Gibheer
On Fri, 11 Oct 2013 10:00:51 +0530 Amit Kapila wrote: > On Thu, Oct 10, 2013 at 10:06 PM, Gibheer > wrote: > > On Thu, 10 Oct 2013 09:55:24 +0530 > > Amit Kapila wrote: > > > >> On Thu, Oct 10, 2013 at 3:17 AM, Gibheer > >> wrote: > >> > On Mon, 7 Oct 2013 11:39:55 +0530 > >> > Amit Kapila wr

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-10 Thread Amit Kapila
On Thu, Oct 10, 2013 at 10:06 PM, Gibheer wrote: > On Thu, 10 Oct 2013 09:55:24 +0530 > Amit Kapila wrote: > >> On Thu, Oct 10, 2013 at 3:17 AM, Gibheer >> wrote: >> > On Mon, 7 Oct 2013 11:39:55 +0530 >> > Amit Kapila wrote: >> >> Robert Haas wrote: >> >> On Mon, Aug 5, 2013 at 2:04 AM, Andres

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-10 Thread Gibheer
On Thu, 10 Oct 2013 09:55:24 +0530 Amit Kapila wrote: > On Thu, Oct 10, 2013 at 3:17 AM, Gibheer > wrote: > > On Mon, 7 Oct 2013 11:39:55 +0530 > > Amit Kapila wrote: > >> Robert Haas wrote: > >> On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund > >> wrote: > >> >>> Hmm. It seems like this match

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-10 Thread Mike Blackwell
I'd received an email from Gibheer suggesting it be move due to lack of time to work on it. I can certainly move it back if that's no longer the case. On Oct 9, 2013, at 23:25, Amit Kapila wrote: > On Thu, Oct 10, 2013 at 3:17 AM, Gibheer wrote: > On Mon, 7 Oct 2013 11:39:55 +0530 > Amit

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-09 Thread Amit Kapila
On Thu, Oct 10, 2013 at 3:17 AM, Gibheer wrote: > On Mon, 7 Oct 2013 11:39:55 +0530 > Amit Kapila wrote: >> Robert Haas wrote: >> On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund >> wrote: >> >>> Hmm. It seems like this match is making MaxConnections no longer >> >>> mean the maximum number of con

Re: [HACKERS] Patch for reserved connections for replication users

2013-10-09 Thread Gibheer
On Mon, 7 Oct 2013 11:39:55 +0530 Amit Kapila wrote: > Robert Haas wrote: > On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund > wrote: > >>> Hmm. It seems like this match is making MaxConnections no longer > >>> mean the maximum number of connections, but rather the maximum > >>> number of non-repli

Re: [HACKERS] Patch for reserved connections for replication users

2013-08-08 Thread Robert Haas
On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund wrote: >> Hmm. It seems like this match is making MaxConnections no longer mean >> the maximum number of connections, but rather the maximum number of >> non-replication connections. I don't think I support that >> definitional change, and I'm kinda

Re: [HACKERS] Patch for reserved connections for replication users

2013-08-04 Thread Andres Freund
On 2013-08-02 08:16:15 -0400, Robert Haas wrote: > On Tue, Jul 30, 2013 at 3:10 AM, Gibheer wrote: > > 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 wou

Re: [HACKERS] Patch for reserved connections for replication users

2013-08-04 Thread Gibheer
On Fri, 2 Aug 2013 08:16:15 -0400 Robert Haas wrote: > On Tue, Jul 30, 2013 at 3:10 AM, Gibheer > wrote: > > 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 a

Re: [HACKERS] Patch for reserved connections for replication users

2013-08-02 Thread Robert Haas
On Tue, Jul 30, 2013 at 3:10 AM, Gibheer wrote: > 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

Re: [HACKERS] Patch for reserved connections for replication users

2013-07-30 Thread Gibheer
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

[HACKERS] Patch for reserved connections for replication users

2013-07-11 Thread Gibheer
Hi, this patch introduces a new configuration flag replication_reserved_connections to reserve connection slots for replication in the same way superuser_reserved_connections works for superusers. This helps in cases where the application opens connections until max_connections is reached. A slav