Re: [HACKERS] [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running

2014-07-06 Thread Amit Kapila
On Fri, Jul 4, 2014 at 7:29 PM, MauMau maumau...@gmail.com wrote: Hello, When requesting synchronous replication, each commit of a write transaction will wait until confirmation is received that the commit has been written to the transaction log on disk of both the primary and standby server.

Re: [HACKERS] wrapping in extended mode doesn't work well with default pager

2014-07-06 Thread Sergey Muraviov
Hi. Is there anyone who can commit the patch? 2014-06-25 20:17 GMT+04:00 Pavel Stehule pavel.steh...@gmail.com: 2014-06-24 19:45 GMT+02:00 Sergey Muraviov sergey.k.murav...@gmail.com: Hi. Is there any problem with the patch? I tested it and I had not any issue with last version

[HACKERS] [PATCH] Improve bytea error messages

2014-07-06 Thread Craig Ringer
Hi all After someone reported somewhat less than informative errors in bytea decoding (http://stackoverflow.com/q/24588866/398670) I thought I'd put together a quick patch to improve the errors here. Please merge. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] postgresql.auto.conf and reload

2014-07-06 Thread Christoph Berg
Re: Amit Kapila 2014-07-06 CAA4eK1K=2WCD5ur8c-34NOw+XKg57Q4k0SajwSQXcwciD-=+0...@mail.gmail.com Another could be that during initdb all the uncommented settings be written to postgresql.auto.conf file rather than to postgresql.conf. I think we can do this by changing code in

Re: [HACKERS] 9.4 logical replication - walsender keepalive replies

2014-07-06 Thread Andres Freund
Hi Steve, On 2014-06-30 11:40:50 -0400, Steve Singer wrote: In 9.4 we've the below block of code to walsender.c as /* * We only send regular messages to the client for full decoded * transactions, but a synchronous replication and walsender shutdown * possibly are waiting for a later

Re: [HACKERS] tweaking NTUP_PER_BUCKET

2014-07-06 Thread Tomas Vondra
On 6.7.2014 06:47, Stephen Frost wrote: * Greg Stark (st...@mit.edu) wrote: Last time was we wanted to use bloom filters in hash joins to filter out tuples that won't match any of the future hash batches to reduce the amount of tuples that need to be spilled to disk. However the problem was

Re: [HACKERS] Selectivity estimation for inet operators

2014-07-06 Thread Emre Hasegeli
Thank you for looking at it. In inet_his_inclusion_selec function, When the constant matches only the right side of the bucket, and if it’s a last bucket then it's never considered as partial match candidate. In my opinion, if it's not a last bucket then for next bucket it will become

Re: [HACKERS] tweaking NTUP_PER_BUCKET

2014-07-06 Thread Stephen Frost
Tomas, * Tomas Vondra (t...@fuzzy.cz) wrote: I can't find the thread / test cases in the archives. I've found this thread in hackers: http://www.postgresql.org/message-id/caoezvif-r-ilf966weipk5by-khzvloqpwqurpak3p5fyw-...@mail.gmail.com Can you point me to the right one, please? This:

Re: [HACKERS] Allowing join removals for more join types

2014-07-06 Thread Tom Lane
David Rowley dgrow...@gmail.com writes: On 6 July 2014 03:20, Tom Lane t...@sss.pgh.pa.us wrote: Just to note that I've started looking at this, and I've detected a rather significant omission: there's no check that the join operator has anything to do with the subquery's grouping operator.

Re: [HACKERS] Performance regression: 9.2+ vs. ScalarArrayOpExpr vs. ORDER BY

2014-07-06 Thread Tom Lane
Andrew Gierth and...@tao11.riddles.org.uk writes: commit 807a40c5 fixed a bug in handling of (new in 9.2) functionality of ScalarArrayOpExpr in btree index quals, forcing the results of scans including such a qual to be treated as unordered (because the order can in fact be wrong). However,

Re: [HACKERS] tweaking NTUP_PER_BUCKET

2014-07-06 Thread Tomas Vondra
On 6.7.2014 17:57, Stephen Frost wrote: Tomas, * Tomas Vondra (t...@fuzzy.cz) wrote: I can't find the thread / test cases in the archives. I've found this thread in hackers: http://www.postgresql.org/message-id/caoezvif-r-ilf966weipk5by-khzvloqpwqurpak3p5fyw-...@mail.gmail.com Can you

[HACKERS] Re: [COMMITTERS] pgsql: Fix decoding of MULTI_INSERTs when rows other than the last are

2014-07-06 Thread Andres Freund
Hi, On 2014-07-06 14:01:11 +, Andres Freund wrote: Fix decoding of MULTI_INSERTs when rows other than the last are toasted. When decoding the results of a HEAP2_MULTI_INSERT (currently only generated by COPY FROM) toast columns for all but the last tuple weren't replaced by their actual

Re: [HACKERS] add line number as prompt option to psql

2014-07-06 Thread Sawada Masahiko
On Fri, Jun 20, 2014 at 7:17 PM, Jeevan Chalke jeevan.cha...@enterprisedb.com wrote: Hi Sawada Masahiko, I liked this feature. So I have reviewed it. Changes are straight forward and looks perfect. No issues found with make/make install/initdb/regression. However I would suggest removing

[HACKERS] how to find the order of joins from Explain command XML plan output in PostgreSQL9.3.4

2014-07-06 Thread Rajmohan C
EXPLAIN (format XML) query command in PostgreSQL9.3.4 gives the plan chosen by the optimizer in XML format. In my program, I have to extract certain data about optimizer plan from this XML output. I am using *LibXML2* library for parsing the XML. I had successfully extracted information

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-06 Thread Robert Haas
On Tue, Jul 1, 2014 at 12:22 PM, Robert Haas robertmh...@gmail.com wrote: Since we have a Sun Studio machine in the buildfarm, we shouldn't give up on SPARC completely, but maybe we should only add the cases for sparcv8+ and above? That at least has some chance of getting tested. That we

Re: [HACKERS] Spinlocks and compiler/memory barriers

2014-07-06 Thread Andres Freund
On 2014-07-06 15:02:21 -0400, Robert Haas wrote: On Tue, Jul 1, 2014 at 12:22 PM, Robert Haas robertmh...@gmail.com wrote: Since we have a Sun Studio machine in the buildfarm, we shouldn't give up on SPARC completely, but maybe we should only add the cases for sparcv8+ and above? That at

[HACKERS] Estimating selectivity of predicates involving string pattern matching

2014-07-06 Thread Rajmohan C
I recently upgraded my machine from PostgreSQL8.3 to PostgreSQL9.3.4. After upgrade, when I ran TPC-H queries for performance testing, I could see drastic change in timings. Especially TPC-H query 5 which was taking 4 minutes to execute in pgsql8.3, took just 15 seconds in postgresql9.3.4. I think

Re: [HACKERS] Performance regression: 9.2+ vs. ScalarArrayOpExpr vs. ORDER BY

2014-07-06 Thread Andrew Gierth
Tom == Tom Lane t...@sss.pgh.pa.us writes: I've experimented with the attached patch, which detects when this situation might have occurred and does another pass to try and build ordered scans without the SAOP condition. However, the results may not be quite ideal, because at least in

Re: [HACKERS] Should extension--unpackaged-$ver.sql's \echo use FROM unpackaged;?

2014-07-06 Thread Robert Haas
On Thu, Jul 3, 2014 at 9:03 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jul 3, 2014 at 4:26 AM, Andres Freund and...@2ndquadrant.com wrote: Hi, Fujii noticed that I'd used \echo Use CREATE EXTENSION pg_buffercache to load this file. \quit in an extension upgrade script. That's

Re: [HACKERS] wrapping in extended mode doesn't work well with default pager

2014-07-06 Thread Greg Stark
On Sun, Jul 6, 2014 at 8:40 AM, Sergey Muraviov sergey.k.murav...@gmail.com wrote: Is there anyone who can commit the patch? So what I'm inclined to do here (sigh) is commit it into 9.5 and revert it in 9.4. I think it's an improvement but I there's enough confusion and surprise about the

Re: [HACKERS] postgresql.auto.conf and reload

2014-07-06 Thread Amit Kapila
On Sun, Jul 6, 2014 at 1:57 PM, Christoph Berg c...@df7cb.de wrote: Re: Amit Kapila 2014-07-06 CAA4eK1K=2WCD5ur8c-34NOw+XKg57Q4k0SajwSQXcwciD-=+0...@mail.gmail.com Another could be that during initdb all the uncommented settings be written to postgresql.auto.conf file rather than to

Re: [HACKERS] 9.4 documentation: duplicate paragraph in logical decoding example

2014-07-06 Thread Fujii Masao
On Sun, Jul 6, 2014 at 2:41 AM, Christoph Moench-Tegeder c...@burggraben.net wrote: Hi, while reading the logical decoding docs, I came across a duplicated paragraph in doc/src/sgml/logicaldecoding.sgml - in the current master branch, lines 108 to 115 are the same as lines 117 to 124. I've

Re: [HACKERS] Request for Patch Feedback: Lag Lead Window Functions Can Ignore Nulls

2014-07-06 Thread Jeff Davis
On Wed, 2014-04-16 at 12:50 +0100, Nicholas White wrote: Thanks for the detailed feedback, I'm sorry it took so long to incorporate it. I've attached the latest version of the patch, fixing in particular: I took a good look at this today. * It fails for offset of 0 with IGNORE NULLS. Fixed

Re: [HACKERS] [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running

2014-07-06 Thread Rajeev rastogi
On 04 July 2014 19:29, MauMau Wrote: [How to fix] Of course, adding -o '-c synchronous_commit=local' or -o '-c synchronous_standby_names=' to pg_ctl start in the recovery script would prevent the problem. But isn't there anything to fix in PostgreSQL? I think the doc needs improvement

Re: [HACKERS] [RFC: bug fix?] Connection attempt block forever when the synchronous standby is not running

2014-07-06 Thread Andres Freund
On 2014-07-07 04:20:12 +, Rajeev rastogi wrote: On 04 July 2014 19:29, MauMau Wrote: [How to fix] Of course, adding -o '-c synchronous_commit=local' or -o '-c synchronous_standby_names=' to pg_ctl start in the recovery script would prevent the problem. But isn't there

Re: [HACKERS] 9.4 documentation: duplicate paragraph in logical decoding example

2014-07-06 Thread Andres Freund
On 2014-07-07 12:50:17 +0900, Fujii Masao wrote: On Sun, Jul 6, 2014 at 2:41 AM, Christoph Moench-Tegeder c...@burggraben.net wrote: Hi, while reading the logical decoding docs, I came across a duplicated paragraph in doc/src/sgml/logicaldecoding.sgml - in the current master branch,