Re: [HACKERS] [PATCH] Psql List Languages

2009-07-19 Thread Peter Eisentraut
On Friday 17 July 2009 18:26:31 Fernando Ike wrote: Follow new version patch, now with version postgresql version. 1) This is obviously wrong: CASE WHEN l.lanispl = 't' THEN 'Trusted' WHEN l.lanispl = 'f' THEN 'Untrusted' END 2) It may be better to use lanispl to determine whether a

Re: [HACKERS] machine-readable explain output v2

2009-07-19 Thread Andres Freund
Hi Robert, Hi All, On Sunday 19 July 2009 04:29:42 Andres Freund wrote: I did not yet look at the contrib/autoexplain portions. Will do that on Monday or so. Early Monday: Looks fine, except that the new auto_explain.log_format parameter is not documented. Andres -- Sent via pgsql-hackers

Re: [HACKERS] multi-threaded pgbench

2009-07-19 Thread Robert Haas
On Sun, Jul 19, 2009 at 12:50 AM, Josh Berkusj...@agliodbs.com wrote: Greg (Smith), do you have time to review this version?  If not, I will assign a round-robin reviewer when one becomes available. I can do a concurrency test of this next week. Sounds good. ...Robert -- Sent via

Re: [HACKERS] Using results from INSERT ... RETURNING

2009-07-19 Thread Robert Haas
On Sat, Jul 18, 2009 at 5:21 PM, Jaime Casanovajcasa...@systemguards.com.ec wrote: On Tue, Jul 7, 2009 at 3:31 PM, Marko Tiikkajamarko.tiikk...@cs.helsinki.fi wrote: [...] rules and default values don't work. Recursive CTEs don't work either. [...] and it crashes for triggers I think this

Re: [HACKERS] [PATCH v3] Avoid manual shift-and-test logic in AllocSetFreeIndex

2009-07-19 Thread Robert Haas
On Tue, Jun 30, 2009 at 3:08 AM, Jeremy Kerrj...@ozlabs.org wrote: Move the shift-and-test login into a separate fls() function, which can use __builtin_clz() if it's available. This requires a new check for __builtin_clz in the configure script. Results in a ~2% performance increase on

Re: [HACKERS] Review: Revise parallel pg_restore's scheduling heuristic

2009-07-19 Thread Robert Haas
On Sat, Jul 18, 2009 at 4:41 PM, Kevin Grittnerkevin.gritt...@wicourts.gov wrote: Kevin Grittner kevin.gritt...@wicourts.gov wrote: Performance tests to follow in a day or two. I'm looking to beg another week or so on this to run more tests.  What I can have by the end of today is pretty

Re: [HACKERS] multi-threaded pgbench

2009-07-19 Thread Robert Haas
On Jul 18, 2009, at 3:40 PM, Greg Stark gsst...@mit.edu wrote: On Sat, Jul 18, 2009 at 8:25 PM, Robert Haasrobertmh...@gmail.com wrote: On Thu, Jul 9, 2009 at 4:51 AM, Itagaki Takahiroitagaki.takah...@oss.ntt.co.jp wrote: Here is an updated version of multi-threaded pgbench patch. Greg

Re: [HACKERS] WIP patch for TODO Item: Add prompt escape to display the client and server versions

2009-07-19 Thread Robert Haas
On Sat, Jul 18, 2009 at 6:14 AM, Dimitri Fontainedfonta...@hi-media.com wrote: Le 17 juil. 09 à 23:24, Tom Lane a écrit : It seems unlikely that the DB version number would be worth the prompt space.  In situations like that you'd much more likely need identifying info like the DB hostname

Re: [HACKERS] Sampling profiler updated

2009-07-19 Thread Dimitri Fontaine
Hi, Le 19 juil. 09 à 06:30, Robert Haas a écrit : On Sat, Jul 18, 2009 at 5:28 PM, Tom Lanet...@sss.pgh.pa.us wrote: What do you want to use then ... Waiting on Author? Yeah, that's what I was thinking. Oh and I see that Returned with feedback did set a Close Date, so it's not what I

Re: [HACKERS] generic explain options v3 - RR Review

2009-07-19 Thread Martijn van Oosterhout
On Sun, Jul 19, 2009 at 03:15:38AM +0200, Andres Freund wrote: Hi Robert, Hi All, Patch applies with some offset changes, code changes look sensible, I personally like the new syntax and the features it may allow in future. One, possibly big, gripe remains though: The formerly valid

