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 and...@2ndquadrant.com wrote: Josh said we should treat replication connections in a separate pool from normal database connections, right? So you withdraw your

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

2013-10-19 Thread Amit Kapila
On Thu, Oct 17, 2013 at 8:57 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Oct 16, 2013 at 4:30 AM, Gibheer gibh...@zero-knowledge.org wrote: On Mon, 14 Oct 2013 11:52:57 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Sun, Oct 13, 2013 at 2:08 PM, Gibheer

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 amit.kapil...@gmail.com wrote: On Thu, Oct 17, 2013 at 8:57 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Oct 16, 2013 at 4:30 AM, Gibheer gibh...@zero-knowledge.org wrote: On Mon, 14 Oct 2013 11:52:57 +0530 Amit Kapila

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 gibh...@zero-knowledge.org wrote: On Sat, 19 Oct 2013 12:09:57 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Oct 17, 2013 at 8:57 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Oct 16, 2013 at 4:30 AM, Gibheer

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 gibh...@zero-knowledge.org wrote: On Mon, 14 Oct 2013 11:52:57 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Sun, Oct 13, 2013 at 2:08 PM, Gibheer gibh...@zero-knowledge.org wrote: On Sun, 13 Oct 2013 11:38:17 +0530 Amit Kapila

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 amit.kapil...@gmail.com 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

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 amit.kapil...@gmail.com 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

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 and...@2ndquadrant.com 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

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 and...@2ndquadrant.com 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

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 and...@2ndquadrant.com 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

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 amit.kapil...@gmail.com wrote: On Sun, Oct 13, 2013 at 2:08 PM, Gibheer gibh...@zero-knowledge.org wrote: On Sun, 13 Oct 2013 11:38:17 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 3:17 AM, Gibheer

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

2013-10-14 Thread Amit Kapila
On Sun, Oct 13, 2013 at 2:08 PM, Gibheer gibh...@zero-knowledge.org wrote: On Sun, 13 Oct 2013 11:38:17 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 3:17 AM, Gibheer gibh...@zero-knowledge.org wrote: On Mon, 7 Oct 2013 11:39:55 +0530 Amit Kapila

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. Changing

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/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

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 j...@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

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 and...@2ndquadrant.com 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

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

2013-10-13 Thread Amit Kapila
On Thu, Oct 10, 2013 at 3:17 AM, Gibheer gibh...@zero-knowledge.org wrote: On Mon, 7 Oct 2013 11:39:55 +0530 Amit Kapila amit.kapil...@gmail.com wrote: Robert Haas wrote: On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund andres(at)2ndquadrant(dot)com wrote: Hmm. It seems like this match is

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 amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 3:17 AM, Gibheer gibh...@zero-knowledge.org wrote: On Mon, 7 Oct 2013 11:39:55 +0530 Amit Kapila amit.kapil...@gmail.com 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-11 Thread Gibheer
On Fri, 11 Oct 2013 10:00:51 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 10:06 PM, Gibheer gibh...@zero-knowledge.org wrote: On Thu, 10 Oct 2013 09:55:24 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 3:17 AM, Gibheer

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 amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 3:17 AM, Gibheer gibh...@zero-knowledge.org

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 amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 3:17 AM, Gibheer gibh...@zero-knowledge.org wrote: On Mon, 7 Oct 2013 11:39:55 +0530 Amit Kapila amit.kapil...@gmail.com 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 Amit Kapila
On Thu, Oct 10, 2013 at 10:06 PM, Gibheer gibh...@zero-knowledge.org wrote: On Thu, 10 Oct 2013 09:55:24 +0530 Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Oct 10, 2013 at 3:17 AM, Gibheer gibh...@zero-knowledge.org wrote: On Mon, 7 Oct 2013 11:39:55 +0530 Amit Kapila

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 amit.kapil...@gmail.com wrote: Robert Haas wrote: On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund andres(at)2ndquadrant(dot)com wrote: Hmm. It seems like this match is making MaxConnections no longer mean the maximum number of connections, but

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 gibh...@zero-knowledge.org wrote: On Mon, 7 Oct 2013 11:39:55 +0530 Amit Kapila amit.kapil...@gmail.com wrote: Robert Haas wrote: On Mon, Aug 5, 2013 at 2:04 AM, Andres Freund andres(at)2ndquadrant(dot)com wrote: Hmm. It seems like this match is

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 and...@2ndquadrant.com 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,

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

2013-08-05 Thread Andres Freund
On 2013-08-02 08:16:15 -0400, Robert Haas wrote: On Tue, Jul 30, 2013 at 3:10 AM, Gibheer gibh...@zero-knowledge.org 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

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 robertmh...@gmail.com wrote: On Tue, Jul 30, 2013 at 3:10 AM, Gibheer gibh...@zero-knowledge.org 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

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 gibh...@zero-knowledge.org 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

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

[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