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

2013-01-22 Thread Pavel Stehule
2013/1/22 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: so here is rewritten patch I've applied the infrastructure parts of this, but not the changes to format() and concat(). Why are the format and concat patches so randomly different? Not only is the internal

Re: [HACKERS] CF3+4 (was Re: Parallel query execution)

2013-01-22 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: In this connection I refer you to Sturgeon's Law(*): 90% of everything is crud. Applied to our problem, it says that 90% of all patch ideas are bad. Therefore, we should be expecting to reject a large fraction of submitted patches. It distresses me that

Re: [HACKERS] Passing connection string to pg_basebackup

2013-01-22 Thread Hari Babu
On Saturday, January 19, 2013 5:49 PM Magnus Hagander wrote: On Fri, Jan 18, 2013 at 1:05 PM, Heikki Linnakangas hlinnakan...@vmware.com 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: So to

Re: [HACKERS] pg_dump transaction's read-only mode

2013-01-22 Thread Stefan Kaltenbrunner
On 01/21/2013 08:45 PM, Tom Lane wrote: Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: On 01/21/2013 02:00 PM, Tom Lane wrote: (It's entirely likely that the 7.0 server I keep around for testing this is the last one in captivity anywhere. But IIRC, we've heard fairly recent reports of

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Robert Haas
On Tue, Jan 22, 2013 at 2:17 AM, Tom Lane t...@sss.pgh.pa.us wrote: Peter van Hardenberg p...@pvh.ca writes: Okay - I've narrowed it down to an interaction with schema recreation. Here's a minimal test-case I created by paring back the restore from the pg_restore output until I only had the

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Nice clean patch, thanks! Committed, after tinkering with the CommandCounterIncrement() stuff a bit. Cool. thanks! I will respond to the rest of your email later. Reading through this patch left me with a slight concern regarding both

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Dimitri Fontaine dimi...@2ndquadrant.fr writes: I added some in the attached patch. doc/src/sgml/event-trigger.sgml | 10 ++ src/backend/commands/event_trigger.c|6 +- src/test/regress/expected/event_trigger.out | 106 +++

Re: [HACKERS] pg_ctl idempotent option

2013-01-22 Thread Ashutosh Bapat
On Tue, Jan 15, 2013 at 9:36 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 1/14/13 10:22 AM, Tom Lane wrote: Also it appears to me that the hunk at lines 812ff is changing the default behavior, which is not what the patch is advertised to do. True, I had

Re: [HACKERS] allowing privileges on untrusted languages

2013-01-22 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: The traditional answer to that, which not only can be done already in all existing releases but is infinitely more flexible than any hard-wired scheme we could implement, is that you create superuser-owned security-definer functions that can execute any

Re: [HACKERS] CF3+4 (was Re: Parallel query execution)

2013-01-22 Thread Pavan Deolasee
On Tue, Jan 22, 2013 at 11:45 AM, Tom Lane t...@sss.pgh.pa.us wrote: In this connection I refer you to Sturgeon's Law(*): 90% of everything is crud. Applied to our problem, it says that 90% of all patch ideas are bad. That reminds of my conversation with our masters thesis guide who is a

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 12:02, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Dickson S. Guedes lis...@guedesoft.net writes: 2013/1/21 Robert Haas robertmh...@gmail.com: Another thing is that we might want to document that if a command errors out, ddl_command_end will never be reached; and

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-22 Thread Dimitri Fontaine
Phil Sorber p...@omniti.com writes: What do you think about the idea of a full WAL proxy? Probably not for 9.3 at this point though. I was thinking that a WAL proxy nowadays is called a cascading standby with local archiving enabled. I'm not sure why you would want to trust your archiving and

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-22 Thread Heikki Linnakangas
On 22.01.2013 15:02, Dimitri Fontaine wrote: Phil Sorberp...@omniti.com writes: What do you think about the idea of a full WAL proxy? Probably not for 9.3 at this point though. I was thinking that a WAL proxy nowadays is called a cascading standby with local archiving enabled. I'm not sure

Re: [HACKERS] CF3+4 (was Re: Parallel query execution)

2013-01-22 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: I'm not going to pretend that all review comments are constructive, but I also think that to some degree the difference between these two things depends on your perspective. I recall, in particular, the email that prompted the famous in short: -1 from

Re: [HACKERS] CF3+4 (was Re: Parallel query execution)

2013-01-22 Thread Pavel Stehule
Yeah, agree. May be we need to put that in the process itself. So no patch be submitted unless the idea has been discussed and agreed upon to some extent. Of course, few things you will only know once you start writing the code. But at least the major points must have been accepted by at

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: DROP SCHEMA public; CREATE SCHEMA public; changes the OID of schema public, whereas the search_path that's cached for the cached plan is cached in terms of OIDs. So while there is a table named public.z1 at the end of the sequence, it's not in any schema

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: Would it be desirable to have ddl_command_success and ddl_command_failed events. These would effectively be subsets to No, because you can't run any SQL in a failed transaction. This, unfortunately, introducing awkwardness with the WHEN clause restriction

[HACKERS] Re: Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Andres Freund
On 2013-01-22 14:24:26 +0100, Dimitri Fontaine wrote: Tom Lane t...@sss.pgh.pa.us writes: DROP SCHEMA public; CREATE SCHEMA public; changes the OID of schema public, whereas the search_path that's cached for the cached plan is cached in terms of OIDs. So while there is a table

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-22 Thread Dimitri Fontaine
Heikki Linnakangas hlinnakan...@vmware.com writes: You might not want to keep a copy of the whole data directory around, as you have to in a cascading standby. I can see value in a separate WAL proxy software, especially if it's integrated into a larger backup manager program like barman or

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 13:28, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Thom Brown t...@linux.com writes: Would it be desirable to have ddl_command_success and ddl_command_failed events. These would effectively be subsets to No, because you can't run any SQL in a failed transaction. Okay,

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

2013-01-22 Thread Zoltán Böszörményi
2013-01-22 13:32 keltezéssel, Amit kapila írta: On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: 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

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

2013-01-22 Thread Amit Kapila
On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: 2013-01-22 13:32 keltezéssel, Amit kapila írta: On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: 2013-01-18 21:48 keltezéssel, Boszormenyi Zoltan írta: 2013-01-18 21:32 keltezéssel, Tom Lane írta: Boszormenyi

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-22 Thread Phil Sorber
On Tue, Jan 22, 2013 at 8:33 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: You might not want to keep a copy of the whole data directory around, as you have to in a cascading standby. I can see value in a separate WAL proxy software,

Re: [HACKERS] CF3+4 (was Re: Parallel query execution)

2013-01-22 Thread Andrew Dunstan
On 01/22/2013 01:15 AM, Tom Lane wrote: Yeah, and a lot more fairly-new developers who don't understand all the connections in the existing system. I think it's just in the nature of the beast we're dealing with to be much more conservative about what we accept than it might be for some

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: Ah, in that case, the docs are wrong: http://www.postgresql.org/docs/devel/static/sql-createeventtrigger.html Oh. It's missing the comma and applying the AND at the wrong level, here's a fix: diff --git a/doc/src/sgml/ref/create_event_trigger.sgml

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 14:45, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Thom Brown t...@linux.com writes: Ah, in that case, the docs are wrong: http://www.postgresql.org/docs/devel/static/sql-createeventtrigger.html Oh. It's missing the comma and applying the AND at the wrong level, here's

Re: [HACKERS] Re: Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Dimitri Fontaine
Andres Freund and...@2ndquadrant.com writes: On 2013-01-22 14:24:26 +0100, Dimitri Fontaine wrote: Tom Lane t...@sss.pgh.pa.us writes: DROP SCHEMA public; CREATE SCHEMA public; changes the OID of schema public, whereas the search_path that's cached for the cached plan is cached in

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

2013-01-22 Thread Fujii Masao
On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila amit.kap...@huawei.com wrote: On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: 2013-01-22 13:32 keltezéssel, Amit kapila írta: On Saturday, January 19, 2013 2:37 AM Boszormenyi Zoltan wrote: 2013-01-18 21:48 keltezéssel, Boszormenyi

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 14:47, Thom Brown t...@linux.com wrote: On 22 January 2013 14:45, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Thom Brown t...@linux.com writes: Ah, in that case, the docs are wrong: http://www.postgresql.org/docs/devel/static/sql-createeventtrigger.html Oh. It's missing

Re: [HACKERS] logical changeset generation v4

2013-01-22 Thread Andres Freund
Hi, I pushed a new rebased version (the xlogreader commit made it annoying to merge). The main improvements are * way much coherent code internally for intializing logical rep * explicit control over slots * options for logical replication On 2013-01-19 23:42:02 -0500, Steve Singer wrote: On

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 16:28, Thom Brown t...@linux.com wrote: On 22 January 2013 14:47, Thom Brown t...@linux.com wrote: postgres=# CREATE EVENT TRIGGER cmd_trg_after_any_command ON ddl_command_end WHEN TAG IN ('ANY COMMAND') EXECUTE PROCEDURE cmd_trg_info(); CREATE EVENT TRIGGER I can see why

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

2013-01-22 Thread Fujii Masao
On Tue, Jan 22, 2013 at 11:54 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila amit.kap...@huawei.com wrote: On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: 2013-01-22 13:32 keltezéssel, Amit kapila írta: On Saturday, January 19, 2013

[HACKERS] Patch: clean up addRangeTableEntryForFunction

2013-01-22 Thread David Fetter
Folks, I've been working with Andrew Gierth (well, mostly he's been doing the work, as usual) to add WITH ORDINALITY as an option for set-returning functions. In the process, he found a minor opportunity to clean up the interface for $SUBJECT, reducing the call to a Single Point of Truth for

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: ALTER INDEX is missing from the event trigger matrix. When renaming a column on a foreign table, tg_tag reports 'ALTER TABLE' instead of 'ALTER FOREIGN TABLE'. It doesn't do this for any other ALTER FOREIGN TABLE operation, including altering, adding or

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: test2=# CREATE EVENT TRIGGER cmd_trg_before_any_command ON ddl_command_end WHEN TAG IN ('MEOW LIKE A CAT') EXECUTE PROCEDURE cmd_trg_info_any(); CREATE EVENT TRIGGER ...unless I've coincidentally stumbled upon the new MEOW LIKE A CAT command coming in 9.3.

