Re: [HACKERS] Removing PD_ALL_VISIBLE

2013-01-18 Thread Jeff Davis
--; } printf(%03d.%06d\n, (int) (tv2.tv_sec - tv1.tv_sec), (int) (tv2.tv_usec - tv1.tv_usec)); } rm-pd-all-visible-20130118.patch.gz Description: GNU Zip compressed data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [HACKERS] 9.3 Pre-proposal: Range Merge Join

2013-01-18 Thread Jeff Davis
On Thu, 2013-01-17 at 21:03 +0100, Stefan Keller wrote: Hi Jeff I'm perhaps really late in this discussion but I just was made aware of that via the tweet from Josh Berkus about PostgreSQL 9.3: Current Feature Status What is the reason to digg into spatial-joins when there is PostGIS

[HACKERS] Starting Postgres : user from same group

2013-01-18 Thread Abhishek Sharma G
Hi, As per the Postgres design, only the user who is owner of the Postgres's Cluster Directory ( which has permission 700 ) can own the Postgres daemon process. But I have a requirement so that any other user belonging to the same group can also start the Postgres daemon. It might not be very

[HACKERS] How to hack the storage component?

2013-01-18 Thread wang chaoyong
Hi folks, Currently, I'm trying to read the storage component, since it's biased towards the lower layer, seems more difficult to understand and debug. All the materials I have found are the original papers on http://db.cs.berkeley.edu, I'm wondering how much it have been changed since

Re: [HACKERS] Move postgresql_fdw_validator into dblink

2013-01-18 Thread Kohei KaiGai
2013/1/18 Craig Ringer cr...@2ndquadrant.com: On 11/16/2012 08:08 AM, Noah Misch wrote: On Thu, Nov 15, 2012 at 02:33:21PM +0900, Shigeru Hanada wrote: On Sat, Oct 20, 2012 at 4:24 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: IIRC, the reason why postgresql_fdw instead of pgsql_fdw was no

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Robert Haas robertmh...@gmail.com writes: I'm somewhat bemused by this comment. I don't think CommandCounterIncrement() is an article of faith. If you execute a command to completion, and do a CommandCounterIncrement(), then whatever you do next will look

Re: [HACKERS] Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave

2013-01-18 Thread Heikki Linnakangas
On 18.01.2013 02:35, Andres Freund wrote: On 2013-01-18 08:24:31 +0900, Michael Paquier wrote: On Fri, Jan 18, 2013 at 3:05 AM, Fujii Masaomasao.fu...@gmail.com wrote: I encountered the problem that the timeline switch is not performed expectedly. I set up one master, one standby and one

Re: [HACKERS] How to hack the storage component?

2013-01-18 Thread Heikki Linnakangas
On 18.01.2013 11:02, wang chaoyong wrote: Hi folks, Currently, I'm trying to read the storage component, since it's biased towards the lower layer, seems more difficult to understand and debug. All the materials I have found are the original papers on http://db.cs.berkeley.edu, I'm

Re: [HACKERS] Starting Postgres : user from same group

2013-01-18 Thread Albe Laurenz
Abhishek Sharma G wrote: As per the Postgres design, only the user who is owner of the Postgres's Cluster Directory ( which has permission 700 ) can own the Postgres daemon process. But I have a requirement so that any other user belonging to the same group can also start the Postgres

[HACKERS] Passing connection string to pg_basebackup

2013-01-18 Thread Heikki Linnakangas
On 18.01.2013 08:50, Amit Kapila wrote: I think currently user has no way to specify TCP keepalive settings from pg_basebackup, please let me know if there is any such existing way? I was going to say you can just use keepalives_idle=30 in the connection string. But there's no way to pass a

Re: [HACKERS] 9.3 Pre-proposal: Range Merge Join

2013-01-18 Thread Stefan Keller
Hi Jeff 2013/1/18 Jeff Davis pg...@j-davis.com: On Thu, 2013-01-17 at 21:03 +0100, Stefan Keller wrote: Hi Jeff I'm perhaps really late in this discussion but I just was made aware of that via the tweet from Josh Berkus about PostgreSQL 9.3: Current Feature Status What is the reason to

[HACKERS] Re: [HACKERS] How to hack the storage component?

