Re: [HACKERS] Patch: show relation and tuple infos of a lock to acquire

2014-03-01 Thread Amit Kapila
On Thu, Feb 27, 2014 at 4:14 PM, Christian Kruse christ...@2ndquadrant.com wrote: On 25/02/14 16:11, Robert Haas wrote: Reading this over, I'm not sure I understand why this is a CONTEXT at all and not just a DETAIL for the particular error message that it's supposed to be decorating.

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-03-01 Thread Pavel Stehule
Hello here is a prototype: bash-4.1$ /usr/local/pgsql/bin/psql --help-variables List of some variables (options) for use from command line. Complete list you find in psql section in the PostgreSQL documentation. psql variables: Usage: psql --set=NAME=VALUE or \set NAME VALUE in interactive

[HACKERS] psql: show only failed queries

2014-03-01 Thread Pavel Stehule
Hello I was asked, how can be showed only failed queries in psql. I am thinking, so it is not possible now. But implementation is very simple What do you think about it? bash-4.1$ psql postgres -v ECHO=error -f data.sql INSERT 0 1 Time: 27.735 ms INSERT 0 1 Time: 8.303 ms psql:data.sql:3:

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Stephen Frost
KaiGai, * Kohei KaiGai (kai...@kaigai.gr.jp) wrote: BTW, this kind of discussion looks like a talk with a ghost because we cannot see the new interface according to the parallel execution right now, so we cannot have tangible investigation whether it becomes really serious backward

Re: [HACKERS] gaussian distribution pgbench

2014-03-01 Thread Alvaro Herrera
Seems that in the review so far, Fabien has focused mainly in the mathematical properties of the new random number generation. That seems perfectly fine, but no comment has been made about the chosen UI for the feature. Per the few initial messages in the thread, in the patch as submitted you

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Alvaro Herrera
I didn't check the patch in detail, but it seems to me that both the encode stuff as well as pgrand belong in src/common rather than src/port. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-hackers

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Noah Misch
On Sat, Mar 01, 2014 at 12:48:08PM -0300, Alvaro Herrera wrote: I didn't check the patch in detail, but it seems to me that both the encode stuff as well as pgrand belong in src/common rather than src/port. Since src/common exists only in 9.3 and up, that would mean putting them in different

Re: [HACKERS] trgm regex index peculiarity

2014-03-01 Thread Alexander Korotkov
On Mon, Feb 10, 2014 at 1:01 AM, Tom Lane t...@sss.pgh.pa.us wrote: Alexander Korotkov aekorot...@gmail.com writes: On Thu, Jan 16, 2014 at 3:34 AM, Tom Lane t...@sss.pgh.pa.us wrote: I looked at this patch a bit. It seems like this: + *BLANK_COLOR_SIZE - How much blank character is

Re: [HACKERS] gaussian distribution pgbench

2014-03-01 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Seems that in the review so far, Fabien has focused mainly in the mathematical properties of the new random number generation. That seems perfectly fine, but no comment has been made about the chosen UI for the feature. Per the few initial

[HACKERS] commit fest status and release timeline

2014-03-01 Thread Peter Eisentraut
Status Summary. Needs Review: 36, Waiting on Author: 7, Ready for Committer: 16, Committed: 43, Returned with Feedback: 8, Rejected: 4. Total: 114. We're still on track to achieve about 50% committed patches, which would be similar to the previous few commit fests. So decent job so far. Which

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2014-03-01 Thread Tom Lane
=?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Sat, Jan 18, 2014 at 11:12 PM, Stephen Frost sfr...@snowman.net wrote: Fabrízio, can you clarify the use-case for things like CREATE AGGREGATE to have IF NOT EXISTS rather than OR REPLACE, or if there is a reason why

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Tom Lane
Noah Misch n...@leadboat.com writes: As announced with last week's releases, use of trust authentication in the make check temporary database cluster makes it straightforward to hijack the OS user account involved. The prerequisite is another user account on the same system. The solution we

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Andrew Dunstan
On 03/01/2014 12:29 PM, Tom Lane wrote: In the case of Unix systems, there is a *far* simpler and more portable solution technique, which is to tell the test postmaster to put its socket in some non-world-accessible directory created by the test scaffolding. +1 - I'm all for KISS. Of

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Magnus Hagander
On Sat, Mar 1, 2014 at 7:09 PM, Andrew Dunstan and...@dunslane.net wrote: On 03/01/2014 12:29 PM, Tom Lane wrote: In the case of Unix systems, there is a *far* simpler and more portable solution technique, which is to tell the test postmaster to put its socket in some non-world-accessible

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Noah Misch
On Sat, Mar 01, 2014 at 12:29:38PM -0500, Tom Lane wrote: There are two big problems with the lets-generate-a-random-password approach. Noah acknowledged the portability issue of possibly not having a strong entropy source available. The other issue though is whether doing this doesn't