Re: [HACKERS] CF3+4 (was Re: Parallel query execution)

2013-01-22 Thread Gavin Flower
On 22/01/13 22:35, Dimitri Fontaine wrote: Tom Lane t...@sss.pgh.pa.us writes: In this connection I refer you to Sturgeon's Law(*): 90% of everything is crud. Applied to our problem, it says that 90% of all patch ideas are bad. Therefore, we should be expecting to reject a large fraction of

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Jan 22, 2013 at 2:17 AM, Tom Lane t...@sss.pgh.pa.us wrote: I think what's happening is that this bit: DROP SCHEMA public; CREATE SCHEMA public; changes the OID of schema public, whereas the search_path that's cached for the cached plan is

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Tom Lane t...@sss.pgh.pa.us writes: DROP SCHEMA public; CREATE SCHEMA public; changes the OID of schema public, whereas the search_path that's cached for the cached plan is cached in terms of OIDs. So while there is a table named public.z1 at

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Instead of re-establishing the original search_path in a rather vain hope that the same objects will be re-selected by parse analysis, we should consider that the prepared query has a dependency on the active search path, and thus force a replan if the

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

2013-01-22 Thread Pavel Stehule
Hello 2013/1/22 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: so here is rewritten patch I've applied the infrastructure parts of this, but not the changes to format() and concat(). Why are the format and concat patches so randomly different? Not only is the

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