2013-01-18 Thread wang chaoyong
Thank you very much. Based on your information, I find an interesting page including your comment: http://code.metager.de/source/history/postgresql/src/backend/storage/smgr/README . Seems all guys are in the core team, really nice job. Thanks again for your kind reply and 2 phase commit

Re: [HACKERS] Patch for removng unused targets

2013-01-18 Thread Craig Ringer
On 12/05/2012 04:15 AM, Alexander Korotkov wrote: On Tue, Dec 4, 2012 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us mailto:t...@sss.pgh.pa.us wrote: Alexander Korotkov aekorot...@gmail.com mailto:aekorot...@gmail.com writes: On Mon, Dec 3, 2012 at 8:31 PM, Tom Lane t...@sss.pgh.pa.us

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2013-01-18 Thread Craig Ringer
On 12/14/2012 09:57 PM, Amit Kapila wrote: I need to validate the vacuum results. It's possible that this is solvable by tweaking xmin check inside vacuum. Assuming that's fixed, the question stands: do the results justify the change? I'd argue 'maybe' We can try with change (assuming

Re: [HACKERS] Passing connection string to pg_basebackup

2013-01-18 Thread Amit Kapila
On Friday, January 18, 2013 3:46 PM Heikki Linnakangas wrote: On 18.01.2013 08:50, Amit Kapila wrote: I think currently user has no way to specify TCP keepalive settings from pg_basebackup, please let me know if there is any such existing way? I was going to say you can just use

[HACKERS] More subtle issues with cascading replication over timeline switches

2013-01-18 Thread Heikki Linnakangas
When a standby starts up, and catches up with the master through the archive, it copies the target timeline's history file from the archive to pg_xlog. That's enough for that standby's purposes, but if there is a cascading standby or pg_receivexlog connected to it, it will request the timeline

Re: [HACKERS] Passing connection string to pg_basebackup

2013-01-18 Thread Heikki Linnakangas
On 18.01.2013 13:41, Amit Kapila wrote: On Friday, January 18, 2013 3:46 PM Heikki Linnakangas wrote: On 18.01.2013 08:50, Amit Kapila wrote: I think currently user has no way to specify TCP keepalive settings from pg_basebackup, please let me know if there is any such existing way? I was

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-18 Thread Heikki Linnakangas
On 18.01.2013 06:38, Phil Sorber wrote: On Tue, Jan 15, 2013 at 9:05 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Now that a standby server can follow timeline switches through streaming replication, we should do teach pg_receivexlog to do the same. Patch attached. Is it possible to

Re: [HACKERS] could not create directory ...: File exists

2013-01-18 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: Don't see what. The main reason we've not yet attempted a global fix is that the most straightforward way (take a new snapshot each time we start a new SnapshotNow scan) seems too expensive. But CREATE DATABASE is so expensive that the cost of an

Re: [HACKERS] Review: Patch to compute Max LSN of Data Pages

