[HACKERS] Why do we allow indexes to contain the same column more than once?

2014-05-01 Thread Greg Stark
Is there some use case for that I'm not seeing? postgres=***# create index tti on tt(i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i); CREATE INDEX Time: 15.891 ms postgres=***# commit; COMMIT Time: 11.191 ms postgres=# \d tt Table public.tt

Re: [HACKERS] Why do we allow indexes to contain the same column more than once?

2014-05-01 Thread Andres Freund
Hi, On 2014-05-01 13:55:46 +0100, Greg Stark wrote: Is there some use case for that I'm not seeing? postgres=***# create index tti on tt(i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i); CREATE INDEX Time: 15.891 ms Can be useful if different opclasses are used for the

Re: [HACKERS] improving \dt++ in psql

2014-05-01 Thread Tom Lane
=?UTF-8?Q?Filip_Rembia=C5=82kowski?= filip.rembialkow...@gmail.com writes: I was (as a long time Pg user) dead sure that psql really sometimes cares about the number of plus signs that you add to meta-command No, it never has done so AFAIK. Can't we have higher levels of verbosiness? I think

Re: [HACKERS] quiet inline configure check misses a step for clang

2014-05-01 Thread Andres Freund
Hi, On 2014-04-03 12:47:00 +0200, Andres Freund wrote: The current quiet inline test doesn't work for clang. As e.g. evidenced in http://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=gulldt=2014-04-03%2007%3A49%3A26stg=configure configure thinks it's not quiet. Which means that

Re: [HACKERS] Successor of MD5 authentication, let's use SCRAM

2014-05-01 Thread Greg Stark
On Fri, Sep 13, 2013 at 5:31 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Sep 12, 2013 at 11:33 AM, Magnus Hagander mag...@hagander.net wrote: Well, undocumented and OpenSSL tend to go hand in hand a lot. Or, well, it might be documented, but not in a useful way. I wouldn't count on

Re: [HACKERS] Why do we allow indexes to contain the same column more than once?

2014-05-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-05-01 13:55:46 +0100, Greg Stark wrote: Is there some use case for that I'm not seeing? Can be useful if different opclasses are used for the individual columns. Other than that I am not seing much use. Yeah. This is more plausible for

Re: [HACKERS] quiet inline configure check misses a step for clang

2014-05-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I still think we really need to fix this. I have three possible solutions: a) Add an external file (in the source tree) that's included in the configure test. b) Have a compiler specific override and specify USE_INLINE there. c) Drop the

Re: [HACKERS] quiet inline configure check misses a step for clang

2014-05-01 Thread Andres Freund
On 2014-05-01 10:10:46 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I still think we really need to fix this. I have three possible solutions: a) Add an external file (in the source tree) that's included in the configure test. b) Have a compiler specific

Re: [HACKERS] Small doc patch for pg_replication_slots

2014-05-01 Thread Thomas Reiss
Le 01/05/2014 04:56, Robert Haas a écrit : On Tue, Apr 29, 2014 at 5:39 AM, Thomas Reiss thomas.re...@dalibo.com wrote: You can find attached a small patch to fix the pg_replication_slots documentation. The slot_type and plugin are not in the appropriate order, slot_name and plugin have a

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-05-01 Thread Kevin Grittner
Jim Nasby j...@nasby.net wrote: In our case this could maybe be handled by simply not incrementing counts when there's no eviction... but I'm more a fan of separate polls/clocks, because that means you can do things like a LFU for active and an LRU for inactive. I have hesitated to mention

Re: [HACKERS] Clock sweep not caching enough B-Tree leaf pages?

2014-05-01 Thread Kevin Grittner
Kevin Grittner kgri...@ymail.com wrote: each connection caused to be held in cache the last page at each level of the index. Apologies for ambiguous terminology there. To be clear: the most recently accessed page at each level of the index. -- Kevin Grittner EDB: http://www.enterprisedb.com

