[HACKERS] Support for N synchronous standby servers

2014-08-09 Thread Michael Paquier
Hi all, Please find attached a patch to add support of synchronous replication for multiple standby servers. This is controlled by the addition of a new GUC parameter called synchronous_standby_num, that makes server wait for transaction commit on the first N standbys defined in

Re: [HACKERS] PostgreSQL vs oracle doing 1 million sqrts am I doing it wrong?

2014-08-09 Thread Guillaume Lelarge
Hi, Le 9 août 2014 05:57, Ramirez, Danilo danilo.rami...@hmhco.com a écrit : Thanks to all for the great info. We are new to postgresql and this discussion has both instructed us and increased our respect for the database and the community. I am seeing a behavior that I don’t understand and

Re: [HACKERS] bad estimation together with large work_mem generates terrible slow hash joins

2014-08-09 Thread Tomas Vondra
On 20.7.2014 18:29, Tomas Vondra wrote: Attached v9 of the patch. Aside from a few minor fixes, the main change is that this is assumed to be combined with the dense allocation patch. It also rewrites the ExecHashIncreaseNumBuckets to follow the same pattern as ExecHashIncreaseNumBatches

Re: [HACKERS] Proposal to add a QNX 6.5 port to PostgreSQL

2014-08-09 Thread Andres Freund
On 2014-08-04 10:54:25 -0400, Robert Haas wrote: On Thu, Jul 31, 2014 at 9:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Even without that issue, there's no consensus that forcibly making orphan backends exit would be a good thing. (Some people would like to have such an option, but the key

Re: [HACKERS] Reporting the commit LSN at commit time

2014-08-09 Thread Andres Freund
On 2014-08-07 21:02:54 -0400, Tom Lane wrote: Craig Ringer cr...@2ndquadrant.com writes: On 08/08/2014 03:54 AM, Tom Lane wrote: FWIW, I think it's a seriously bad idea to expose LSNs in the protocol at all. What happens five years from now when we switch to some other implementation

Re: [HACKERS] Defining a foreign key with a duplicate column is broken

2014-08-09 Thread Tom Lane
David Rowley dgrowle...@gmail.com writes: On Sat, Aug 9, 2014 at 3:34 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's no need for a new error message I think, because we should just ignore such indexes. After all, there might be a valid matching index later on. hmm, but if the user attempts

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-09 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: On Fri, Aug 8, 2014 at 08:25:04PM -0400, Stephen Frost wrote: * Bruce Momjian (br...@momjian.us) wrote: FYI, pg_upgrade could be taught to refuse to upgrade from earlier 9.4 betas and report the problem JSONB columns. That is *not* a

Re: [HACKERS] Proposal to add a QNX 6.5 port to PostgreSQL

2014-08-09 Thread Andres Freund
On 2014-08-09 14:00:49 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-08-04 10:54:25 -0400, Robert Haas wrote: I believe that multiple people have said multiple times that we should change the behavior so that orphaned backends exit immediately; I think you

Re: [HACKERS] Proposal to add a QNX 6.5 port to PostgreSQL

2014-08-09 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-08-04 10:54:25 -0400, Robert Haas wrote: I believe that multiple people have said multiple times that we should change the behavior so that orphaned backends exit immediately; I think you are the only one defending the current behavior.

Re: [HACKERS] Proposal to add a QNX 6.5 port to PostgreSQL

2014-08-09 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-08-09 14:00:49 -0400, Tom Lane wrote: I don't think it's anywhere near as black-and-white as you guys claim. What it comes down to is whether allowing existing transactions/sessions to finish is more important than allowing new sessions to

Re: [HACKERS] Proposal to add a QNX 6.5 port to PostgreSQL

2014-08-09 Thread Andres Freund
On 2014-08-09 14:09:36 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-08-09 14:00:49 -0400, Tom Lane wrote: I don't think it's anywhere near as black-and-white as you guys claim. What it comes down to is whether allowing existing transactions/sessions to

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-09 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Stephen Frost sfr...@snowman.net writes: Trying to move the header to the end just for the sake of this doesn't strike me as a good solution as it'll make things quite a bit more complicated. Why is that?  How much harder would it be to add a single offset

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-09 Thread Tom Lane
Kevin Grittner kgri...@ymail.com writes: Stephen Frost sfr...@snowman.net writes: Trying to move the header to the end just for the sake of this doesn't strike me as a good solution as it'll make things quite a bit more complicated. Why is that?  How much harder would it be to add a single

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2014-08-09 Thread Peter Geoghegan
On Thu, Aug 7, 2014 at 1:09 AM, Peter Geoghegan p...@heroku.com wrote: On Wed, Aug 6, 2014 at 10:36 PM, Peter Geoghegan p...@heroku.com wrote: This *almost* applies to patched Postgres if you pick a benchmark that is very sympathetic to my patch. To my surprise, work_mem = '10MB' (which

Re: [HACKERS] Reporting the commit LSN at commit time

2014-08-09 Thread Craig Ringer
On 08/10/2014 12:54 AM, Andres Freund wrote: On 2014-08-07 21:02:54 -0400, Tom Lane wrote: Craig Ringer cr...@2ndquadrant.com writes: On 08/08/2014 03:54 AM, Tom Lane wrote: FWIW, I think it's a seriously bad idea to expose LSNs in the protocol at all. What happens five years from now when