2013-01-22 Thread Pavel Stehule
sorry I have to change wrong comment Regards Pavel 2013/1/22 Pavel Stehule pavel.steh...@gmail.com: Hello 2013/1/22 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: so here is rewritten patch I've applied the infrastructure parts of this, but not the changes

Re: [HACKERS] Removing PD_ALL_VISIBLE

2013-01-22 Thread Jeff Davis
was an uninitialized variable. New version attached. FWIW, I'm considering this patch to be rejected; I just didn't want to leave a patch with a bug in it. Regards, Jeff Davis rm-pd-all-visible-20130122.patch.gz Description: GNU Zip compressed data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]

2013-01-22 Thread Jameison Martin
Sorry for the late response, I just happened to see this yesterday. Running a general benchmark against the patch as Keven suggests is a good idea.  Amit, can you supply the actual values you saw when running pgbench (the 3 values for each run)? I'd like to verify that the 1% difference isn't

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Andres Freund
On 2013-01-18 17:20:51 -0500, Robert Haas wrote: 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 ---

Re: [HACKERS] psql: small patch to correct filename formatting error in '\s FILE' output

2013-01-22 Thread Tom Lane
Ian Lawrence Barwick barw...@gmail.com writes: I've noticed a filename error in feedback messages from psql's '\s' command when saving the command line history to a file specified by an absolute filepath: psql (9.2.2) Type help for help. pgdevel=# \s history.txt Wrote history to

