Re: [HACKERS] Performance improvement for joins where outer side is unique

2015-03-20 Thread David Rowley
On 20 March 2015 at 16:11, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: I think this satisfies your wish and implemented in non exhaustive-seearch-in-jointree manner. It still don't have regressions for itself but I don't see siginificance in adding it so much... This seems

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-20 Thread Peter Geoghegan
On Fri, Mar 20, 2015 at 2:39 AM, Andreas Karlsson andr...@proxel.se wrote: On 03/20/2015 10:32 AM, Andres Freund wrote: Pushed with that additional change. Let's see if the buildfarm thinks. Thanks for the feature. Thanks to you and all the reviewers for helping me out with it. Indeed.

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-20 Thread Andres Freund
On 2015-03-20 00:49:07 +0100, Andreas Karlsson wrote: On 03/19/2015 07:08 PM, Andres Freund wrote: Working on committing this: Nice fixes. Sorry about forgetting numericvar_to_int*. As for the reviewers those lists look pretty much correct. David Rowley should probably be added to the

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-03-20 Thread Andres Freund
On 2015-02-21 16:09:02 -0500, Andrew Dunstan wrote: I think all the outstanding issues are fixed in this patch. Do you plan to push this? I don't see a benefit in delaying things any further... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-20 Thread Andreas Karlsson
On 03/20/2015 10:32 AM, Andres Freund wrote: Pushed with that additional change. Let's see if the buildfarm thinks. Thanks for the feature. Thanks to you and all the reviewers for helping me out with it. Andreas -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Amit Kapila
On Thu, Mar 19, 2015 at 8:53 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Mar 18, 2015 at 9:31 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 9:48 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 2:26 AM, Noah Misch n...@leadboat.com

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Max Filippov
On Fri, Mar 20, 2015 at 5:20 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Max == Max Filippov jcmvb...@gmail.com writes: Max Sorry, I must be not clear enough: why checking compiler/linker Max output instead of checking their exit code or presence of produced Max object/ executable

Re: [HACKERS] GSoC - Idea Discussion

2015-03-20 Thread hitesh ramani
Hello devs, Thank you so much for the feedback, to answer to your questions: Tomas:So you've created an array of 1M integers, and it's 7x faster on GPU compared to pg_qsort(), correct? No, I meant general sorting, not on pg_qsort() Well, it might surprise you, but PostgreSQL almost never sorts

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Thom Brown
On 20 March 2015 at 11:21, Dmitry Dolgov 9erthali...@gmail.com wrote: Perhaph it's my misunderstanding, but this would seem to be more of an intersection operation on keys rather than a delete. Hm...why? We remove all elements, which are contains in the first and second jsonb (f: [4, 5] in

Re: [HACKERS] btree_gin and ranges

2015-03-20 Thread Alvaro Herrera
Teodor Sigaev wrote: Teodor's patch could use some more comments. The STOP_SCAN/MATCH_SCAN/CONT_SCAN macros are a good idea, but they probably should go into src/include/access/gin.h so that they can be used in all compare_partial implementations. STOP_SCAN/MATCH_SCAN/CONT_SCAN macros are

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Max Filippov
On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: We don't want every link step producing a useless warning. Ideally, make -s would print nothing whatsoever; to the extent that tools produce unsuppressable routine chatter, that's evil because it makes it harder to notice

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Dmitry Dolgov
Perhaph it's my misunderstanding, but this would seem to be more of an intersection operation on keys rather than a delete. Hm...why? We remove all elements, which are contains in the first and second jsonb (f: [4, 5] in this case) from the first one. Could there be a corresponding jsonb_except

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 05:50:03PM -0700, David G. Johnston wrote: ​I'm not sure that this particular feature of the standard is something we should encourage. Its actually quite useful in this situation, and so maybe the novelty is just making me nervous,​ but the only reason I know of this

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-20 Thread Andrew Gierth
Peter == Peter Geoghegan p...@heroku.com writes: Peter Attached is a revision of this patch, that I'm calling v2. What Peter do you think, Andrew? No. is I think the best summary of my response. I strongly suggest whichever committer ends up looking at this consider my original version

Re: [HACKERS] Patch: Add launchd Support

