Re: [HACKERS] max_wal_senders must die

2010-10-20 Thread Robert Haas
On Wed, Oct 20, 2010 at 3:40 PM, Greg Stark gsst...@mit.edu wrote: On Wed, Oct 20, 2010 at 6:29 AM, Robert Haas robertmh...@gmail.com wrote: Exactly.  It doesn't take many 3-7% slowdowns to add up to being 50% or 100% slower, and that sucks.  In fact, I'm still not convinced that we were wise

Re: [HACKERS] max_wal_senders must die

2010-10-20 Thread Greg Stark
On Wed, Oct 20, 2010 at 1:12 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Oct 20, 2010 at 3:40 PM, Greg Stark gsst...@mit.edu wrote: On Wed, Oct 20, 2010 at 6:29 AM, Robert Haas robertmh...@gmail.com wrote: Actually, I think the best thing for default_statistics_target might be to

Re: [HACKERS] max_wal_senders must die

2010-10-20 Thread Josh Berkus
Quite. Josh, have you got any evidence showing that the penalty is only 10%? There are cases, such as COPY and ALTER TABLE, where you'd be looking at 2X or worse penalties, because of the existing optimizations that avoid writing WAL at all for operations where a single final fsync can

Re: [HACKERS] max_wal_senders must die

2010-10-20 Thread Robert Haas
On Wed, Oct 20, 2010 at 6:17 PM, Josh Berkus j...@agliodbs.com wrote: Quite.  Josh, have you got any evidence showing that the penalty is only 10%?  There are cases, such as COPY and ALTER TABLE, where you'd be looking at 2X or worse penalties, because of the existing optimizations that avoid

Re: [HACKERS] max_wal_senders must die

2010-10-20 Thread Greg Smith
Josh Berkus wrote: If we could agree on some workloads, I could run some benchmarks. I'm not sure what those would be though, given that COPY and ALTER TABLE aren't generally included in most benchmarks. You can usefully and easily benchmark this by timing a simple pgbench initialization at

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Stefan Kaltenbrunner
Josh Berkus wrote: Hackers, What purpose is served, exactly, by max_wal_senders? In order for a standby to connect, it must have a superuser login, and replication connections must be enabled in pg_hba.conf. How is having one more setting in one more file you have to enable on the master

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Magnus Hagander
On Tue, Oct 19, 2010 at 13:14, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Josh Berkus wrote: Hackers, What purpose is served, exactly, by max_wal_senders? In order for a standby to connect, it must have a superuser login, and replication connections must be enabled in pg_hba.conf.

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Stefan Kaltenbrunner
Magnus Hagander wrote: On Tue, Oct 19, 2010 at 13:14, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Josh Berkus wrote: Hackers, What purpose is served, exactly, by max_wal_senders? In order for a standby to connect, it must have a superuser login, and replication connections must be

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Josh Berkus
Stefan, Dimitri, I disagree - limiting the maximum number of replication connections is important for my usecases. Can you explain more? I clearly don't understand your use case. If we want something fixed *now*, should we perhaps just bump the *default* value for max_wal_senders to 5 or

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Greg Smith
Josh Berkus wrote: Under what bizarre set of circumstances would anyone have runaway connections from replicas to the master? Cloud computing deployments where additional replicas are brought up automatically in response to demand. It's easy to imagine a situation where a standby instance

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Josh Berkus
On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the annoyance here, without dropping the feature (which has uses) or waiting for new development to complete. I'd be in favor of just committing that change right now, before it gets

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the annoyance here, without dropping the feature (which has uses) or waiting for new development to complete.  

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the annoyance here, without dropping the feature (which has uses) or

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Rob Wultsch
On Tue, Oct 19, 2010 at 12:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 3:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Josh Berkus
Yes. This isn't just a numeric parameter; it's also a boolean indicating do I want to pay the overhead to be prepared to be a replication master?. Since this is the first time I've heard of the overhead, it would be hard for me to have taken that into consideration. If there was

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Greg Smith
Josh Berkus wrote: Well, now that you mention it, I also think that hot standby should be the default. Yes, I know about the overhead, but I also think that the number of our users who want easy replication *far* outnumber the users who care about an extra 10% WAL overhead. I think this

[HACKERS] max_wal_senders must die

2010-10-18 Thread Josh Berkus
Hackers, What purpose is served, exactly, by max_wal_senders? In order for a standby to connect, it must have a superuser login, and replication connections must be enabled in pg_hba.conf. How is having one more setting in one more file you have to enable on the master benefitting anyone?

<    1   2