Re: [HACKERS] [REVIEW] Patch for cursor calling with named parameters

2011-12-07 Thread Yeb Havinga
On 2011-12-06 17:58, Kevin Grittner wrote: Kevin Grittnerkgri...@wicourts.gov wrote: If there are no objections, I suggest that Yeb implement the mixed notation for cursor parameters. Hearing no objections -- Yeb, are you OK with doing this, and do you feel this is doable for this CF? It

Re: [HACKERS] [DOCS] Moving tablespaces

2011-12-07 Thread Magnus Hagander
On Tue, Dec 6, 2011 at 17:07, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: There is some nice precedent in the CREATE TABLESPACE command (though dependent on HAVE_SYMLINK and not HAVE_READLINK), so I'm just going to copy the error message from there. Fair

Re: [HACKERS] [DOCS] Moving tablespaces

2011-12-07 Thread Magnus Hagander
On Wed, Dec 7, 2011 at 10:05, Magnus Hagander mag...@hagander.net wrote: On Tue, Dec 6, 2011 at 17:07, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: There is some nice precedent in the CREATE TABLESPACE command (though dependent on HAVE_SYMLINK and not

Re: [HACKERS] [COMMITTERS] pgsql: plpython: Add SPI cursor support

2011-12-07 Thread Jan Urbański
On 06/12/11 19:33, Jan Urbański wrote: On 06/12/11 19:23, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: plpython: Add SPI cursor support Buildfarm member narwhal does not like this patch. It looks like PyObject_SelfIter is not a compile-time constant on its version of python

Re: [HACKERS] [COMMITTERS] pgsql: plpython: Add SPI cursor support

2011-12-07 Thread Jan Urbański
On 07/12/11 11:16, Jan Urbański wrote: On 06/12/11 19:33, Jan Urbański wrote: On 06/12/11 19:23, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: plpython: Add SPI cursor support Buildfarm member narwhal does not like this patch. It looks like PyObject_SelfIter is not a

Re: [HACKERS] Configuration include directory

2011-12-07 Thread Greg Smith
On 11/17/2011 11:03 AM, Tom Lane wrote: So as long as the include-directory code path doesn't interfere with tracking that nesting depth, I don't think it needs any extra protection against include-the-same-directory. That was the theory in Magnus's original patch, and I don't believe

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-12-07 Thread Peter Geoghegan
On 7 December 2011 03:45, Robert Haas robertmh...@gmail.com wrote: In this regard, I think Heikki's remarks upthread are worth some thought.  If inlining is a win just because it avoids saving and restoring registers or allows better instruction scheduling, then inlining is the (probably?) the

[HACKERS] documentation issue - extensions

2011-12-07 Thread Pavel Stehule
Hello I am trying to create simple extension according to doc http://www.postgresql.org/docs/9.1/interactive/extend-extensions.html I have a problem with line that contains backslash statement -- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use CREATE EXTENSION

Re: [HACKERS] Configuration include directory

2011-12-07 Thread Marti Raudsepp
On Wed, Nov 16, 2011 at 06:53, Greg Smith g...@2ndquadrant.com wrote: -Considers all names in that directory that end with *.conf  [Discussion concluded more flexibility here would be of limited value relative to how it complicates the implementation] I'd suggest also excluding hidden files --

Re: [HACKERS] RangeVarGetRelid()

2011-12-07 Thread Noah Misch
On Tue, Dec 06, 2011 at 04:02:31PM -0500, Robert Haas wrote: On Mon, Dec 5, 2011 at 2:09 AM, Noah Misch n...@leadboat.com wrote: ? ? ? ? ? ? ? AcceptInvalidationMessages(); The above call can go away, now. Doesn't that still protect us against namespace-shadowing issues?

Re: [HACKERS] pg_restore --no-post-data and --post-data-only

2011-12-07 Thread Josh Berkus
Note that this feature has the odd effect that some constraints are loaded at the same time as the tables and some are loaded with the post-data. This is consistent with how text-mode pg_dump has always worked, but will seem odd to the user. This also raises the possibility of a future

Re: [HACKERS] pg_stat_statements with query tree based normalization

2011-12-07 Thread Marti Raudsepp
On Wed, Dec 7, 2011 at 03:19, Peter Geoghegan pe...@2ndquadrant.com wrote: The results are...taking the median value of each set of runs as representative, my patch appears to run marginally faster than head. Of course, there is no reason to believe that it should, and I'm certain that the

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-12-07 Thread Robert Haas
On Tue, Dec 6, 2011 at 8:46 PM, Tom Lane t...@sss.pgh.pa.us wrote: 1. Adding sortsupport infrastructure for more datatypes. 2. Revising nbtree and related code to use this infrastructure. 3. Integrating Peter's work into this framework. I'll try to take care of #1 for at least a few key

Re: [HACKERS] review: CHECK FUNCTION statement

2011-12-07 Thread Albe Laurenz
Pavel Stehule wrote: there is a updated patch. it support multi check, options and custom check functions are not supported yet. I don't plan to implement custom check functions in this round - I has not any example of usage - but we have agreement on syntax and behave, so this should not

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-12-07 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Dec 6, 2011 at 8:46 PM, Tom Lane t...@sss.pgh.pa.us wrote: 1. Adding sortsupport infrastructure for more datatypes. 2. Revising nbtree and related code to use this infrastructure. 3. Integrating Peter's work into this framework. I'll try to

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-12-07 Thread Robert Haas
On Wed, Dec 7, 2011 at 10:09 AM, Tom Lane t...@sss.pgh.pa.us wrote: There's some stuff that's debatable according to this criterion --- in particular, I wondered whether it'd be worth having a fast path for bttextcmp, especially if we pre-tested the collate_is_c condition and had a separate

Re: [HACKERS] review: CHECK FUNCTION statement

2011-12-07 Thread Pavel Stehule
2011/12/7 Albe Laurenz laurenz.a...@wien.gv.at: Pavel Stehule wrote: there is a updated patch. it support multi check, options and custom check functions are not supported yet. I don't plan to implement custom check functions in this round - I has not any example of usage - but we have

Re: [HACKERS] review: CHECK FUNCTION statement

2011-12-07 Thread Albe Laurenz
Pavel Stehule wrote: The syntax error messages are still inadequate; all I can get is 'syntax error at or near %s'.  They should be more detailed. this system is based on error messages that generates a plpgsql engine or bison engine. I can correct only a few percent from these messages :(

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-12-07 Thread Peter Geoghegan
On 7 December 2011 15:15, Robert Haas robertmh...@gmail.com wrote: On Wed, Dec 7, 2011 at 10:09 AM, Tom Lane t...@sss.pgh.pa.us wrote:  But it would still have to be prepared for detoasting, so in the end I was unenthused.  Anyone who feels like testing could try to prove me wrong about it

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-12-07 Thread Robert Haas
On Wed, Dec 7, 2011 at 10:58 AM, Peter Geoghegan pe...@2ndquadrant.com wrote: On 7 December 2011 15:15, Robert Haas robertmh...@gmail.com wrote: On Wed, Dec 7, 2011 at 10:09 AM, Tom Lane t...@sss.pgh.pa.us wrote:  But it would still have to be prepared for detoasting, so in the end I was

Re: [HACKERS] Measuring relation free space

2011-12-07 Thread Jaime Casanova
On Mon, Nov 28, 2011 at 5:40 AM, Greg Smith g...@2ndquadrant.com wrote: Unless I am missing something, all indexes are handled via a procedure designed for BTree indices, GetBTRelationFreeSpace.  I don't know that the ultimate behavior of this is wrong, but it seems unusual.  If I get some

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: I am trying to create simple extension according to doc http://www.postgresql.org/docs/9.1/interactive/extend-extensions.html I have a problem with line that contains backslash statement -- complain if script is sourced in psql, rather than via

Re: [HACKERS] pg_restore --no-post-data and --post-data-only

2011-12-07 Thread Tom Lane
Josh Berkus j...@agliodbs.com writes: Note that this feature has the odd effect that some constraints are loaded at the same time as the tables and some are loaded with the post-data. This is consistent with how text-mode pg_dump has always worked, but will seem odd to the user. This also

Re: [HACKERS] IDLE in transaction introspection

2011-12-07 Thread Scott Mead
On Tue, Dec 6, 2011 at 6:38 AM, Magnus Hagander mag...@hagander.net wrote: On Sat, Nov 19, 2011 at 02:55, Scott Mead sco...@openscg.com wrote: On Thu, Nov 17, 2011 at 11:58 AM, Scott Mead sco...@openscg.com wrote: On Wed, Nov 16, 2011 at 4:09 PM, Scott Mead sco...@openscg.com wrote:

Re: [HACKERS] pg_restore --no-post-data and --post-data-only

2011-12-07 Thread Andrew Dunstan
On 12/07/2011 11:31 AM, Tom Lane wrote: Josh Berkusj...@agliodbs.com writes: Note that this feature has the odd effect that some constraints are loaded at the same time as the tables and some are loaded with the post-data. This is consistent with how text-mode pg_dump has always worked,

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-12-07 Thread Robert Haas
cleanup of the comments and documentation, and some other changes) for reference. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company leaky-views-20111207.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

[HACKERS] [PATCH] pg_test_fsync: Delete temporary file when aborted by a signal

2011-12-07 Thread Marti Raudsepp
Hi list, I found a 'pg_test_fsync.out' file in my $PGDATA, which was probably left around because I aborted pg_test_fsync with ^C back when setting up the server. Here's a patch to delete that file via a signal handler for SIGINT/SIGTERM/SIGHUP. Not tested on Windows, but should work according

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-12-07 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Having looked at this more, I'm starting to believe KaiGai has this part right after all. Yeah, you have a point. The rewriter is intentionally trying to make an expanded view look just the same as an in-line SELECT-in-FROM, and we need it to be easier

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-12-07 Thread Robert Haas
On Wed, Dec 7, 2011 at 1:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: One other possibility that comes to mind is that, instead of adding bool security_view to the RTE, we could instead add a new RTEKind, something like RTE_SECURITY_VIEW.  That would mean going through and finding all the places

Re: [HACKERS] const correctness

2011-12-07 Thread Peter Eisentraut
On ons, 2011-11-09 at 21:15 +, Thomas Munro wrote: I've attached a new patch, which simply adds the keyword 'const' in lots of places, no new functions etc. This version generates no warnings under -Wcast-qual (now that I've read Peter E's thread and been inspired to fix up some places

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Pavel Stehule
2011/12/7 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: I am trying to create simple extension according to doc http://www.postgresql.org/docs/9.1/interactive/extend-extensions.html I have a problem with line that contains backslash statement -- complain if

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2011/12/7 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: I have a problem with line that contains backslash statement Are you testing in an up-to-date server? We added the ability to handle that post-9.1.0. it was

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Pavel Stehule
2011/12/7 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2011/12/7 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: I have a problem with line that contains backslash statement Are you testing in an up-to-date server?  We added the

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Kevin Grittner
Pavel Stehule pavel.steh...@gmail.com wrote: I can upgrade - it's not problem - just it is surprise for me - because documentation is not related to mayor version. Maybe this issue can be documented somewhere Don't the release notes, mentioning that the bug is fixed in 9.1.2, cover that?

Re: [HACKERS] ecmascript 5 DATESTYLE

2011-12-07 Thread Peter Eisentraut
On tis, 2011-12-06 at 15:15 -0500, Tom Lane wrote: TBH, I think that inventing a new datestyle setting ECMA would be a more appropriate investment of effort. So we'd have a setting called ECMA that's really ISO, and a setting called ISO that's really SQL, and a setting called SQL that's really

Re: [HACKERS] ecmascript 5 DATESTYLE

2011-12-07 Thread ben hockey
On Dec 7, 2011, at 3:56 PM, Peter Eisentraut wrote: On tis, 2011-12-06 at 15:15 -0500, Tom Lane wrote: TBH, I think that inventing a new datestyle setting ECMA would be a more appropriate investment of effort. So we'd have a setting called ECMA that's really ISO, and a setting called ISO

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Pavel Stehule
2011/12/7 Kevin Grittner kevin.gritt...@wicourts.gov: Pavel Stehule pavel.steh...@gmail.com wrote: I can upgrade - it's not problem - just it is surprise for me - because documentation is not related to mayor version. Maybe this issue can be documented somewhere Don't the release notes,

Re: [HACKERS] ecmascript 5 DATESTYLE

2011-12-07 Thread Pavel Stehule
2011/12/7 ben hockey neonstalw...@gmail.com: On Dec 7, 2011, at 3:56 PM, Peter Eisentraut wrote: On tis, 2011-12-06 at 15:15 -0500, Tom Lane wrote: TBH, I think that inventing a new datestyle setting ECMA would be a more appropriate investment of effort. So we'd have a setting called

Re: [HACKERS] [PATCH] Caching for stable expressions with constant arguments v3

2011-12-07 Thread Marti Raudsepp
On Wed, Dec 7, 2011 at 00:29, Marti Raudsepp ma...@juffo.org wrote: ExecInitExpr enables the cache when its 'PlanState *parent' attribute isn't NULL [...] On the other hand, a few places lose caching support this way since they don't go through the planner: * Column defaults in a COPY FROM

Re: [HACKERS] [PATCH] Caching for stable expressions with constant arguments v3

2011-12-07 Thread Tom Lane
Marti Raudsepp ma...@juffo.org writes: Let me rephrase that as a question: Does it seem worthwhile to add a new argument to ExecInitExpr to handle those two cases? Possibly. Another way would be to keep its API as-is and introduce a different function name for the other behavior. I would

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Robert Haas
On Wed, Dec 7, 2011 at 4:37 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2011/12/7 Kevin Grittner kevin.gritt...@wicourts.gov: Pavel Stehule pavel.steh...@gmail.com wrote: I can upgrade - it's not problem - just it is surprise for me - because documentation is not related to mayor

Re: [HACKERS] [v9.2] Fix Leaky View Problem

2011-12-07 Thread Robert Haas
On Sat, Dec 3, 2011 at 3:19 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: I rebased my patch set. New functions in pg_proc.h prevented to apply previous revision cleanly. Here is no functional changes. I was thinking that my version of this (attached to an email from earlier today) might be about

Re: [HACKERS] pg_dump --exclude-table-data

2011-12-07 Thread Andrew Dunstan
On 11/04/2011 10:21 AM, Robert Haas wrote: A slightly updated patch is attached, the main change being that I removed use of a short option and only support the long name option. -D didn't seem sufficiently mnemonic to me. I'll add this to the November commitfest, but I'd like to get it

Re: [HACKERS] documentation issue - extensions

2011-12-07 Thread Pavel Stehule
2011/12/8 Robert Haas robertmh...@gmail.com: On Wed, Dec 7, 2011 at 4:37 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2011/12/7 Kevin Grittner kevin.gritt...@wicourts.gov: Pavel Stehule pavel.steh...@gmail.com wrote: I can upgrade - it's not problem - just it is surprise for me - because

[HACKERS] Lots of FSM-related fragility in transaction commit

2011-12-07 Thread Tom Lane
Joseph Shraibman reported some rather unpleasant behavior that seems to be due to trying to drop a table whose FSM file has got no permissions: http://archives.postgresql.org/pgsql-general/2011-12/msg00246.php One question is how the file got that way, and whether Postgres did anything wrong to

Re: [HACKERS] Tracking latest timeline in standby mode

2011-12-07 Thread senthilnathan
We are using 9.1., We have a set up like a master and 2 standby servers. M -- S1,S2 . Both standby S1 and S2 share the same archive. Master will have an Virtual IP. Both stand by servers will be replicated using this virtual ip. Assume the master fails,using our heart beat mechanism Virtual IP