Re: [HACKERS] Using results from INSERT ... RETURNING

2009-07-19 Thread Marko Tiikkaja
Jaime Casanova wrote: - why you need a node InsertReturning (see nodeInsertReturning.c) at all? I couldn't come up with a better way to do this. and it crashes for triggers (example using regression's int4_tbl) Right. I never tested this with triggers. The trigger tuple slot isn't

Re: [HACKERS] Review: Revise parallel pg_restore's scheduling heuristic

2009-07-19 Thread Stefan Kaltenbrunner
Kevin Grittner wrote: Kevin Grittner kevin.gritt...@wicourts.gov wrote: Performance tests to follow in a day or two. I'm looking to beg another week or so on this to run more tests. What I can have by the end of today is pretty limited, mostly because I decided it made the most sense to

Re: [HACKERS] [PATCH v3] Avoid manual shift-and-test logic in AllocSetFreeIndex

2009-07-19 Thread Stefan Kaltenbrunner
Robert Haas wrote: On Tue, Jun 30, 2009 at 3:08 AM, Jeremy Kerrj...@ozlabs.org wrote: Move the shift-and-test login into a separate fls() function, which can use __builtin_clz() if it's available. This requires a new check for __builtin_clz in the configure script. Results in a ~2%

Re: [HACKERS] Review: Revise parallel pg_restore's scheduling heuristic

2009-07-19 Thread Andrew Dunstan
Robert Haas wrote: On Sat, Jul 18, 2009 at 4:41 PM, Kevin Grittnerkevin.gritt...@wicourts.gov wrote: Kevin Grittner kevin.gritt...@wicourts.gov wrote: Performance tests to follow in a day or two. I'm looking to beg another week or so on this to run more tests. What I can

Re: [HACKERS] generic explain options v3 - RR Review

2009-07-19 Thread Andres Freund
On Sunday 19 July 2009 14:39:33 Martijn van Oosterhout wrote: On Sun, Jul 19, 2009 at 03:15:38AM +0200, Andres Freund wrote: Hi Robert, Hi All, Patch applies with some offset changes, code changes look sensible, I personally like the new syntax and the features it may allow in future.

[HACKERS] Using a C++ library in PostgreSQL

2009-07-19 Thread Xin Wang
Hi all, My research project is based on PostgreSQL. I want to get the Post-Schema-Validation-Infoset (PSVI) of an XML document being stored. However, the current libxml2 library does not support PSVI at all. So I have to use the Xerces C++ library in PostgreSQL. But I wonder if it is possible

Re: [HACKERS] commitfest application question

2009-07-19 Thread Alvaro Herrera
Joe Conway wrote: If I click on the link for patch, I go to here: http://archives.postgresql.org/message-id/162867790905270504m6bb30e2eqa5021e0d60a43...@mail.gmail.com Is there a way for me to extract the patch as the original attachment, or am I supposed to just cat-n-paste into an editor

Re: [HACKERS] [PATCH] DefaultACLs

2009-07-19 Thread Petr Jelinek
Hello, while writing some basic docs I found bug in dependency handling when doing SET on object type that already had some default privileges. Attached patch fixes it, it also fixes thinko in parser (DROPing GRANT OPTION behaves like REVOKE now). And there is also initial version of those

Re: [HACKERS] Using results from INSERT ... RETURNING

2009-07-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I think this is a great feature, and it would be REALLY great if it supported UPDATE and DELETE as well. It won't get applied until it does, and I imagine the patch author wasn't expecting any differently. The submission was clearly marked WIP not

Re: [HACKERS] Using a C++ library in PostgreSQL

2009-07-19 Thread Sam Mason
On Sun, Jul 19, 2009 at 10:13:35PM +0800, Xin Wang wrote: My research project is based on PostgreSQL. I want to get the Post-Schema-Validation-Infoset (PSVI) of an XML document being stored. However, the current libxml2 library does not support PSVI at all. So I have to use the Xerces C++

Re: [HACKERS] GEQO vs join order restrictions

2009-07-19 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On Saturday 18 July 2009 17:48:14 Tom Lane wrote: I'm inclined to address this by rewriting gimme_tree so that it *always* finds a valid join order based on the given tour. This would involve searching the whole stack for a possible join partner

Re: [HACKERS] Sampling profiler updated

2009-07-19 Thread Robert Haas
On Sun, Jul 19, 2009 at 8:53 AM, Dimitri Fontainedfonta...@hi-media.com wrote: Oh and I see that Returned with feedback did set a Close Date, so it's not what I intended anyway. I've changed the status to Waiting on Author and if we have no news before the end of current commit fest, I'll then