Re: [HACKERS] psql: small patch to correct filename formatting error in '\s FILE' output

2013-01-22 Thread Dickson S. Guedes
2013/1/22 Tom Lane t...@sss.pgh.pa.us: Why should \s, and \s alone, need to remind you where you're cd'd to? Why not just get rid of that prefixed cd'd path in \s? []s -- Dickson S. Guedes mail/xmpp: gue...@guedesoft.net - skype: guediz http://github.com/guedes - http://guedesoft.net

Re: [HACKERS] psql: small patch to correct filename formatting error in '\s FILE' output

2013-01-22 Thread Tom Lane
I wrote: If we did think that this specific backslash command needed to be able to print something other than the filename as-entered, I'd be inclined to just apply make_absolute_path() to the name, instead of relying on inadequate dead-reckoning. However, that would require making

Re: [HACKERS] Request for vote to move forward with recovery.conf overhaul

2013-01-22 Thread Cédric Villemain
Le mardi 22 janvier 2013 01:54:50, Michael Paquier a écrit : On Tue, Jan 22, 2013 at 9:27 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 21, 2013 at 6:23 PM, Michael Paquier michael.paqu...@gmail.com wrote: Yes, that is one of the most important patches in the list, and I could

Re: [HACKERS] psql: small patch to correct filename formatting error in '\s FILE' output

2013-01-22 Thread Ian Lawrence Barwick
2013/1/23 Tom Lane t...@sss.pgh.pa.us: I wrote: If we did think that this specific backslash command needed to be able to print something other than the filename as-entered, I'd be inclined to just apply make_absolute_path() to the name, instead of relying on inadequate dead-reckoning.

Re: [HACKERS] Request for vote to move forward with recovery.conf overhaul

2013-01-22 Thread Simon Riggs
On 21 January 2013 23:23, Michael Paquier michael.paqu...@gmail.com wrote: It is an 17-month-old-patch, so of course it does not apply on master. However before taking any actions, I would like to know the following: - Simon, are you planning to update this patch? It's on my list, but not at

Re: [HACKERS] psql: small patch to correct filename formatting error in '\s FILE' output

2013-01-22 Thread Tom Lane
Ian Lawrence Barwick barw...@gmail.com writes: Related email from the archives on this subject: http://www.postgresql.org/message-id/37ed240d0611200645l5b70c8ddw5fb735e0d35a7...@mail.gmail.com I agree with the opinion stated there that \cd with no argument really ought to do what cd with no

Re: [HACKERS] Patch: clean up addRangeTableEntryForFunction

2013-01-22 Thread Craig Ringer
On 01/23/2013 12:45 AM, David Fetter wrote: Folks, I've been working with Andrew Gierth (well, mostly he's been doing the work, as usual) to add WITH ORDINALITY as an option for set-returning functions. In the process, he found a minor opportunity to clean up the interface for $SUBJECT,

Re: [HACKERS] WIP: index support for regexp search

2013-01-22 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: I finally got around to look at this. I like this new version, without the path matrix, much better. I looked through this version too. I have some notes/issues: The biggest problem is that I really don't care for the idea of contrib/pg_trgm