Re: [HACKERS] commit fest status and release timeline

2014-03-01 Thread Josh Berkus
On 03/01/2014 09:01 AM, Peter Eisentraut wrote: Status Summary. Needs Review: 36, Waiting on Author: 7, Ready for Committer: 16, Committed: 43, Returned with Feedback: 8, Rejected: 4. Total: 114. We're still on track to achieve about 50% committed patches, which would be similar to the

[HACKERS] [PATCH] `pg_dump -Fd` doesn't check write return status...

2014-03-01 Thread Sean Chittenden
The attached patch fixes the case when `pg_dump -Fd …` is called on a partition where write(2) fails for some reason or another. In this case, backup jobs were returning with a successful exit code even though most of the files in the dump directory were all zero length. I haven’t tested this

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2014-03-01 Thread Vik Fearing
On 03/01/2014 12:06 PM, Simon Riggs wrote: On 27 February 2014 08:48, Simon Riggs si...@2ndquadrant.com wrote: On 26 February 2014 15:25, Andres Freund and...@2ndquadrant.com wrote: On 2014-02-26 15:15:00 +, Simon Riggs wrote: On 26 February 2014 13:38, Andres Freund and...@2ndquadrant.com

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: In the case of Unix systems, there is a *far* simpler and more portable solution technique, which is to tell the test postmaster to put its socket in some non-world-accessible directory created by the test scaffolding. Yes, yes, yes. Of course that

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: For a one-off password used locally only, we could also consider just using a guid, and generate it using http://msdn.microsoft.com/en-us/library/windows/desktop/aa379205(v=vs.85).aspx. Not sure if that API is intended to create an unpredictable

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2014-03-01 Thread Tom Lane
=?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Sat, Mar 1, 2014 at 2:11 PM, Tom Lane t...@sss.pgh.pa.us wrote: [ re schema upgrade scenarios ] Why wouldn't COR semantics answer that requirement just as well, if not better? Just because it will replace the

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2014-03-01 Thread Fabrízio de Royes Mello
On Sat, Mar 1, 2014 at 2:11 PM, Tom Lane t...@sss.pgh.pa.us wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Sat, Jan 18, 2014 at 11:12 PM, Stephen Frost sfr...@snowman.net wrote: Fabrízio, can you clarify the use-case for things like CREATE AGGREGATE to

Re: [HACKERS] commit fest status and release timeline

2014-03-01 Thread Vik Fearing
On 03/01/2014 07:50 PM, Josh Berkus wrote: On 03/01/2014 09:01 AM, Peter Eisentraut wrote: Status Summary. Needs Review: 36, Waiting on Author: 7, Ready for Committer: 16, Committed: 43, Returned with Feedback: 8, Rejected: 4. Total: 114. We're still on track to achieve about 50% committed

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Andrew Dunstan
On 03/01/2014 05:10 PM, Tom Lane wrote: One other thought here: is it actually reasonable to expend a lot of effort on the Windows case? I'm not aware that people normally expect a Windows box to have multiple users at all, let alone non-mutually-trusting users. As Stephen said, it's

Re: [HACKERS] proposal: new long psql parameter --on-error-stop