2015-03-20 Thread David E. Wheeler
On Mar 19, 2015, at 8:12 PM, Bruce Momjian br...@momjian.us wrote: Where are we on this? I suggested this plist: dict keyDisabled/key false/ keyLabel/key stringorg.postgresql.postgresql/string keyUserName/key stringpostgres/string

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-20 Thread Jim Nasby
On 3/20/15 9:44 AM, Kevin Grittner wrote: Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Oct 20, 2014 at 03:10:50PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Sun, Oct 19, 2014 at 12:27 PM, Tom

Re: [HACKERS] GSoC - Idea Discussion

2015-03-20 Thread Kouhei Kaigai
KaiGai Kohei: It seems to me you are a little bit optimistic. Unlike CPU code, GPU-Sorting logic has to reference device memory space, so all the data to be compared needs to be transferred to GPU devices. Any pointer on host address space is not valid on GPU calculation. Amount of device

Re: [HACKERS] GSSAPI, SSPI - include_realm default

2015-03-20 Thread Bruce Momjian
On Tue, Dec 9, 2014 at 05:38:25PM -0500, Stephen Frost wrote: My comment that include_realm is supported back to 8.4 was because there is an expectation that a pg_hba.conf file can be used unchanged across several major releases. So when 9.5 comes out and people update their pg_hba.conf

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Jim Nasby
On 3/20/15 2:49 PM, Stephen Frost wrote: How about a big warning around fsync and make it more indepenent from the options around it? +1, and the same for full_page_writes and wal_sync_method. I think that's the best we can do at this point. As for why; Postgres already has a big reputation

Re: [HACKERS] Patch: Add launchd Support

2015-03-20 Thread Jim Nasby
On 3/20/15 6:11 PM, David E. Wheeler wrote: keyProgramArguments/key array string/usr/local/pgsql/bin/postgres/string string-D/string string/usr/local/pgsql/data/string /array Hrm, would /var/db/postgres be better? I'm not

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
On Friday, March 20, 2015, Bruce Momjian br...@momjian.us wrote: On Fri, Mar 20, 2015 at 05:50:03PM -0700, David G. Johnston wrote: ​I'm not sure that this particular feature of the standard is something we should encourage. Its actually quite useful in this situation, and so maybe the

Re: [HACKERS] Change of pg_ctl's default shutdown method

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 6:19 PM, Bruce Momjian br...@momjian.us wrote: I have not re-ordered the shutdown method options because I am trying to keep the list logical, from least to most severe, so smart is still listed first. It is odd that the default is the middle option, but I don't see

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 3:26 PM, Joshua D. Drake j...@commandprompt.com wrote: Fair enough. I am not going to name names but over the years (and just today) I ran into another user that corrupted their database by turning off fsync. My experience is different than yours: I haven't found this

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-20 Thread Jim Nasby
On 3/20/15 2:48 PM, Pavel Stehule wrote: 2015-03-20 18:47 GMT+01:00 Tom Lane t...@sss.pgh.pa.us mailto:t...@sss.pgh.pa.us: Alvaro Herrera alvhe...@2ndquadrant.com mailto:alvhe...@2ndquadrant.com writes: Pavel Stehule wrote: I am thinking, so it is ok - it returns a offset,

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
On Fri, Mar 20, 2015 at 1:47 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Bruce Momjian wrote: On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: 1. The layout of the format version is different, with respect to newlines, than the quote version; but while using

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 06:53:29PM -0700, David G. Johnston wrote: On Friday, March 20, 2015, Bruce Momjian br...@momjian.us wrote: On Fri, Mar 20, 2015 at 05:50:03PM -0700, David G. Johnston wrote: ​I'm not sure that this particular feature of the standard is something we

Re: [HACKERS] pg_recvlogical description

2015-03-20 Thread Bruce Momjian
On Mon, Dec 8, 2014 at 11:53:48AM -0300, Euler Taveira wrote: Hi, The pg_recvlogical docs was rewritten but someone forgot to tweak the help description. It is a bit late in the 9.4 cycle but let be consistent. Patch applied --- thank you. -- Bruce Momjian br...@momjian.us

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Max Filippov
On Fri, Mar 20, 2015 at 3:43 PM, Max Filippov jcmvb...@gmail.com wrote: Ok, one more attempt: maybe instead of checking that stderr is empty we could check that stderr has changed in the presence of the option that we test? The patch:

Re: [HACKERS] Patch: Add launchd Support

2015-03-20 Thread David E. Wheeler
On Mar 20, 2015, at 4:21 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 3/20/15 6:11 PM, David E. Wheeler wrote: keyProgramArguments/key array string/usr/local/pgsql/bin/postgres/string string-D/string string/usr/local/pgsql/data/string

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-20 Thread Peter Geoghegan
Attached is a revision of this patch, that I'm calling v2. What do you think, Andrew? I've cut the int32 representation/alternative !USE_FLOAT8_BYVAL encoding scheme entirely, which basically means that 32-bit systems don't get to have this optimization. 64-bit systems have been commonplace now

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-20 Thread Tomas Vondra
Hi, On 20.3.2015 13:43, Fabien COELHO wrote: Hello Robert, The fprintf we are talking about occurs at most once per pgbench transaction, possibly much less when aggregation is activated, and this transaction involves networks exchanges and possibly disk writes on the server. random()

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Jim Nasby
On 3/20/15 6:09 PM, Robert Haas wrote: On Fri, Mar 20, 2015 at 3:26 PM, Joshua D. Drake j...@commandprompt.com wrote: Fair enough. I am not going to name names but over the years (and just today) I ran into another user that corrupted their database by turning off fsync. My experience is

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Jim Nasby
On 3/19/15 9:07 AM, Thom Brown wrote: jsonb_to_array -- {a, 1, b, c, 2, d, 3, 4} Is there a use-case for the example you've given above, where you take JSON containing objects and arrays, and flatten them out into a

Re: [HACKERS] Incorrect comment in tablecmds.c

2015-03-20 Thread Bruce Momjian
On Thu, Oct 23, 2014 at 06:29:07PM +0900, Etsuro Fujita wrote: I don't think that the lock level mentioned in the following comment in MergeAttributes() in tablecmds.c is right, since that that function has opened the relation with ShareUpdateExclusiveLock, not with AccessShareLock. Patch

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-20 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Oct 20, 2014 at 03:10:50PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Sun, Oct 19, 2014 at 12:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: I've

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Andres Freund
Hi, On 2015-03-20 03:14:48 +0300, Max Filippov wrote: and the toolchain emits the following warning at linking step: libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead. FWIW, I think emitting such errors at link time is utterly pointless and rather annoying. I

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Alvaro Herrera
Thom Brown wrote: On 18 March 2015 at 16:01, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 9:48 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 2:26 AM, Noah Misch n...@leadboat.com wrote: Neither that rule, nor its variant downthread, would hurt

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Alvaro Herrera
By the way, acx-pthread.m4 has an outdated link to upstream acx_pthread.m4. The correct link is http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=history;f=m4/ax_pthread.m4 -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Dmitry Dolgov
Would this also be the case for this function?... # jsonb_add_to_path('{b: {c: [d, f]}}'::jsonb, {b, c}::text[], '{g:4}'::jsonb); jsonb_add_to_path {b: {c: [d, f, {g: 4}]}} Yes, sure (the similar logic already implemented for the jsonb_concat).

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Andres Freund
On 2015-03-20 10:23:51 -0300, Alvaro Herrera wrote: Andres Freund wrote: FWIW, I think emitting such errors at link time is utterly pointless and rather annoying. I can see a point of emitting them them when compiling code that uses deprecated functions. But we quite obviously can't do

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Alvaro Herrera
Andres Freund wrote: On 2015-03-20 10:23:51 -0300, Alvaro Herrera wrote: Andres Freund wrote: FWIW, I think emitting such errors at link time is utterly pointless and rather annoying. I can see a point of emitting them them when compiling code that uses deprecated functions. But we

Re: [HACKERS] snapshot too large error when initializing logical replication (9.4)

2015-03-20 Thread Bruce Momjian
On Mon, Nov 17, 2014 at 03:52:38PM +0100, Andres Freund wrote: On 2014-11-17 11:51:54 -0300, Alvaro Herrera wrote: Andres Freund wrote: Hi, On 2014-10-25 18:09:36 -0400, Steve Singer wrote: I sometimes get the error snapshot too large from my logical replication walsender

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 13:16, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Thom Brown wrote: On 18 March 2015 at 16:01, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 9:48 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 2:26 AM, Noah Misch