Re: [HACKERS] lazy_vacuum_heap()'s removal of HEAPTUPLE_DEAD tuples

2013-01-22 Thread Stephen Frost
Noah, * Noah Misch (n...@leadboat.com) wrote: The attached update fixes both problems. (I have also attached the unchanged backpatch-oriented fix to keep things together.) I've just started looking at/playing with this patch and was wondering if you'd missed Jeff's comments on it..? I note

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Tue, Jan 22, 2013 at 7:29 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Dimitri Fontaine dimi...@2ndquadrant.fr writes: I added some in the attached patch. doc/src/sgml/event-trigger.sgml | 10 ++ src/backend/commands/event_trigger.c|6 +-

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Tue, Jan 22, 2013 at 7:02 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: I had to make quiet a part of the regression tests because of the ERROR message containing an OID, where I think it's the right error message. I have a feeling that's the sort of error message that we don't want

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Tue, Jan 22, 2013 at 11:38 AM, Thom Brown t...@linux.com wrote: ...unless I've coincidentally stumbled upon the new MEOW LIKE A CAT command coming in 9.3. ;) +1 for adding that. I've been wanting it for years. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise

[HACKERS] Back-branch update releases coming in a couple weeks

2013-01-22 Thread Tom Lane
Since we've fixed a couple of relatively nasty bugs recently, the core committee has determined that it'd be a good idea to push out PG update releases soon. The current plan is to wrap on Monday Feb 4 for public announcement Thursday Feb 7. If you're aware of any bug fixes you think ought to

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Gavin Flower
On 23/01/13 16:02, Robert Haas wrote: On Tue, Jan 22, 2013 at 11:38 AM, Thom Brown t...@linux.com wrote: ...unless I've coincidentally stumbled upon the new MEOW LIKE A CAT command coming in 9.3. ;) +1 for adding that. I've been wanting it for years. Can we have it back ported to 9.2,

Re: [HACKERS] Further pg_upgrade analysis for many tables

2013-01-22 Thread Bruce Momjian
On Sun, Jan 20, 2013 at 02:11:48PM -0500, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: !* Using pg_restore --single-transaction is faster than other !* methods, like --jobs. Is this still the case now that Jeff's AtEOXact patch is in? The

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

2013-01-22 Thread Amit Kapila
On Tuesday, January 22, 2013 8:25 PM Fujii Masao wrote: On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila amit.kap...@huawei.com wrote: On Tuesday, January 22, 2013 7:10 PM Zoltán Böszörményi wrote: 2013-01-22 13:32 keltezéssel, Amit kapila írta: On Saturday, January 19, 2013 2:37 AM

Re: [HACKERS] lazy_vacuum_heap()'s removal of HEAPTUPLE_DEAD tuples

2013-01-22 Thread Noah Misch
On Sat, Jan 19, 2013 at 02:58:32PM -0800, Jeff Janes wrote: I have a preliminary nit-pick on the big patch. It generates a compiler warning: vacuumlazy.c: In function ?lazy_scan_heap?: vacuumlazy.c:445:9: warning: variable ?prev_dead_count? set but not used [-Wunused-but-set-variable]

Re: [HACKERS] Back-branch update releases coming in a couple weeks

2013-01-22 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Since we've fixed a couple of relatively nasty bugs recently, the core committee has determined that it'd be a good idea to push out PG update releases soon. The current plan is to wrap on Monday Feb 4 for public announcement Thursday Feb 7. If you're

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Michael Paquier
On Wed, Jan 23, 2013 at 12:23 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: On 23/01/13 16:02, Robert Haas wrote: On Tue, Jan 22, 2013 at 11:38 AM, Thom Brown t...@linux.com t...@linux.com wrote: ...unless I've coincidentally stumbled upon the new MEOW LIKE A CAT command coming

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Tom Lane (t...@sss.pgh.pa.us) wrote: Instead of re-establishing the original search_path in a rather vain hope that the same objects will be re-selected by parse analysis, we should consider that the prepared query has a dependency on the active

Re: [HACKERS] Re: patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap [Review]