2013-01-18 Thread Amit kapila
Please find the rebased Patch for Compute MAX LSN. There was one compilation error as undefined reference to XLByteLT as earlier XLogRecPtr was a structure as typedef struct XLogRecPtr { uint32

Re: [HACKERS] Passing connection string to pg_basebackup

2013-01-18 Thread Amit Kapila
On Friday, January 18, 2013 5:35 PM Heikki Linnakangas wrote: On 18.01.2013 13:41, Amit Kapila wrote: On Friday, January 18, 2013 3:46 PM Heikki Linnakangas wrote: On 18.01.2013 08:50, Amit Kapila wrote: I think currently user has no way to specify TCP keepalive settings from

Re: [HACKERS] Passing connection string to pg_basebackup

2013-01-18 Thread Dimitri Fontaine
Heikki Linnakangas hlinnakan...@vmware.com writes: You could still use environment variables and a service file to do it, but it's certainly more cumbersome. It clearly should be possible to pass a full connection string to pg_basebackup, that's an obvious oversight. FWIW, +1. I would consider

Re: [HACKERS] Materialized views WIP patch

2013-01-18 Thread Thom Brown
On 17 January 2013 16:03, Thom Brown t...@linux.com wrote: On 16 January 2013 17:25, Thom Brown t...@linux.com wrote: On 16 January 2013 17:20, Kevin Grittner kgri...@mail.com wrote: Thom Brown wrote: Some weirdness: postgres=# CREATE VIEW v_test2 AS SELECT 1 moo; CREATE VIEW

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Andres Freund
On 2013-01-17 22:39:18 -0500, Robert Haas wrote: On Thu, Jan 17, 2013 at 8:33 PM, Andres Freund and...@2ndquadrant.com wrote: I have no problem requiring C code to use the even data, be it via hooks or via C functions called from event triggers. The problem I have with putting in some hooks

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2013-01-18 Thread Merlin Moncure
On Fri, Jan 18, 2013 at 5:34 AM, Craig Ringer cr...@2ndquadrant.com wrote: On 12/14/2012 09:57 PM, Amit Kapila wrote: I need to validate the vacuum results. It's possible that this is solvable by tweaking xmin check inside vacuum. Assuming that's fixed, the question stands: do the results

Re: [HACKERS] Re: Slave enters in recovery and promotes when WAL stream with master is cut + delay master/slave

2013-01-18 Thread Alvaro Herrera
Andres Freund escribió: On 2013-01-18 08:24:31 +0900, Michael Paquier wrote: The replication delays are still here. That one is caused by this nice bug, courtesy of yours truly: diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 90ba32e..1174493

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Andres Freund
On 2013-01-08 15:55:24 -0500, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Andres Freund wrote: Sorry, misremembered the problem somewhat. The problem is that code that includes postgres.h atm ends up with ExceptionalCondition() et al. declared even if FRONTEND is

Re: [HACKERS] proposal: fix corner use case of variadic fuctions usage

2013-01-18 Thread Stephen Frost
Pavel, * Pavel Stehule (pavel.steh...@gmail.com) wrote: Now I fixed these issues and I hope so it will work on all platforms As mentioned on the commitfest application, this needs documentation. That is not the responsibility of the committer; if you need help, then please ask for it. I've

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2013-01-18 Thread Atri Sharma
On 18-Jan-2013, at 17:04, Craig Ringer cr...@2ndquadrant.com wrote: On 12/14/2012 09:57 PM, Amit Kapila wrote: I need to validate the vacuum results. It's possible that this is solvable by tweaking xmin check inside vacuum. Assuming that's fixed, the question stands: do the results

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Robert Haas
On Fri, Jan 18, 2013 at 9:07 AM, Andres Freund and...@2ndquadrant.com wrote: On 2013-01-17 22:39:18 -0500, Robert Haas wrote: On Thu, Jan 17, 2013 at 8:33 PM, Andres Freund and...@2ndquadrant.com wrote: I have no problem requiring C code to use the even data, be it via hooks or via C

Re: [HACKERS] recursive view syntax

2013-01-18 Thread Stephen Frost
* Peter Eisentraut (pete...@gmx.net) wrote: I noticed we don't implement the recursive view syntax, even though it's part of the standard SQL feature set for recursive queries. Here is a patch to add that. It basically converts CREATE RECURSIVE VIEW name (columns) AS SELECT ...; to

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Simon Riggs
On 18 January 2013 02:48, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: I have no problem requiring C code to use the even data, be it via hooks or via C functions called from event triggers. The problem I have with putting in some hooks is that I doubt that

[HACKERS] Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4)

2013-01-18 Thread Andres Freund
On 2013-01-09 15:07:10 -0500, Tom Lane wrote: I would like to know if other people get comparable results on other hardware (non-Intel hardware would be especially interesting). If this result holds up across a range of platforms, I'll withdraw my objection to making palloc a plain function.

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Andres Freund
On 2013-01-18 15:48:01 +0100, Andres Freund wrote: Here's a trivially updated patch which also defines AssertArg() for FRONTEND-ish environments since Alvaro added one in xlogreader.c. This time for real. Please. -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] HS locking broken in HEAD