Re: [HACKERS] Display of timestamp in pg_dump custom format

2014-05-01 Thread Bruce Momjian
On Thu, May 1, 2014 at 12:33:51PM +1200, Gavin Flower wrote: On 01/05/14 12:04, Bruce Momjian wrote: On Thu, May 1, 2014 at 08:27:49AM +1200, Gavin Flower wrote: On 01/05/14 02:51, Bruce Momjian wrote: The table of contents for pg_restore -l shows the time the archive was made as local time

[HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Tom Lane
fork_process.c quoth: /* * Flush stdio channels just before fork, to avoid double-output problems. * Ideally we'd use fflush(NULL) here, but there are still a few non-ANSI * stdio libraries out there (like SunOS 4.1.x) that coredump if we do. * Presently stdout and stderr

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Noah Misch
On Thu, May 01, 2014 at 12:13:28PM -0400, Tom Lane wrote: fork_process.c quoth: /* * Flush stdio channels just before fork, to avoid double-output problems. * Ideally we'd use fflush(NULL) here, but there are still a few non-ANSI * stdio libraries out there (like SunOS

Re: [HACKERS] quiet inline configure check misses a step for clang

2014-05-01 Thread Andres Freund
On 2014-05-01 10:10:46 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I still think we really need to fix this. I have three possible solutions: a) Add an external file (in the source tree) that's included in the configure test. b) Have a compiler specific

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Thu, May 01, 2014 at 12:13:28PM -0400, Tom Lane wrote: Is there any reason not to change this to just fflush(NULL)? We dropped support for SunOS 4.1 quite some time ago ... Modern systems have other fflush(NULL) problems:

Re: [HACKERS] Store data in pg_toast for custom type fails (bug?)

2014-05-01 Thread Tom Lane
I wrote: I believe I understand what's going on here, and it's not quite as exciting as it first appears. The issue is that we are failing to honor the toasting goes only one level deep rule in the specific case of arrays of composite type. So while it's definitely a nasty bug, it affects

Re: [HACKERS] quiet inline configure check misses a step for clang

2014-05-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: Patch attached. Committed with minor comment-smithing. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] quiet inline configure check misses a step for clang

2014-05-01 Thread Andres Freund
On 2014-05-01 16:17:17 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: Patch attached. Committed with minor comment-smithing. Thanks. There's another problematic case:

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Tom Lane
I wrote: Noah Misch n...@leadboat.com writes: On Thu, May 01, 2014 at 12:13:28PM -0400, Tom Lane wrote: Is there any reason not to change this to just fflush(NULL)? We dropped support for SunOS 4.1 quite some time ago ... Modern systems have other fflush(NULL) problems:

Re: [HACKERS] quiet inline configure check misses a step for clang

2014-05-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: There's another problematic case: http://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=olinguitodt=2014-05-01%2021%3A22%3A43stg=config /usr/local/lib/libxml2.so.14.0: warning: strcpy() is almost always misused, please use strlcpy()

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Robert Haas
On Thu, May 1, 2014 at 5:59 PM, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Noah Misch n...@leadboat.com writes: On Thu, May 01, 2014 at 12:13:28PM -0400, Tom Lane wrote: Is there any reason not to change this to just fflush(NULL)? We dropped support for SunOS 4.1 quite some time ago ...

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Noah Misch
On Thu, May 01, 2014 at 05:59:08PM -0400, Tom Lane wrote: I wrote: Noah Misch n...@leadboat.com writes: Modern systems have other fflush(NULL) problems: http://www.nntp.perl.org/group/perl.perl5.porters/2013/09/msg207692.html

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Thu, May 01, 2014 at 05:59:08PM -0400, Tom Lane wrote: However ... after looking around I notice that fflush(NULL) is already being used in parallel pg_dump and pg_upgrade; and at least in the latter case I'm afraid to change that because it looks like

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Noah Misch
On Thu, May 01, 2014 at 08:44:46PM -0400, Tom Lane wrote: Noah Misch n...@leadboat.com writes: On Thu, May 01, 2014 at 05:59:08PM -0400, Tom Lane wrote: However ... after looking around I notice that fflush(NULL) is already being used in parallel pg_dump and pg_upgrade; and at least in the

Re: [HACKERS] includedir_internal headers are not self-contained

2014-05-01 Thread Alvaro Herrera
Tom Lane wrote: I wrote: How about we change common/relpath.[hc] to export a single version of relpath() that takes its arguments as separate plain OIDs, and then make the other versions wrappers that are only declared in some backend header? The wrappers could possibly be macros,

Re: [HACKERS] includedir_internal headers are not self-contained

2014-05-01 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: The patch is certainly too invasive to consider back-patching into 9.3, though. I feel unsure about this. I agree the patch is quite invasive. Leaving 9.3 in a broken state seems problematic. In particular I'm not sure what

[HACKERS] need xmllint on borka

2014-05-01 Thread Peter Eisentraut
I have been working on making the DocBook XML output valid. The first part was bb4eefe7bf518e42c73797ea37b033a5d8a8e70a, I now have the rest ready, but I'll spare you the mostly mechanical 200kB patch for now. In addition, I'd like to add the attached patch with an xmllint call to make sure

Re: [HACKERS] need xmllint on borka

2014-05-01 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: I have been working on making the DocBook XML output valid. The first part was bb4eefe7bf518e42c73797ea37b033a5d8a8e70a, I now have the rest ready, but I'll spare you the mostly mechanical 200kB patch for now. In addition, I'd like to add the attached

Re: [HACKERS] Obsolete coding in fork_process.c

2014-05-01 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Thu, May 01, 2014 at 08:44:46PM -0400, Tom Lane wrote: You're only considering one aspect of the problem. Yeah, you might not get duplicated output unless system() prints something before exec(), but we would also like to have causality: that is,

[HACKERS] Allowing empty target list in SELECT (1b4f7f93b4693858cb983af3cd557f6097dab67b)

2014-05-01 Thread Amit Langote
Hi, I ​s the following behavior perceived fix-worthy? -- note the ​'​ ​1's in the output ​s ​ ​po​ stgres=# CREATE TABLE test AS SELECT; SELECT 1 postgres=# insert into test select; INSERT 0 1​ ​My guess why ​this happens is because changes made in the commit in $SUBJECT only pertain to

Re: [HACKERS] Allowing empty target list in SELECT (1b4f7f93b4693858cb983af3cd557f6097dab67b)

2014-05-01 Thread Amit Langote
On Fri, May 2, 2014 at 12:57 PM, Amit Langote amitlangot...@gmail.com wrote: I s the following behavior perceived fix-worthy? -- note the ' 1's in the output s po stgres=# CREATE TABLE test AS SELECT; SELECT 1 postgres=# insert into test select; INSERT 0 1 Or maybe, it just

[HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Rajmohan C
Hi, I want to know is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query.

Re: [HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Atri Sharma
On Fri, May 2, 2014 at 10:07 AM, Rajmohan C csrajmo...@gmail.com wrote: Hi, I want to know is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query. Uh...the rewriter? -- Regards, Atri *l'apprenant*

Re: [HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Michael Paquier
On Fri, May 2, 2014 at 1:37 PM, Rajmohan C csrajmo...@gmail.com wrote: Hi, I want to know is there a way to use a hook to modify the input query before Postgresql parses and builds the parse tree for the query. Not that I know of. I am not sure that enforcing query rewrite on the server

Re: [HACKERS] is there a hook by which we can modify input query before postgresql builds raw parse tree

2014-05-01 Thread Michael Paquier
On Fri, May 2, 2014 at 2:06 PM, Michael Paquier michael.paqu...@gmail.com wrote: Not that I know of. I am not sure that enforcing query rewrite on the server side is a good idea at this may trap your applications and have them face unexpected behaviors. Note as well that there is a hook