2014-03-01 Thread Fabrízio de Royes Mello
On Sat, Mar 1, 2014 at 5:37 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello here is a prototype: bash-4.1$ /usr/local/pgsql/bin/psql --help-variables List of some variables (options) for use from command line. Complete list you find in psql section in the PostgreSQL documentation.

Re: [HACKERS] Review: Patch FORCE_NULL option for copy COPY in CSV mode

2014-03-01 Thread Andrew Dunstan
On 01/29/2014 10:59 AM, Ian Lawrence Barwick wrote: 2014/1/29 Ian Lawrence Barwick barw...@gmail.com: 2014-01-29 Andrew Dunstan and...@dunslane.net: On 01/28/2014 05:55 AM, Ian Lawrence Barwick wrote: Hi Payal Many thanks for the review, and my apologies for not getting back to you

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Kohei KaiGai
2014-03-01 22:38 GMT+09:00 Stephen Frost sfr...@snowman.net: KaiGai, * Kohei KaiGai (kai...@kaigai.gr.jp) wrote: BTW, this kind of discussion looks like a talk with a ghost because we cannot see the new interface according to the parallel execution right now, so we cannot have tangible

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Stephen Frost
KaiGai, * Kohei KaiGai (kai...@kaigai.gr.jp) wrote: Now we have two options for GPU programming: CUDA or OpenCL. Both of libraries and drivers are provided under the proprietary license, so it does not fit for the core implementation of PostgreSQL, but extensions that shall be installed on

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Kohei KaiGai
2014-03-02 9:51 GMT+09:00 Stephen Frost sfr...@snowman.net: KaiGai, * Kohei KaiGai (kai...@kaigai.gr.jp) wrote: Now we have two options for GPU programming: CUDA or OpenCL. Both of libraries and drivers are provided under the proprietary license, so it does not fit for the core

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Stephen Frost
* Kohei KaiGai (kai...@kaigai.gr.jp) wrote: As you mentioned, it is a headache for packagers, and does not make sense for us if packager disabled the feature that requires proprietary drivers. No, I disagree with that. I don't expect this use-case to be very common to begin with and telling

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Robert Haas
On Wed, Feb 26, 2014 at 3:02 AM, Stephen Frost sfr...@snowman.net wrote: The custom-scan node is intended to perform on regular relations, not only foreign tables. It means a special feature (like GPU acceleration) can perform transparently for most of existing applications. Usually, it

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Robert Haas
On Wed, Feb 26, 2014 at 10:23 AM, Stephen Frost sfr...@snowman.net wrote: * Kouhei Kaigai (kai...@ak.jp.nec.com) wrote: IIUC, his approach was integration of join-pushdown within FDW APIs, however, it does not mean the idea of remote-join is rejected. For my part, trying to consider doing

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Robert Haas
On Fri, Feb 28, 2014 at 10:36 AM, Stephen Frost sfr...@snowman.net wrote: * Kouhei Kaigai (kai...@ak.jp.nec.com) wrote: * Stephen Frost (sfr...@snowman.net) wrote: I don't see how you can be when there hasn't been any discussion that I've seen about how parallel query execution is going to

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Wed, Feb 26, 2014 at 3:02 AM, Stephen Frost sfr...@snowman.net wrote: The line between a foreign table and a local one is becoming blurred already, but still, if this is the goal then I really think the background worker is where you should be

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Robert Haas
On Sat, Mar 1, 2014 at 8:49 PM, Stephen Frost sfr...@snowman.net wrote: This critique seems pretty odd to me. I haven't had the time to look at this patch set, but I don't see why anyone would want to use the background worker facility for GPU acceleration, which is what KaiGai's trying to

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: I don't see that parallelizing Append is any easier than any other problem in this space. There's no parallel I/O facility, so you need a background worker per append branch to wait on I/O. And you have all the problems of making sure that the

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Kohei KaiGai
2014-03-02 10:29 GMT+09:00 Stephen Frost sfr...@snowman.net: * Kohei KaiGai (kai...@kaigai.gr.jp) wrote: As you mentioned, it is a headache for packagers, and does not make sense for us if packager disabled the feature that requires proprietary drivers. No, I disagree with that. I don't

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: For what it's worth, and I can't claim to have all the answers here, this doesn't match my expectation. I think we'll do two kinds of parallelism. One will be parallelism within nodes, like parallel sort or parallel seqscan. Any node we