2013-01-18 Thread Robert Haas
On Thu, Jan 17, 2013 at 9:00 PM, Andres Freund and...@2ndquadrant.com wrote: I think it might also be a dangerous assumption for shared objects? Locks on shared objects can't be taken via the fast path. In order to take a fast-path lock, a backend must be bound to a database and the locktag

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Alvaro Herrera
Andres Freund wrote: On 2013-01-18 15:48:01 +0100, Andres Freund wrote: Here's a trivially updated patch which also defines AssertArg() for FRONTEND-ish environments since Alvaro added one in xlogreader.c. This time for real. Please. Here's a different idea: move all the Assert() and

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Here's a different idea: move all the Assert() and StaticAssert() etc definitions from c.h and postgres.h into a new header, say pgassert.h. That header is included directly by postgres.h (just like palloc.h and elog.h already are) so we don't

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Alvaro Herrera
Alvaro Herrera wrote: Andres Freund wrote: On 2013-01-18 15:48:01 +0100, Andres Freund wrote: Here's a trivially updated patch which also defines AssertArg() for FRONTEND-ish environments since Alvaro added one in xlogreader.c. This time for real. Please. Here's a different idea:

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2013-01-18 Thread Merlin Moncure
On Fri, Jan 18, 2013 at 8:57 AM, Atri Sharma atri.j...@gmail.com wrote: Hello all, Sorry for the delay in updating the hackers list with the current status. I recently did some profiling using perf on PostgreSQL 9.2 with and without our patch. I noticed that maximum time is being spent

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: One slight problem with this is the common port/*.c idiom would require an extra include: #ifndef FRONTEND #include postgres.h #else #include postgres_fe.h #include pgassert.h /* --- new line required here */ #endif /* FRONTEND */

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Andres Freund
On 2013-01-18 09:58:53 -0500, Robert Haas wrote: On Fri, Jan 18, 2013 at 9:07 AM, Andres Freund and...@2ndquadrant.com wrote: I don't have a problem reusing the object access infrastructure at all. I just don't think its providing even remotely enough. You have (co-)written that stuff,

Re: [HACKERS] WIP patch for hint bit i/o mitigation

2013-01-18 Thread Robert Haas
On Fri, Jan 18, 2013 at 10:36 AM, Merlin Moncure mmonc...@gmail.com wrote: Any scenario that involves non-trivial amount of investigation or development should result in us pulling the patch for rework and resubmission in later 'festit's closing time as they say :-). Amen. -- Robert Haas

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Andres Freund
On 2013-01-18 10:33:16 -0500, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Here's a different idea: move all the Assert() and StaticAssert() etc definitions from c.h and postgres.h into a new header, say pgassert.h. That header is included directly by postgres.h (just

Re: [HACKERS] HS locking broken in HEAD

2013-01-18 Thread Andres Freund
On 2013-01-18 10:15:20 -0500, Robert Haas wrote: On Thu, Jan 17, 2013 at 9:00 PM, Andres Freund and...@2ndquadrant.com wrote: I think it might also be a dangerous assumption for shared objects? Locks on shared objects can't be taken via the fast path. In order to take a fast-path lock,