2013-01-22 Thread Amit Kapila
On Wednesday, January 23, 2013 2:30 AM Jameison Martin wrote: Sorry for the late response, I just happened to see this yesterday. Running a general benchmark against the patch as Keven suggests is a good idea.  Amit, can you supply the actual values you saw when running pgbench (the 3 values

[HACKERS] fixing pg_ctl with relative paths

2013-01-22 Thread Josh Kupershmidt
There have been some complaints[1][2] in the past about pg_ctl not playing nice with relative path specifications for the datadir. Here's a concise illustration: $ mkdir /tmp/mydata/ initdb /tmp/mydata/ $ cd /tmp/ $ pg_ctl -D ./mydata/ start $ cd / $ pg_ctl -D /tmp/mydata/ restart IMO

Re: [HACKERS] Back-branch update releases coming in a couple weeks

2013-01-22 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Tom Lane (t...@sss.pgh.pa.us) wrote: Since we've fixed a couple of relatively nasty bugs recently, the core committee has determined that it'd be a good idea to push out PG update releases soon. The current plan is to wrap on Monday Feb 4 for public

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Anyway, we're not talking about a back-patched fix I think, but something we'd change in a new major release. Agreed. However, it could still come annoyingly close to any DDL invalidates all cached plans, at least for apps that keep most of their

[HACKERS] [RFC] overflow checks optimized away

2013-01-22 Thread Xi Wang
Intel's icc and PathScale's pathcc compilers optimize away several overflow checks, since they consider signed integer overflow as undefined behavior. This leads to a vulnerable binary. Currently we use -fwrapv to disable such (mis)optimizations in gcc, but not in other compilers. Examples

Re: [HACKERS] Patch: clean up addRangeTableEntryForFunction

2013-01-22 Thread Tom Lane
David Fetter da...@fetter.org writes: I've been working with Andrew Gierth (well, mostly he's been doing the work, as usual) to add WITH ORDINALITY as an option for set-returning functions. In the process, he found a minor opportunity to clean up the interface for $SUBJECT, reducing the call

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Mon, Jan 21, 2013 at 12:27 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: - Context exposing and filtering My preference for that point is to include it and limit it to event triggers written in C, leaving the door open to add new events in the future, and allowing

Re: [HACKERS] Prepared statements fail after schema changes with surprising error

2013-01-22 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Tom Lane (t...@sss.pgh.pa.us) wrote: However, it could still come annoyingly close to any DDL invalidates all cached plans, at least for apps that keep most of their objects in one schema. Not entirely sure it's worth the implementation hassle and

Re: [HACKERS] lazy_vacuum_heap()'s removal of HEAPTUPLE_DEAD tuples

2013-01-22 Thread Noah Misch
On Tue, Jan 22, 2013 at 09:45:37PM -0500, Stephen Frost wrote: * Noah Misch (n...@leadboat.com) wrote: The attached update fixes both problems. (I have also attached the unchanged backpatch-oriented fix to keep things together.) I've just started looking at/playing with this patch

Re: [HACKERS] Request for vote to move forward with recovery.conf overhaul

2013-01-22 Thread Michael Paquier
On Wed, Jan 23, 2013 at 1:49 PM, Michael Paquier michael.paqu...@gmail.comwrote: I found that support for pg_basebackup -R was in the old patch, and I haven't done anything for that yet. Sorry, I meant that pg_basebackup -R support was NOT in the old patch, and I haven't done anything about

Re: [HACKERS] Request for vote to move forward with recovery.conf overhaul

2013-01-22 Thread Josh Berkus
- if you want to trigger a recovery at promotion or have the recovery parameters read on slave at startup, you need to create a file called recovery.trigger in PGDATA. (something like touch recovery.conf is enough). Once recovery is done, recovery.trigger is changed to recovery.done. So,

[HACKERS] .gitignore additions

2013-01-22 Thread Craig Ringer
Hi all Would a committer be willing to pop some entries in .gitignore for Windows native build outputs? *.sln *.vcproj *.vcxproj It'd make life easier when testing Windows changes. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training

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