Re: Custom Scan APIs (Re: [HACKERS] Custom Plan node)

2014-03-01 Thread Kohei KaiGai
2014-03-02 10:38 GMT+09:00 Robert Haas robertmh...@gmail.com: On Wed, Feb 26, 2014 at 10:23 AM, Stephen Frost sfr...@snowman.net wrote: * Kouhei Kaigai (kai...@ak.jp.nec.com) wrote: IIUC, his approach was integration of join-pushdown within FDW APIs, however, it does not mean the idea of

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 03/01/2014 05:10 PM, Tom Lane wrote: BTW, a different problem with the proposed patch is that it changes some test cases in ecpg and contrib/dblink, apparently to avoid session reconnections. That seems likely to me to be losing test coverage.

Re: [HACKERS] commit fest status and release timeline

2014-03-01 Thread Michael Paquier
On Sun, Mar 2, 2014 at 7:43 AM, Vik Fearing vik.fear...@dalibo.com wrote: On 03/01/2014 07:50 PM, Josh Berkus wrote: On 03/01/2014 09:01 AM, Peter Eisentraut wrote: Status Summary. Needs Review: 36, Waiting on Author: 7, Ready for Committer: 16, Committed: 43, Returned with Feedback: 8,

Re: [HACKERS] Patch to add support of IF NOT EXISTS to others CREATE statements

2014-03-01 Thread Fabrízio de Royes Mello
On Sat, Mar 1, 2014 at 7:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: =?ISO-8859-1?Q?Fabr=EDzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Sat, Mar 1, 2014 at 2:11 PM, Tom Lane t...@sss.pgh.pa.us wrote: [ re schema upgrade scenarios ] Why wouldn't COR semantics answer that

Re: [HACKERS] commit fest status and release timeline

2014-03-01 Thread Fabrízio de Royes Mello
On Sun, Mar 2, 2014 at 12:56 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Sun, Mar 2, 2014 at 7:43 AM, Vik Fearing vik.fear...@dalibo.com wrote: On 03/01/2014 07:50 PM, Josh Berkus wrote: On 03/01/2014 09:01 AM, Peter Eisentraut wrote: Status Summary. Needs Review: 36, Waiting

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Noah Misch
On Sat, Mar 01, 2014 at 05:51:46PM -0500, Andrew Dunstan wrote: On 03/01/2014 05:10 PM, Tom Lane wrote: One other thought here: is it actually reasonable to expend a lot of effort on the Windows case? I'm not aware that people normally expect a Windows box to have multiple users at all, let

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Noah Misch
On Sat, Mar 01, 2014 at 09:43:19PM -0500, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 03/01/2014 05:10 PM, Tom Lane wrote: BTW, a different problem with the proposed patch is that it changes some test cases in ecpg and contrib/dblink, apparently to avoid session

Re: [HACKERS] Windows exit code 128 ... it's baaack

2014-03-01 Thread Amit Kapila
On Fri, Feb 28, 2014 at 5:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: I looked at the postmaster log for the ongoing issue on narwhal (to wit, that the contrib/dblink test dies the moment it tries to do anything dblink-y), and looky here what the postmaster has logged: 530fc965.bac:2] LOG:

Re: [HACKERS] Securing make check (CVE-2014-0067)

2014-03-01 Thread Dave Page
On 2 Mar 2014, at 05:20, Noah Misch n...@leadboat.com wrote: On Sat, Mar 01, 2014 at 05:51:46PM -0500, Andrew Dunstan wrote: On 03/01/2014 05:10 PM, Tom Lane wrote: One other thought here: is it actually reasonable to expend a lot of effort on the Windows case? I'm not aware that people