Re: [HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-18 10:33:16 -0500, Tom Lane wrote: Really I'd prefer not to move the backend definitions out of postgres.h at all, just because doing so will lose fifteen years of git history about those particular lines (or at least make it a lot harder

[HACKERS] Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

2013-01-18 Thread Andres Freund
On 2013-01-18 11:11:50 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-01-18 10:33:16 -0500, Tom Lane wrote: Really I'd prefer not to move the backend definitions out of postgres.h at all, just because doing so will lose fifteen years of git history about those

Re: [HACKERS] HS locking broken in HEAD

2013-01-18 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I am still stupefied nobody noticed that locking in HS (where just about all locks are going to be fast path locks) was completely broken for nearly two years. IIUC it would only be broken for cases where activity was going on concurrently in two

Re: [HACKERS] HS locking broken in HEAD

2013-01-18 Thread Andres Freund
On 2013-01-18 11:16:15 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I am still stupefied nobody noticed that locking in HS (where just about all locks are going to be fast path locks) was completely broken for nearly two years. IIUC it would only be broken for

Re: [HACKERS] HS locking broken in HEAD

2013-01-18 Thread Andres Freund
On 2013-01-18 17:26:00 +0100, Andres Freund wrote: On 2013-01-18 11:16:15 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I am still stupefied nobody noticed that locking in HS (where just about all locks are going to be fast path locks) was completely broken for

Re: [HACKERS] logical changeset generation v4

2013-01-18 Thread Alvaro Herrera
Andres Freund wrote: [09] Adjust all *Satisfies routines to take a HeapTuple instead of a HeapTupleHeader For timetravel access to the catalog we need to be able to lookup (cmin, cmax) pairs of catalog rows when were 'inside' that TX. This patch just adapts the signature of the *Satisfies

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Robert Haas
On Fri, Jan 18, 2013 at 10:47 AM, Andres Freund and...@2ndquadrant.com wrote: No, there's one also in heap_create_with_catalog. Took me a minute to find it, as it does not use InvokeObjectAccessHook. The idea is that OAT_POST_CREATE fires once per object creation, regardless of the object

Re: [HACKERS] logical changeset generation v4

2013-01-18 Thread Alvaro Herrera
Alvaro Herrera wrote: I had a look at this part. Running the regression tests unveiled a case where the tableOid wasn't being set (and thus caused an assertion to fail), so I added that. I also noticed that the additions to pruneheap.c are sometimes filling a tuple before it's strictly

Re: [HACKERS] logical changeset generation v4

2013-01-18 Thread Robert Haas
On Fri, Jan 18, 2013 at 11:33 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Andres Freund wrote: [09] Adjust all *Satisfies routines to take a HeapTuple instead of a HeapTupleHeader For timetravel access to the catalog we need to be able to lookup (cmin, cmax) pairs of catalog rows

Re: [HACKERS] proposal: fix corner use case of variadic fuctions usage

2013-01-18 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: [ quick review of patch ] On reflection it seems to me that this is probably not a very good approach overall. Our general theory for functions taking ANY has been that the core system just computes the arguments and leaves it to the function to make

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Andres Freund
On 2013-01-18 11:42:47 -0500, Robert Haas wrote: On Fri, Jan 18, 2013 at 10:47 AM, Andres Freund and...@2ndquadrant.com wrote: No, there's one also in heap_create_with_catalog. Took me a minute to find it, as it does not use InvokeObjectAccessHook. The idea is that OAT_POST_CREATE fires

Re: [HACKERS] review: pgbench - aggregation of info written into log

2013-01-18 Thread Robert Haas
On Thu, Jan 17, 2013 at 7:43 PM, Tatsuo Ishii is...@postgresql.org wrote: So if my understating is correct, 1)Tomas Vondra commits to work on Windows support for 9.4, 2)on the assumption that one of Andrew Dunstan, Dave Page or Magnus Hagander will help him in Windows development. Ok? If so,

Re: [HACKERS] HS locking broken in HEAD

2013-01-18 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-18 11:16:15 -0500, Tom Lane wrote: I wonder if it'd be practical to, say, run all the contrib regression tests concurrently in different databases of one installation. I think it would be a good idea, but I don't immediately have an idea

Re: [HACKERS] logical changeset generation v4

2013-01-18 Thread Andres Freund
On 2013-01-18 11:48:43 -0500, Robert Haas wrote: On Fri, Jan 18, 2013 at 11:33 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Andres Freund wrote: [09] Adjust all *Satisfies routines to take a HeapTuple instead of a HeapTupleHeader For timetravel access to the catalog we need to

Re: [HACKERS] logical changeset generation v4

2013-01-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I took a quick look at this and am just curious why we're adding the requirement that t_tableOid has to be initialized? I assume he meant it had been left at a random value, which is surely bad practice even if a specific usage doesn't fall over today.

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-18 11:42:47 -0500, Robert Haas wrote: I'm having trouble following this. Can you restate? I wasn't sure what you meant by libpqdump. I assumed you were speaking of a parsetree-DDL or catalog-DDL facility. Yea, that wasn't really

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-18 Thread Stephen Frost
* Dimitri Fontaine (dimi...@2ndquadrant.fr) wrote: Please find attached a preliminary patch following the TEMPLATE ideas, and thanks in particular to Tom and Heikki for a practical design about how to solve that problem! Given that it's preliminary and v0 and big and whatnot, it seems like it

[HACKERS] Inconsistent format() behavior for argument-count inconsistency