Re: [HACKERS] Using results from INSERT ... RETURNING

2009-07-19 Thread Robert Haas
On Sun, Jul 19, 2009 at 12:39 PM, Tom Lanet...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I think this is a great feature, and it would be REALLY great if it supported UPDATE and DELETE as well. It won't get applied until it does, and I imagine the patch author wasn't

Re: [HACKERS] GEQO vs join order restrictions

2009-07-19 Thread Robert Haas
On Sun, Jul 19, 2009 at 1:23 PM, Tom Lanet...@sss.pgh.pa.us wrote: My conclusions are: 1.  I should clean up and apply the attached patch.  Even though it's not the whole answer, it clearly makes things a good deal better. 2. We need to look into a more efficient representation for making

Re: [HACKERS] GEQO vs join order restrictions

2009-07-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Tom, do you think the independent subproblem stuff from last night would be worth pursuing? It's worth looking into. I'm not certain if it will end up being a good idea or not. Right now the joinlist collapse code is pretty stupid (as you know --- it

[HACKERS] Problem with psql backward compatibility

2009-07-19 Thread Bruce Momjian
I thought we wanted psql to be able to connect to older databases and report \d values properly. I see 8.4 psql \d is not working for sequences in 8.3 databases: $ psql regression psql (8.4.0, server 8.3.7) WARNING: psql version 8.4, server version 8.3.

Re: [HACKERS] generic explain options v3 - RR Review

2009-07-19 Thread Robert Haas
On Sun, Jul 19, 2009 at 9:47 AM, Andres Freundand...@anarazel.de wrote: On Sunday 19 July 2009 14:39:33 Martijn van Oosterhout wrote: On Sun, Jul 19, 2009 at 03:15:38AM +0200, Andres Freund wrote: Hi Robert, Hi All, Patch applies with some offset changes, code changes look sensible, I

Re: [HACKERS] GRANT ON ALL IN schema

2009-07-19 Thread Robert Haas
On Fri, Jul 17, 2009 at 9:16 AM, Petr Jelinekpjmo...@pjmodos.net wrote: One more typo fix in docs -- Regards Petr Jelinek (PJMODOS) Nikhil, This is still flagged as Needs Review. Are you still reviewing the latest version, or should this be set to ready for committer, or what? ...Robert

Re: [HACKERS] navigation menu for documents

2009-07-19 Thread Alvaro Herrera
Peter Eisentraut wrote: On Friday 17 July 2009 15:58:27 Richard Huxton wrote: 1. Fixed navigation 2. Titles on navigation links. Yes, the DSSSL stylesheet could do that. Since it seems we can get both of these without interfering with anything else I vote +1 on getting them it. 3.

Re: [HACKERS] [PATCH] SE-PgSQL/tiny rev.2193

2009-07-19 Thread KaiGai Kohei
Robert Haas wrote: On Sat, Jul 18, 2009 at 7:10 AM, Martijn van Oosterhoutklep...@svana.org wrote: On Fri, Jul 17, 2009 at 03:59:29PM +0300, Peter Eisentraut wrote: I'm starting to think that there's just no hope of this matching up well enough with the way PostgreSQL already works to have a

Re: [HACKERS] [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros

2009-07-19 Thread Jeremy Kerr
Hi Robert, Perhaps we should use macros. I was trying to avoid macros, as this means we lose type- and syntax- checking at the call-site, and end up with slightly messier code. However, I understand that this is probably personal preference for me :) How about just 'static' functions? (ie,

Re: [HACKERS] [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros

2009-07-19 Thread Tom Lane
Jeremy Kerr j...@ozlabs.org writes: However, I'd rather make decisions on data, rather than guessing. Is the actual problem here that some compilers just don't support the 'inline' keyword? I think Alvaro's complaint is unfounded --- we already have logic to #define inline as empty if the

Re: [HACKERS] [PATCH v3] Avoid manual shift-and-test logic in AllocSetFreeIndex

2009-07-19 Thread Jeremy Kerr
Hi Robert, That having been said, Jeremy, you probably want to take a look at those comments and I have a few responses to them as well. OK, thanks for the heads-up. following comment: Applied and built cleanly. Regress passes. Trying to hunt down ppc box to see if performance

Re: [HACKERS] navigation menu for documents

2009-07-19 Thread Andrew Dunstan
Alvaro Herrera wrote: Peter Eisentraut wrote: On Friday 17 July 2009 15:58:27 Richard Huxton wrote: 1. Fixed navigation 2. Titles on navigation links. Yes, the DSSSL stylesheet could do that. Since it seems we can get both of these without interfering with

Re: [HACKERS] [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros

2009-07-19 Thread Jeremy Kerr
Tom, However, I think the whole patch is pretty useless. That code is not broken as it stands, and doesn't appear to really gain anything from the proposed change. Why should we risk any portability questions when the code isn't going to get either simpler or shorter? This patch clears the

Re: [HACKERS] SE-PostgreSQL?

2009-07-19 Thread KaiGai Kohei
Robert Haas wrote: Quite beyond the fact that we never seem to be able to get a patch that implements a reasonable first set of features, the amount of work that's going to be required to get these patches committable is going to be enormous. Just to cite a few examples, here is the

Re: [HACKERS] [PATCH v3] Avoid manual shift-and-test logic in AllocSetFreeIndex

2009-07-19 Thread Tom Lane
Jeremy Kerr j...@ozlabs.org writes: - inline is forbidden to use in PostgreSQL - you need exception or do it differently (inline again: should I just make this a static, the compiler can inline where possible? or do you want a macro?) I don't know where Zdenek got the idea that we have

Re: [HACKERS] [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros

2009-07-19 Thread Tom Lane
Jeremy Kerr j...@ozlabs.org writes: We also need disable_sigpipe to be called when it's not the start of a block, hence the separate type definition. So break that macro into two (variable definition and code). regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] conditional dropping of columns/constraints

2009-07-19 Thread Andrew Dunstan
Bernd Helmle wrote: Here is a slightly updated version of the patch. I did some (very minor) editing on the wording in the docs and cleaned a merge conflict in tablecmds.c. I saw no code issues so far, make check passes without errors. Maybe someone with more bison skills can comment on

Re: [HACKERS] join removal

2009-07-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, Jul 16, 2009 at 9:02 PM, Greg Starkst...@mit.edu wrote: I have one big worry though. Currently you're detecting the unique property using the planner's path mechanism. I suppose that works, but it's only an accident of the planner design that

Re: [HACKERS] WIP: Deferrable unique constraints

2009-07-19 Thread Alvaro Herrera
Dean Rasheed wrote: Thanks for the thorough review. I attach an new version of the patch, updated to HEAD, and with the index AM change discussed. Wow, this is a large patch. I didn't do a thorough review, but some quickies I noticed: * Please move the code that says that it should be in a

Re: [HACKERS] make check failure for 8.4.0

2009-07-19 Thread Alvaro Herrera
Kevin Grittner wrote: Andrew Dunstan and...@dunslane.net wrote: That's why I asked to see the make log. Maybe some environment setting affected things? Bingo! A few weeks back I had been experimenting with using the PGXS compiles for our extensions, rather than expanding our tarballs

Re: [HACKERS] Problem with psql backward compatibility

2009-07-19 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I thought we wanted psql to be able to connect to older databases and report \d values properly. I see 8.4 psql \d is not working for sequences in 8.3 databases: Fixed ... regards, tom lane -- Sent via pgsql-hackers mailing

Re: [HACKERS] make check failure for 8.4.0

2009-07-19 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Kevin Grittner wrote: Bingo! A few weeks back I had been experimenting with using the PGXS compiles for our extensions, rather than expanding our tarballs in the build tree and just doing make and sudo make install there. On the failing

Re: [HACKERS] join removal

2009-07-19 Thread Robert Haas
On Sun, Jul 19, 2009 at 10:56 PM, Tom Lanet...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Jul 16, 2009 at 9:02 PM, Greg Starkst...@mit.edu wrote: I have one big worry though. Currently you're detecting the unique property using the planner's path mechanism. I

Re: [HACKERS] join removal

2009-07-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sun, Jul 19, 2009 at 10:56 PM, Tom Lanet...@sss.pgh.pa.us wrote: I think we want something along the lines of relation_is_distinct_for with a list of columns and a list of comparison operators, where the first-cut implementation will be to look for

[HACKERS] [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex

2009-07-19 Thread Jeremy Kerr
Rather than testing single bits in a loop, change AllocSetFreeIndex to use the __builtin_clz() function to calculate the chunk index. This requires a new check for __builtin_clz in the configure script. Results in a ~2% performance increase on sysbench on PowerPC. Signed-off-by: Jeremy Kerr