[HACKERS] [PATCH] Compare linker/compiler output with their default output

2015-03-20 Thread Max Filippov
linker and compiler may have noisy output by default, making acx_pthread.m4 believe that pthread options that it tries are ignored as invalid. Record default compiler and linker output and see if adding pthread option changes that, instead of assuming that linker and compiler are silent by

Re: [HACKERS] printing table in asciidoc with psql

2015-03-20 Thread Bruce Momjian
On Wed, Dec 3, 2014 at 03:52:30PM +0900, Michael Paquier wrote: I see a trailing spaces, but I don't see a described effect. Please, can you send some more specific test case? This formatting problem is trivial to reproduce: =# create table foo (); CREATE TABLE Time: 9.826 ms =# \d

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Alvaro Herrera
Andres Freund wrote: Hi, On 2015-03-20 03:14:48 +0300, Max Filippov wrote: and the toolchain emits the following warning at linking step: libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead. FWIW, I think emitting such errors at link time is utterly

Re: [HACKERS] POLA violation with \c service=

2015-03-20 Thread David Fetter
On Fri, Feb 27, 2015 at 08:42:29AM -0800, David Fetter wrote: On Mon, Feb 23, 2015 at 05:56:12PM -0300, Alvaro Herrera wrote: David Fetter wrote: My thinking behind this was that the patch is a bug fix and intended to be back-patched, so I wanted to mess with as little

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-20 Thread Fabien COELHO
Hello Robert, The fprintf we are talking about occurs at most once per pgbench transaction, possibly much less when aggregation is activated, and this transaction involves networks exchanges and possibly disk writes on the server. random() was occurring four times per transaction rather than

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Max Filippov
On Fri, Mar 20, 2015 at 3:05 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 7:01 AM, Max Filippov jcmvb...@gmail.com wrote: On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: We don't want every link step producing a useless warning. Ideally, make -s

[HACKERS] Re: [BUGS] BUG #11805: Missing SetServiceStatus call during service shutdown in pg_ctl (Windows only)

2015-03-20 Thread Bruce Momjian
On Tue, Oct 28, 2014 at 07:02:41AM +, krystian.bi...@gmail.com wrote: The following bug has been logged on the website: Bug reference: 11805 Logged by: Krystian Bigaj Email address: krystian.bi...@gmail.com PostgreSQL version: 9.3.5 Operating system: Windows 7 Pro

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 13:55, Thom Brown t...@linux.com wrote: On 20 March 2015 at 13:16, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Thom Brown wrote: On 18 March 2015 at 16:01, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 9:48 AM, Robert Haas robertmh...@gmail.com

Re: [HACKERS] [PATCH] two-arg current_setting() with fallback

2015-03-20 Thread David Christensen
On Mar 19, 2015, at 6:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: David Christensen da...@endpoint.com writes: The two-arg form of the current_setting() function will allow a fallback value to be returned instead of throwing an error when an unknown GUC is provided. This would come in most

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown t...@linux.com wrote: 2015-03-20 14:19:31 GMT [4273]: [78-1] user=,db=,client= DEBUG: server process (PID 4285) was terminated by signal 11: Segmentation fault Any chance you can get us a stack backtrace of this crash? -- Robert Haas EnterpriseDB:

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 11:08 AM, Thom Brown t...@linux.com wrote: On 20 March 2015 at 15:02, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown t...@linux.com wrote: 2015-03-20 14:19:31 GMT [4273]: [78-1] user=,db=,client= DEBUG: server process (PID 4285)

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 15:02, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown t...@linux.com wrote: 2015-03-20 14:19:31 GMT [4273]: [78-1] user=,db=,client= DEBUG: server process (PID 4285) was terminated by signal 11: Segmentation fault Any chance you can

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
On Thu, Mar 19, 2015 at 6:49 PM, Bruce Momjian br...@momjian.us wrote: On Thu, Mar 19, 2015 at 06:05:52PM -0700, David G. Johnston wrote: On Thu, Mar 19, 2015 at 5:18 PM, Bruce Momjian br...@momjian.us wrote: ​​ There are other places later in the docs where we explain all the quote*

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread David G. Johnston
​Looking at ​ http://momjian.us/tmp/pgsql/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN The paired example at the top of the patch has two things worth considering. 1. The layout of the format version is different, with respect to newlines, than the quote version; but while using

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Michael Paquier
On Sat, Mar 21, 2015 at 2:47 AM, Peter Geoghegan p...@heroku.com wrote: On Fri, Mar 20, 2015 at 9:52 AM, Joshua D. Drake j...@commandprompt.com wrote: There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Does it