2013-01-18 Thread Tom Lane
regression=# select format('%s %s', 'foo', 'bar'); format - foo bar (1 row) regression=# select format('%s %s', 'foo', 'bar', 'baz'); format - foo bar (1 row) regression=# select format('%s %s', 'foo'); ERROR: too few arguments for format Why do we throw

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Andres Freund
On 2013-01-18 12:44:13 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-01-18 11:42:47 -0500, Robert Haas wrote: I'm having trouble following this. Can you restate? I wasn't sure what you meant by libpqdump. I assumed you were speaking of a parsetree-DDL or

Re: [HACKERS] Inconsistent format() behavior for argument-count inconsistency

2013-01-18 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Why do we throw an error for too few arguments, but not too many? Not sure offhand, though I could see how it might be useful. A use-case might be that you have a variable template string which is user defined, where they can choose from the arguments that

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-18 Thread Andres Freund
On 2013-01-18 12:45:02 -0500, Stephen Frost wrote: * Dimitri Fontaine (dimi...@2ndquadrant.fr) wrote: Please find attached a preliminary patch following the TEMPLATE ideas, and thanks in particular to Tom and Heikki for a practical design about how to solve that problem! Given that it's

Re: [HACKERS] missing rename support

2013-01-18 Thread Stephen Frost
* Ali Dar (ali.munir@gmail.com) wrote: Find attached an initial patch for ALTER RENAME RULE feature. Please note that it does not have any documentation yet. Just took a quick look through this. Seems to be alright, but why do we allow renaming ON SELECT rules at all, given that they must

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-18 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: On 2013-01-18 12:45:02 -0500, Stephen Frost wrote: 'Template' seems like a really broad term which might end up being associated with things beyond extensions, yet there are a number of places where you just use 'TEMPLATE', eg,

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Alvaro Herrera
Andres Freund escribió: On 2013-01-18 12:44:13 -0500, Tom Lane wrote: An issue that would have to be thought about is that there are assorted scenarios where we generate parse trees that contain options that cannot be generated from SQL, so there's no way to reverse-list them into

Re: [HACKERS] 9.3 Pre-proposal: Range Merge Join

