[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 uncondi

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 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 later we are go

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

2013-01-22 Thread Tom Lane
Pavel Stehule 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 it were STRICT. That

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 marke

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;

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 http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype:

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 nic

[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] 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.

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 > wrote: > > Updated the patch in commitfest with the doc change, and added a > comm

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 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 attached the new patch here

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 Z

[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] 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.

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 wrote: > 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 that. Typed too quickly..

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 thi

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

2013-01-22 Thread Tom Lane
Stephen Frost 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 extra sin

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Mon, Jan 21, 2013 at 12:27 PM, Dimitri Fontaine 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 existing consumers of th

Re: [HACKERS] Patch: clean up addRangeTableEntryForFunction

2013-01-22 Thread Tom Lane
David Fetter 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 to a Single P

[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] 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 the

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

2013-01-22 Thread Tom Lane
Stephen Frost 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 >> announcem

[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 IM

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 valu

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

2013-01-22 Thread Tom Lane
Stephen Frost 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 search path, a

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 > wrote: > > ...unless I've coincidentally stumbled upon the new MEOW LIKE A CAT > command coming in 9.3. ;) > > +1

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'r

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] 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 > 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 w

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 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 risk > of l

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 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, please Please, PLEAS

[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 get

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Tue, Jan 22, 2013 at 11:38 AM, Thom Brown 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 PostgreSQL Company

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Tue, Jan 22, 2013 at 7:02 AM, Dimitri Fontaine 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 people to get. Can we a

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Robert Haas
On Tue, Jan 22, 2013 at 7:29 AM, Dimitri Fontaine wrote: > Dimitri Fontaine 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] 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 not

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

2013-01-22 Thread Tom Lane
Heikki Linnakangas 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 being this cozy with

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] psql: small patch to correct filename formatting error in '\s FILE' output

2013-01-22 Thread Tom Lane
Ian Lawrence Barwick 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 argument usually

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 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 the front to the queue.

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 : > 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 w

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 wrote: > > > On Mon, Jan 21, 2013 at 6:23 PM, Michael Paquier > > wrote: > > > Yes, that is one of the most important patches in the list, and I could > > put > > > some effort in it for e

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 > make_

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 : > 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 http://www.postgresql.org

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

2013-01-22 Thread Tom Lane
Ian Lawrence Barwick 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 file "./hi

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 wrote: > > Robert Haas writes: > >> On Fri, Jan 18, 2013 at 1:59 PM, Tom Lane wrote: > >>> Well, that burden already exists for non-utility statements --- why > >>> should utility statements get a pass?

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 du

Re: [HACKERS] Removing PD_ALL_VISIBLE

2013-01-22 Thread Jeff Davis
e table would fit. Also, I fixed a bug that I noticed along the way, which 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-2013

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 : > Hello > > > > 2013/1/22 Tom Lane : >> Pavel Stehule 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 for

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

2013-01-22 Thread Pavel Stehule
Hello 2013/1/22 Tom Lane : > Pavel Stehule 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 implementation complete

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 t

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

2013-01-22 Thread Tom Lane
Dimitri Fontaine writes: > Tom Lane 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'

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

2013-01-22 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 22, 2013 at 2:17 AM, Tom Lane 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 cached in terms of OIDs. So

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 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.

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown 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. ;) Oe N

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown 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 > dropping a c

[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 late

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 wrote: > On Tue, Jan 22, 2013 at 11:07 PM, Amit Kapila 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: >

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 16:28, Thom Brown wrote: > On 22 January 2013 14:47, Thom Brown 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 this works now. The d

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 1

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 14:47, Thom Brown wrote: > On 22 January 2013 14:45, Dimitri Fontaine wrote: >> Thom Brown 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

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 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 Zoltan írta:

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

2013-01-22 Thread Dimitri Fontaine
Andres Freund writes: > On 2013-01-22 14:24:26 +0100, Dimitri Fontaine wrote: >> Tom Lane 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

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 14:45, Dimitri Fontaine wrote: > Thom Brown 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/s

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown 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 b/doc/src/sgml/ref/creat

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 ot

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 wrote: > Heikki Linnakangas 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

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: > >>> Bos

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 writes: 2013-01-18 11:05 keltezéssel, Amit kapila írta: On us

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 13:28, Dimitri Fontaine wrote: > Thom Brown 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, I had misunderstood something

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-22 Thread Dimitri Fontaine
Heikki Linnakangas 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 wal-e. +1 I somehow

[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 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 p

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Thom Brown 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 which doesn'

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

2013-01-22 Thread Dimitri Fontaine
Tom Lane 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 > found in

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 b

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

2013-01-22 Thread Dimitri Fontaine
Robert Haas 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 me regards tom l

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 Sorber 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 wan

Re: [HACKERS] Teaching pg_receivexlog to follow timeline switches

2013-01-22 Thread Dimitri Fontaine
Phil Sorber 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 WAL relaying to

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Thom Brown
On 22 January 2013 12:02, Dimitri Fontaine wrote: > > "Dickson S. Guedes" writes: > > 2013/1/21 Robert Haas : > >> Another thing is that we might want to document that if a command > >> errors out, ddl_command_end will never be reached; and perhaps also > >> that if ddl_command_start errors out,

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 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 accomplished profe

Re: [HACKERS] allowing privileges on untrusted languages

2013-01-22 Thread Dimitri Fontaine
Tom Lane 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 specific operation

Re: [HACKERS] pg_ctl idempotent option

2013-01-22 Thread Ashutosh Bapat
On Tue, Jan 15, 2013 at 9:36 PM, Tom Lane wrote: > Peter Eisentraut 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 forgotten to mention t

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Dimitri Fontaine 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 +++ > src/test/regress/sql/event_trigger.sql

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Dimitri Fontaine
Robert Haas 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 ddl_command_start > and ddl_co

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 wrote: > Peter van Hardenberg 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 essence remaining: > > Hm

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 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 people still using 7.2.

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 > 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 sol

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

2013-01-22 Thread Dimitri Fontaine
Tom Lane 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 people seem to t

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

2013-01-22 Thread Pavel Stehule
2013/1/22 Tom Lane : > Pavel Stehule 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 implementation completely differ