Re: [HACKERS] double vacuum in initdb

2015-03-20 Thread Bruce Momjian
On Thu, Dec 11, 2014 at 08:35:43PM -0500, Peter Eisentraut wrote: On 12/11/14 11:44 AM, Kevin Grittner wrote: We want to finish with VACUUM FREEZE without the FULL, unless we don't care about missing visibility maps and free space maps. I have create the attached initdb patch to update this.

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-20 Thread Peter Geoghegan
On Fri, Mar 20, 2015 at 7:10 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Peter Other than that, I've tried to keep things closer to the text Peter opclass. For example, the cost model now has a few debugging Peter traces (disabled by default). I have altered the ad-hoc cost Peter

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-20 Thread Robert Haas
On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian br...@momjian.us wrote: On Mon, Oct 20, 2014 at 03:10:50PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Sun, Oct 19, 2014 at 12:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: I've certainly objected to it in the past, but I

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 7:01 AM, Max Filippov jcmvb...@gmail.com wrote: On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: We don't want every link step producing a useless warning. Ideally, make -s would print nothing whatsoever; to the extent that tools produce

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 18 March 2015 at 16:01, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 9:48 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Mar 17, 2015 at 2:26 AM, Noah Misch n...@leadboat.com wrote: Neither that rule, nor its variant downthread, would hurt operator authors too

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 08:05:48AM -0400, Robert Haas wrote: On Fri, Mar 20, 2015 at 7:01 AM, Max Filippov jcmvb...@gmail.com wrote: On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: We don't want every link step producing a useless warning. Ideally, make -s would print

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 05:47:49PM -0300, Alvaro Herrera wrote: Bruce Momjian wrote: On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: 1. The layout of the format version is different, with respect to newlines, than the quote version; but while using newlines for

Re: [HACKERS] Typos in CREATE TABLE doc

2015-03-20 Thread Bruce Momjian
On Thu, Nov 13, 2014 at 08:30:49PM +0900, Etsuro Fujita wrote: (2014/11/13 20:07), Heikki Linnakangas wrote: On 11/13/2014 12:45 PM, Etsuro Fujita wrote: It seems to me there are typos in the reference page for CREATE TABLE. The structure of the sentence is a bit funky, but it seems

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Alvaro Herrera
Bruce Momjian wrote: On Fri, Mar 20, 2015 at 05:47:49PM -0300, Alvaro Herrera wrote: BTW very long lines are undesirable because they are truncated in the PDF output. True, but the length was only 95 characters --- is that too long for our PDFs? I built some PDFs when I did the ALTER

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 06:05:35PM -0300, Alvaro Herrera wrote: Bruce Momjian wrote: On Fri, Mar 20, 2015 at 05:47:49PM -0300, Alvaro Herrera wrote: BTW very long lines are undesirable because they are truncated in the PDF output. True, but the length was only 95 characters --- is

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-20 Thread Andrew Gierth
Robert == Robert Haas robertmh...@gmail.com writes: Then maybe stderr tests should grep output for a specific option, the one we're currently testing, not just any noise? Robert That sounds awfully fragile to me. It can't really be safe to Robert assume we know precisely what the warning

Re: [HACKERS] inherit support for foreign tables

2015-03-20 Thread Tom Lane
Etsuro Fujita fujita.ets...@lab.ntt.co.jp writes: I noticed that the latter disallows TRUNCATE on inheritance trees that contain at least one child foreign table. But I think it would be better to allow it, with the semantics that we quietly ignore the child foreign tables and apply the

[HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Tom Lane
My Salesforce colleagues noticed some tests flapping as a result of table CHECK constraints not always being enforced in the same order; ie, if a tuple insertion/update violates more than one CHECK constraint, it's not deterministic which one is reported. This is evidently because relcache.c's

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Peter Geoghegan
On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: We could fix it by, say, having CheckConstraintFetch() sort the constraints by name after loading them. What not by OID, as with indexes? Are you suggesting that this would become documented behavior? -- Peter Geoghegan

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Tom Lane
Joshua D. Drake j...@commandprompt.com writes: There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Evidence please. Does it make sense to remove fsync (and possibly full_page_writes) from such a visible

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-20 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Pavel Stehule wrote: I am thinking, so it is ok - it returns a offset, not position. So you can't use it as a subscript? That sounds unfriendly. Almost every function using this will be subtly broken. I concur; perhaps offset was the design

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Peter Geoghegan
On Fri, Mar 20, 2015 at 9:52 AM, Joshua D. Drake j...@commandprompt.com wrote: There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Does it make sense to remove fsync (and possibly full_page_writes) from such a

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 1:24 PM, Thom Brown t...@linux.com wrote: OK, thanks. That looks like it's probably the fault of parallel seq scan patch rather than this one. It would help if you could build with debug symbols so that we can see line numbers and arguments. Sure. Program received

Re: [HACKERS] [PATCH] two-arg current_setting() with fallback

2015-03-20 Thread David Christensen
On Mar 20, 2015, at 11:10 AM, David G. Johnston david.g.johns...@gmail.com wrote: On Fri, Mar 20, 2015 at 9:04 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 10:54 AM, David Christensen da...@endpoint.com wrote: In that case, the other thought I had here is that

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 15:25, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 11:08 AM, Thom Brown t...@linux.com wrote: On 20 March 2015 at 15:02, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown t...@linux.com wrote: 2015-03-20 14:19:31 GMT

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-20 Thread Alvaro Herrera
Pavel Stehule wrote: 2015-03-20 17:49 GMT+01:00 Dean Rasheed dean.a.rash...@gmail.com: There's an issue when the array's lower bound isn't 1: select array_offset('[2:4]={1,2,3}'::int[], 1); array_offset -- 1 (1 row) whereas I would expect this to

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-20 Thread Pavel Stehule
2015-03-20 18:29 GMT+01:00 Alvaro Herrera alvhe...@2ndquadrant.com: Pavel Stehule wrote: 2015-03-20 17:49 GMT+01:00 Dean Rasheed dean.a.rash...@gmail.com: There's an issue when the array's lower bound isn't 1: select array_offset('[2:4]={1,2,3}'::int[], 1); array_offset

[HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Joshua D. Drake
Hello, There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Does it make sense to remove fsync (and possibly full_page_writes) from such a visible place as postgresql.conf? I don't think we should remove the

Re: [HACKERS] [PATCH] two-arg current_setting() with fallback

2015-03-20 Thread David G. Johnston
On Fri, Mar 20, 2015 at 9:04 AM, Robert Haas robertmh...@gmail.com wrote: On Fri, Mar 20, 2015 at 10:54 AM, David Christensen da...@endpoint.com wrote: In that case, the other thought I had here is that we change the function signature of current_setting() to be a two-arg form where the

Re: [HACKERS] [PATCH] two-arg current_setting() with fallback

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 10:54 AM, David Christensen da...@endpoint.com wrote: In that case, the other thought I had here is that we change the function signature of current_setting() to be a two-arg form where the second argument is a boolean throw_error, with a default argument of true to

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-20 Thread Dean Rasheed
On 18 March 2015 at 19:03, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Pushed after adding error checks there and fixing the docs to match. Please verify. There's an issue when the array's lower bound isn't 1: select array_offset('[2:4]={1,2,3}'::int[], 1); array_offset --

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-20 Thread Pavel Stehule
2015-03-20 17:49 GMT+01:00 Dean Rasheed dean.a.rash...@gmail.com: On 18 March 2015 at 19:03, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Pushed after adding error checks there and fixing the docs to match. Please verify. There's an issue when the array's lower bound isn't 1: select

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 08:43:21AM -0700, David G. Johnston wrote: On Thu, Mar 19, 2015 at 6:49 PM, Bruce Momjian br...@momjian.us wrote: It is making a point about nulls and stuff.  There are later queries that use format(). I thought maybe you meant those but your specific mention

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: ​Looking at ​http://momjian.us/tmp/pgsql/plpgsql-statements.html# PLPGSQL-STATEMENTS-EXECUTING-DYN The paired example at the top of the patch has two things worth considering. 1. The layout of the format version is

Re: [HACKERS] Repeatable read and serializable transactions see data committed after tx start

2015-03-20 Thread Bruce Momjian
On Sat, Nov 8, 2014 at 09:53:18PM +0100, Álvaro Hernández Tortosa wrote: On 07/11/14 22:02, Greg Sabino Mullane wrote: Kevin Grittner wrote: I think most people have always assumed that BEGIN starts the transaction and that is the point at which the snapshot is obtained. But there is so

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-20 Thread Alvaro Herrera
Bruce Momjian wrote: On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: 1. The layout of the format version is different, with respect to newlines, than the quote version; but while using newlines for the mandatory concatenation is good having an excessively long format

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: My Salesforce colleagues noticed some tests flapping as a result of table CHECK constraints not always being enforced in the same order; ie, if a tuple insertion/update violates more than one CHECK constraint, it's not deterministic which one is reported.

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Joshua D. Drake
On 03/20/2015 10:45 AM, Tom Lane wrote: Joshua D. Drake j...@commandprompt.com writes: There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Evidence please. Fair enough. I am not going to name names but over

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan p...@heroku.com wrote: On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: We could fix it by, say, having CheckConstraintFetch() sort the constraints by

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Fabrízio de Royes Mello
On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan p...@heroku.com wrote: On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane t...@sss.pgh.pa.us wrote: We could fix it by, say, having CheckConstraintFetch() sort the constraints by name after loading them. What not by OID, as with indexes? Are you

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Joshua D. Drake
On 03/20/2015 10:47 AM, Peter Geoghegan wrote: On Fri, Mar 20, 2015 at 9:52 AM, Joshua D. Drake j...@commandprompt.com wrote: There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Does it make sense to remove fsync

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Gavin Flower
On 21/03/15 08:15, Tom Lane wrote: My Salesforce colleagues noticed some tests flapping as a result of table CHECK constraints not always being enforced in the same order; ie, if a tuple insertion/update violates more than one CHECK constraint, it's not deterministic which one is reported. This

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Greg Stark
On Fri, Mar 20, 2015 at 7:29 PM, Joshua D. Drake j...@commandprompt.com wrote: I am not going to raise a huge stink or anything but it seems rather simple. ALTER SYSTEM is, if anything, more accessible and easier to do without reading comments and warnings than config files. If it were a

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-20 Thread Pavel Stehule
2015-03-20 18:47 GMT+01:00 Tom Lane t...@sss.pgh.pa.us: Alvaro Herrera alvhe...@2ndquadrant.com writes: Pavel Stehule wrote: I am thinking, so it is ok - it returns a offset, not position. So you can't use it as a subscript? That sounds unfriendly. Almost every function using this

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Stephen Frost
* Joshua D. Drake (j...@commandprompt.com) wrote: On 03/20/2015 10:45 AM, Tom Lane wrote: I would object to that, because it would make it vastly more difficult to use fsync=off easily for development. How so? alter system fsync on/off (meta) restart That seems easier than editing the

Re: [HACKERS] vacuumdb: Help text for --analyze-only.

2015-03-20 Thread Bruce Momjian
On Tue, Nov 18, 2014 at 12:40:51AM +0100, Mats Erik Andersson wrote: Hello there, I observe that the help text of vacuumdb for --analyze, --analyze-only, and --analyze-in-stages could do with a little clarification in order to be self-documenting and thus improve the user experience of

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2015-03-20 Thread Tomas Vondra
Hello, On 20.3.2015 09:33, Kyotaro HORIGUCHI wrote: Hello, Patch 0001 needs changes for OIDs since my patch was committed. The attached is compatible with current master. Thanks. I plan to submit a new version of the patch in a few days, with significant progress in various directions.

  1   2   >