2013-01-18 Thread Jeff Davis
On Fri, 2013-01-18 at 12:25 +0100, Stefan Keller wrote: Sounds good. Did you already had contact e.g. with Paul (cc'ed just in case)? And will this clever index also be available within all these hundreds of PostGIS functions? Yes, I've brought the idea up to Paul before, but thank you. It's

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Andres Freund
On 2013-01-18 15:22:55 -0300, Alvaro Herrera wrote: Andres Freund escribió: On 2013-01-18 12:44:13 -0500, Tom Lane wrote: An issue that would have to be thought about is that there are assorted scenarios where we generate parse trees that contain options that cannot be generated from

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-18 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: 'Extension Template' is fine, I was just objecting to places in the code where it just says 'TEMPLATE'. I imagine we might have some 'XXX Template' at some point in the future and then we'd have confusion between is this an *extension* template or an

Re: [HACKERS] missing rename support

2013-01-18 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Ali Dar (ali.munir@gmail.com) wrote: Find attached an initial patch for ALTER RENAME RULE feature. Please note that it does not have any documentation yet. Just took a quick look through this. Seems to be alright, but why do we allow renaming

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Andres Freund escribió: Dimitri's earlier patches had support for quite some commands via deparsing and while its a noticeable amount of code it seemed to work ok. The last revision I could dig out is

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-18 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: We already do: see text search templates. The code tends to call those TSTEMPLATEs, so I'd suggest ACL_KIND_EXTTEMPLATE or some such. I agree with Stephen's objection to use of the bare word template. Yes, me too, but I had a hard time to convince myself

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-01-18 Thread Stephen Frost
* Dimitri Fontaine (dimi...@2ndquadrant.fr) wrote: Tom Lane t...@sss.pgh.pa.us writes: We already do: see text search templates. The code tends to call those TSTEMPLATEs, so I'd suggest ACL_KIND_EXTTEMPLATE or some such. I agree with Stephen's objection to use of the bare word template.

Re: [HACKERS] could not create directory ...: File exists

2013-01-18 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: Patch attached. Passes the regression tests and our internal testing shows that it eliminates the error we were seeing (and doesn't cause blocking, which is even better). We have a workaround in place for our build system (more-or-less

Re: [HACKERS] foreign key locks

2013-01-18 Thread Alvaro Herrera
Alvaro Herrera wrote: Here's version 28 of this patch. The only substantive change here from v26 is that I've made GetTupleForTrigger() use either LockTupleExclusive or LockTupleNoKeyExclusive, depending on whether the key columns are being modified by the update. This needs to go through

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Boszormenyi Zoltan
Hi, comments below. 2013-01-18 11:05 keltezéssel, Amit kapila írta: On using mktemp, linux compilation gives below warning warning: the use of `mktemp' is dangerous, better use `mkstemp' So I planned to use mkstemp. Good. In Windows, there is an api _mktemp_s, followed by open call,

Re: [HACKERS] foreign key locks

2013-01-18 Thread Simon Riggs
On 18 January 2013 20:02, Alvaro Herrera alvhe...@2ndquadrant.com wrote: XLOG_HEAP2_LOCK_UPDATED Every xlog record needs to know where to put the block. Compare with XLOG_HEAP_LOCK xlrec.target.node = relation-rd_node; -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Tom Lane
Boszormenyi Zoltan z...@cybertec.at writes: 2013-01-18 11:05 keltezéssel, Amit kapila írta: On using mktemp, linux compilation gives below warning warning: the use of `mktemp' is dangerous, better use `mkstemp' So I planned to use mkstemp. Good. On my HPUX box, the man page disapproves of

Re: [HACKERS] foreign key locks

2013-01-18 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: The reason is that there is an (unknown to me) rule that there must be some data not associated with a buffer: /* * NOTE: We disallow len == 0 because it provides a useful bit of extra * error checking in ReadRecord. This

Re: [HACKERS] foreign key locks

2013-01-18 Thread Andres Freund
On 2013-01-18 15:37:47 -0500, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: The reason is that there is an (unknown to me) rule that there must be some data not associated with a buffer: /* * NOTE: We disallow len == 0 because it provides a useful bit of extra

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Boszormenyi Zoltan
2013-01-18 21:32 keltezéssel, Tom Lane írta: Boszormenyi Zoltan z...@cybertec.at writes: 2013-01-18 11:05 keltezéssel, Amit kapila írta: On using mktemp, linux compilation gives below warning warning: the use of `mktemp' is dangerous, better use `mkstemp' So I planned to use mkstemp. Good.

Re: [HACKERS] foreign key locks

2013-01-18 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2013-01-18 15:37:47 -0500, Tom Lane wrote: I doubt it ever came up before. What use is logging only the content of a buffer page? Surely you'd need to know, for example, which relation and page number it is from. It only got to be a length of

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-01-18 Thread Boszormenyi Zoltan
2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta: 2013-01-18 21:32 keltezéssel, Tom Lane írta: Boszormenyi Zoltan z...@cybertec.at writes: 2013-01-18 11:05 keltezéssel, Amit kapila írta: On using mktemp, linux compilation gives below warning warning: the use of `mktemp' is dangerous,

Re: [HACKERS] foreign key locks

2013-01-18 Thread Andres Freund
On 2013-01-18 16:01:18 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-01-18 15:37:47 -0500, Tom Lane wrote: I doubt it ever came up before. What use is logging only the content of a buffer page? Surely you'd need to know, for example, which relation and page

Re: [HACKERS] [WIP] pg_ping utility

2013-01-18 Thread Phil Sorber
On Tue, Dec 25, 2012 at 1:47 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Dec 24, 2012 at 12:44 AM, Phil Sorber p...@omniti.com wrote: Updated patch attached. Thanks. I am marking this patch as ready for committer. -- Michael Paquier http://michael.otacoo.com Updated

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Robert Haas
On Fri, Jan 18, 2013 at 1:59 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Andres Freund escribió: Dimitri's earlier patches had support for quite some commands via deparsing and while its a noticeable amount of code it seemed to work ok. The last

[HACKERS] Contrib PROGRAM problem

2013-01-18 Thread Boszormenyi Zoltan
Hi, I want to test my lock_timeout code under Windows and I compiled the whole PG universe with the MinGW cross-compiler for 64-bit under Fedora 18. The problem contrib directories where Makefile contains PROGRAM = ... The executables binaries are created without the .exe suffix. E.g.:

Re: [HACKERS] Contrib PROGRAM problem

2013-01-18 Thread Alvaro Herrera
Boszormenyi Zoltan wrote: I want to test my lock_timeout code under Windows and I compiled the whole PG universe with the MinGW cross-compiler for 64-bit under Fedora 18. The problem contrib directories where Makefile contains PROGRAM = ... The executables binaries are created

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Fri, Jan 18, 2013 at 1:59 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, that burden already exists for non-utility statements --- why should utility statements get a pass? Other than that we tend to invent new utility syntax freely, which might be a

Re: [HACKERS] Contrib PROGRAM problem

2013-01-18 Thread Boszormenyi Zoltan
2013-01-18 22:52 keltezéssel, Alvaro Herrera írta: Boszormenyi Zoltan wrote: I want to test my lock_timeout code under Windows and I compiled the whole PG universe with the MinGW cross-compiler for 64-bit under Fedora 18. The problem contrib directories where Makefile contains PROGRAM =

Re: [HACKERS] Event Triggers: adding information

2013-01-18 Thread Robert Haas
On Fri, Jan 18, 2013 at 5:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Fri, Jan 18, 2013 at 1:59 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, that burden already exists for non-utility statements --- why should utility statements get a pass? Other

Re: [HACKERS] Contrib PROGRAM problem

2013-01-18 Thread Andrew Dunstan
On 01/18/2013 05:19 PM, Boszormenyi Zoltan wrote: 2013-01-18 22:52 keltezéssel, Alvaro Herrera írta: Boszormenyi Zoltan wrote: I want to test my lock_timeout code under Windows and I compiled the whole PG universe with the MinGW cross-compiler for 64-bit under Fedora 18. The problem

[HACKERS] Strange Windows problem, lock_timeout test request

2013-01-18 Thread Boszormenyi Zoltan
Hi, using the MinGW cross-compiled PostgreSQL binaries from Fedora 18, I get the following error for both 32 and 64-bit compiled executables. listen_addresses = '*' and trust authentication was set for both. The firewall was disabled for the tests and the server logs incomplete startup packet.

Re: [HACKERS] Contrib PROGRAM problem

2013-01-18 Thread Boszormenyi Zoltan
2013-01-18 23:37 keltezéssel, Andrew Dunstan írta: On 01/18/2013 05:19 PM, Boszormenyi Zoltan wrote: 2013-01-18 22:52 keltezéssel, Alvaro Herrera írta: Boszormenyi Zoltan wrote: I want to test my lock_timeout code under Windows and I compiled the whole PG universe with the MinGW

Re: [HACKERS] could not create directory ...: File exists

2013-01-18 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: Don't see what. The main reason we've not yet attempted a global fix is that the most straightforward way (take a new snapshot each time we start a new SnapshotNow scan) seems too expensive. But CREATE

Re: [HACKERS] My first patch! (to \df output)

2013-01-18 Thread Phil Sorber
On Sat, Dec 29, 2012 at 1:56 PM, Stephen Frost sfr...@snowman.net wrote: * Jon Erdman (postgre...@thewickedtribe.net) wrote: Oops! Here it is in the proper diff format. I didn't have my env set up correctly :( No biggie, and to get the bike-shedding started, I don't really like the column

Re: [HACKERS] Contrib PROGRAM problem

2013-01-18 Thread Andrew Dunstan
On 01/18/2013 05:45 PM, Boszormenyi Zoltan wrote: 2013-01-18 23:37 keltezéssel, Andrew Dunstan írta: On 01/18/2013 05:19 PM, Boszormenyi Zoltan wrote: 2013-01-18 22:52 keltezéssel, Alvaro Herrera írta: Boszormenyi Zoltan wrote: I want to test my lock_timeout code under Windows and I

Re: [HACKERS] Strange Windows problem, lock_timeout test request

2013-01-18 Thread Andrew Dunstan
On 01/18/2013 05:43 PM, Boszormenyi Zoltan wrote: Hi, using the MinGW cross-compiled PostgreSQL binaries from Fedora 18, I get the following error for both 32 and 64-bit compiled executables. listen_addresses = '*' and trust authentication was set for both. The firewall was disabled for the

  1   2   >