2013-01-22 Thread Jon Erdman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Updated the patch in commitfest with the doc change, and added a comment to explain the whitespace change (it was to clean up the sql indentation). I've also attached the new patch here for reference. - -- Jon T Erdman (aka StuckMojo) PostgreSQL

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

2013-01-22 Thread Phil Sorber
On Wed, Jan 23, 2013 at 12:10 AM, Jon Erdman postgre...@thewickedtribe.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Updated the patch in commitfest with the doc change, and added a comment to explain the whitespace change (it was to clean up the sql indentation). I've also

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

2013-01-22 Thread Jon Erdman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Done. Attached. - -- Jon T Erdman (aka StuckMojo) PostgreSQL Zealot On 01/22/2013 11:17 PM, Phil Sorber wrote: On Wed, Jan 23, 2013 at 12:10 AM, Jon Erdman postgre...@thewickedtribe.net wrote: Updated the patch in commitfest with the doc

Re: [HACKERS] Visual Studio 2012 RC

2013-01-22 Thread Craig Ringer
On 01/21/2013 09:06 PM, Craig Ringer wrote: It's building on my Jenkins instance at the moment, to make sure it doesn't break VS 2010 / Windows SDK 7.1 . I've merged it into HEAD and pushed to https://github.com/ringerc/postgres/tree/vs2012; the only conflict was a trivial one in the docs. A

[HACKERS] Patch: UNNEST (and other functions) WITH ORDINALITY

2013-01-22 Thread David Fetter
Folks, Please find attached a patch which implements the SQL standard UNNEST() WITH ORDINALITY. It doesn't stop there. Any function call in a FROM clause can now take WITH ORDINALITY, which appends a counter (ordinality) column to the columns the function outputs and produce results like this:

Re: [HACKERS] .gitignore additions

2013-01-22 Thread David Fetter
On Wed, Jan 23, 2013 at 01:05:12PM +0800, Craig Ringer wrote: Hi all Would a committer be willing to pop some entries in .gitignore for Windows native build outputs? *.sln *.vcproj *.vcxproj It'd make life easier when testing Windows changes. While they're at it, it'd be nice to have

Re: [HACKERS] Patch: UNNEST (and other functions) WITH ORDINALITY

2013-01-22 Thread David Fetter
On Tue, Jan 22, 2013 at 10:29:43PM -0800, David Fetter wrote: Folks, Please find attached a patch which implements the SQL standard UNNEST() WITH ORDINALITY. Added to CF4. Cheers, David. -- David Fetter da...@fetter.org http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!:

Re: [HACKERS] Visual Studio 2012 RC

2013-01-22 Thread Craig Ringer
On 01/23/2013 02:14 PM, Craig Ringer wrote: On 01/21/2013 09:06 PM, Craig Ringer wrote: It's building on my Jenkins instance at the moment, to make sure it doesn't break VS 2010 / Windows SDK 7.1 . I've merged it into HEAD and pushed to https://github.com/ringerc/postgres/tree/vs2012; the

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

2013-01-22 Thread Pavel Stehule
Hello I sent a updated patch, but still I am not sure in one topic Also, I'm not sure that it's appropriate to throw an error if the given argument is null or not an array. Previous versions did not throw an error in such cases. Perhaps just fall back to behaving as if it weren't marked

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

2013-01-22 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: what should be result of concat(variadic NULL::int[]) I enabled this use case, but what should be result? I think there are two somewhat defensible theories: (1) punt, and return NULL overall. So in this case the variadic function would act as if

Re: [HACKERS] WIP: index support for regexp search

2013-01-22 Thread Alexander Korotkov
Hi! Some quick answers to the part of notes/issues. I will provide rest of answers soon. On Wed, Jan 23, 2013 at 6:08 AM, Tom Lane t...@sss.pgh.pa.us wrote: The biggest problem is that I really don't care for the idea of contrib/pg_trgm being this cozy with the innards of regex_t. Sooner or

[HACKERS] questions about ON SELECT rules

2013-01-22 Thread Zhaomo Yang
Hi folks, I'm working on a project where I need to run some commands/functions when SELECT are executed on certain tables. I looked at the rule system and found the following paragraph in the documentation: Currently, there can be only one action in an ON SELECT rule, and it must be an