Re: [HACKERS] pg_terminate_backend for same-role

2012-03-15 Thread Daniel Farina
On Thu, Mar 15, 2012 at 10:45 PM, Tom Lane wrote: > Daniel Farina writes: >> On Thu, Mar 15, 2012 at 10:33 PM, Tom Lane wrote: >>> But actually I don't see what you hope to gain from such a change, >>> even if it can be made to work.  Anyone who can do kill(SIGINT) can >>> do kill(SIGKILL), say

Re: [HACKERS] pg_terminate_backend for same-role

2012-03-15 Thread Tom Lane
Daniel Farina writes: > On Thu, Mar 15, 2012 at 10:33 PM, Tom Lane wrote: >> But actually I don't see what you hope to gain from such a change, >> even if it can be made to work.  Anyone who can do kill(SIGINT) can >> do kill(SIGKILL), say --- so you have to be able to trust the signal >> sender.

Re: [HACKERS] pg_terminate_backend for same-role

2012-03-15 Thread Daniel Farina
On Thu, Mar 15, 2012 at 10:33 PM, Tom Lane wrote: > Daniel Farina writes: >> The way MyCancelKey is checked now is backwards, in my mind.  It seems >> like it would be better checked by the receiving PID (one can use a >> check/recheck also, if so inclined).  Is there a large caveat to that? > >

Re: [HACKERS] pg_terminate_backend for same-role

2012-03-15 Thread Tom Lane
Daniel Farina writes: > The way MyCancelKey is checked now is backwards, in my mind. It seems > like it would be better checked by the receiving PID (one can use a > check/recheck also, if so inclined). Is there a large caveat to that? You mean, other than the fact that kill(2) can't transmit s

Re: [HACKERS] pg_terminate_backend for same-role

2012-03-15 Thread Daniel Farina
On Thu, Mar 15, 2012 at 9:39 PM, Fujii Masao wrote: >> Shall we just do everything using the >> MyCancelKey (which I think could just be called "SessionKey", >> "SessionSecret", or even just "Session") as to ensure we have no case >> of mistaken identity? Or does that end up being problematic? > >

Re: [HACKERS] pg_terminate_backend for same-role

2012-03-15 Thread Fujii Masao
On Fri, Mar 16, 2012 at 8:14 AM, Daniel Farina wrote: > Parallel to pg_cancel_backend, it'd be nice to allow the user to just > outright kill a backend that they own (politely, with a SIGTERM), > aborting any transactions in progress, including the idle transaction, > and closing the socket. +1

Re: [HACKERS] patch for parallel pg_dump

2012-03-15 Thread Robert Haas
On Thu, Mar 15, 2012 at 12:56 AM, Joachim Wieland wrote: > On Wed, Mar 14, 2012 at 2:02 PM, Robert Haas wrote: >> I think we should get rid of die_horribly(), and instead have arrange >> to always clean up AH via an on_exit_nicely hook. > > Good. The only exit handler I've seen so far is > pgdump

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Bruce Momjian
On Tue, Mar 13, 2012 at 01:46:24PM -0400, Robert Haas wrote: > On Mon, Mar 12, 2012 at 3:28 PM, Simon Riggs wrote: > > I agree with you that some worst case performance tests should be > > done. Could you please say what you think the worst cases would be, so > > those can be tested? That would av

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Bruce Momjian
On Thu, Mar 15, 2012 at 11:04:06PM -0400, Bruce Momjian wrote: > On Tue, Mar 13, 2012 at 02:35:02PM -0300, Alvaro Herrera wrote: > > > > Excerpts from Bruce Momjian's message of mar mar 13 14:00:52 -0300 2012: > > > > > > On Tue, Mar 06, 2012 at 04:39:32PM -0300, Alvaro Herrera wrote: > > > > >

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Bruce Momjian
On Tue, Mar 13, 2012 at 02:35:02PM -0300, Alvaro Herrera wrote: > > Excerpts from Bruce Momjian's message of mar mar 13 14:00:52 -0300 2012: > > > > On Tue, Mar 06, 2012 at 04:39:32PM -0300, Alvaro Herrera wrote: > > > > When there is a single locker in a tuple, we can just store the locking >

Re: [HACKERS] Keystone auth in PostgreSQL

2012-03-15 Thread Tom Lane
Daniel Farina writes: > On Thu, Mar 15, 2012 at 6:38 PM, Tom Lane wrote: >> Our standard answer when someone asks for $random-auth-method is to >> suggest that they find a PAM module for it and use PAM. I wouldn't >> want to claim that PAM is a particularly great interface for this >> sort of th

Re: [HACKERS] Keystone auth in PostgreSQL

2012-03-15 Thread Daniel Farina
On Thu, Mar 15, 2012 at 6:38 PM, Tom Lane wrote: > Our standard answer when someone asks for $random-auth-method is to > suggest that they find a PAM module for it and use PAM.  I wouldn't > want to claim that PAM is a particularly great interface for this > sort of thing, but it's out there and I

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Noah Misch
On Thu, Mar 15, 2012 at 08:37:36PM -0400, Robert Haas wrote: > On Thu, Mar 15, 2012 at 5:07 PM, Simon Riggs wrote: > > On Wed, Mar 14, 2012 at 5:23 PM, Robert Haas wrote: > >>> You still have HEAP_XMAX_{INVALID,COMMITTED} to reduce the pressure on > >>> mxid > >>> lookups, so I think something m

Re: [HACKERS] Keystone auth in PostgreSQL

2012-03-15 Thread Tom Lane
Daniel Farina writes: > From my vantage point, a rehash of federated authentication of some > kind would be enormously useful, but it's not really clear if there > are any concrete implementations worth supporting directly: I only > wish it was much easier to delegate authentication so someone cou

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Alvaro Herrera
Excerpts from Robert Haas's message of jue mar 15 21:37:36 -0300 2012: > > On Thu, Mar 15, 2012 at 5:07 PM, Simon Riggs wrote: > > On Wed, Mar 14, 2012 at 5:23 PM, Robert Haas wrote: > >>> You still have HEAP_XMAX_{INVALID,COMMITTED} to reduce the pressure on > >>> mxid > >>> lookups, so I thi

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Robert Haas
On Thu, Mar 15, 2012 at 5:07 PM, Simon Riggs wrote: > On Wed, Mar 14, 2012 at 5:23 PM, Robert Haas wrote: >>> You still have HEAP_XMAX_{INVALID,COMMITTED} to reduce the pressure on mxid >>> lookups, so I think something more sophisticated is needed to exercise that >>> cost.  Not sure what. >> >>

Re: [HACKERS] Storage Manager crash at mdwrite()

2012-03-15 Thread Jeff Davis
On Thu, 2012-03-15 at 19:36 -0400, Tareq Aljabban wrote: > When configuring postgreSQL, I'm adding the libraries needed to run > HDFS C API (libhdfs). > >From the information below, it looks like C++. > > ./configure --prefix=/diskless/myUser/Workspace/EclipseWS1/pgsql > --enable-depend --enab

Re: [HACKERS] Storage Manager crash at mdwrite()

2012-03-15 Thread Tareq Aljabban
When configuring postgreSQL, I'm adding the libraries needed to run HDFS C API (libhdfs). ./configure --prefix=/diskless/myUser/Workspace/EclipseWS1/pgsql --enable-depend --enable-cassert --enable-debug CFLAGS="$CFLAGS -I/diskless/myUser/Workspace/HDFS_Append/hdfs/src/c++/libhdfs -I/usr/lib/jvm/

[HACKERS] pg_terminate_backend for same-role

2012-03-15 Thread Daniel Farina
Parallel to pg_cancel_backend, it'd be nice to allow the user to just outright kill a backend that they own (politely, with a SIGTERM), aborting any transactions in progress, including the idle transaction, and closing the socket. I imagine the problem is a race condition whereby a pid might be re

Re: [HACKERS] Command Triggers, v16

2012-03-15 Thread Thom Brown
On 15 March 2012 22:06, Dimitri Fontaine wrote: > Dimitri Fontaine writes: >>> At this moment in time, CTAS is still outstanding.  Is the plan to try >>> to get that in for this release, or as an enhancement in 9.3? >> >> The plan is to get CTAS as a utility command in 9.2 then update the >> comm

Re: [HACKERS] Faster compression, again

2012-03-15 Thread k...@rice.edu
On Thu, Mar 15, 2012 at 10:14:12PM +, Simon Riggs wrote: > On Wed, Mar 14, 2012 at 6:06 PM, Daniel Farina wrote: > > > If we're curious how it affects replication > > traffic, I could probably gather statistics on LZO-compressed WAL > > traffic, of which we have a pretty huge amount captured.

Re: [HACKERS] Faster compression, again

2012-03-15 Thread Daniel Farina
On Thu, Mar 15, 2012 at 3:14 PM, Simon Riggs wrote: > On Wed, Mar 14, 2012 at 6:06 PM, Daniel Farina wrote: > >> If we're curious how it affects replication >> traffic, I could probably gather statistics on LZO-compressed WAL >> traffic, of which we have a pretty huge amount captured. > > What's

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Simon Riggs
On Thu, Mar 15, 2012 at 10:13 PM, Alvaro Herrera wrote: > > Excerpts from Simon Riggs's message of jue mar 15 19:04:41 -0300 2012: >> >> On Thu, Mar 15, 2012 at 9:54 PM, Alvaro Herrera >> wrote: >> > >> > Excerpts from Simon Riggs's message of jue mar 15 18:38:53 -0300 2012: >> >> On Thu, Mar 15,

Re: [HACKERS] logging in high performance systems.

2012-03-15 Thread Robert Haas
On Fri, Mar 9, 2012 at 9:53 AM, Robert Haas wrote: > Tom recently committed something by another author that is along > similar lines to what you have here (I think).  Can you comment on > whether you think more is still needed and what the differences are > between that approach and yours? Heari

Re: [HACKERS] pg_stats_recovery view

2012-03-15 Thread Robert Haas
On Fri, Mar 9, 2012 at 7:20 AM, Fujii Masao wrote: > On Tue, Feb 14, 2012 at 4:10 PM, Jaime Casanova wrote: >> On Thu, Feb 2, 2012 at 2:32 AM, Magnus Hagander wrote: >>> >>> I haven't looked through the code in detail, but one direct comment: >>> do we really need/want to send this through the s

Re: [HACKERS] Faster compression, again

2012-03-15 Thread Simon Riggs
On Wed, Mar 14, 2012 at 6:06 PM, Daniel Farina wrote: > If we're curious how it affects replication > traffic, I could probably gather statistics on LZO-compressed WAL > traffic, of which we have a pretty huge amount captured. What's the compression like for shorter chunks of data? Is it worth c

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of jue mar 15 19:04:41 -0300 2012: > > On Thu, Mar 15, 2012 at 9:54 PM, Alvaro Herrera > wrote: > > > > Excerpts from Simon Riggs's message of jue mar 15 18:38:53 -0300 2012: > >> On Thu, Mar 15, 2012 at 2:26 AM, Robert Haas wrote: > > > >> > But that would o

Re: [HACKERS] Command Triggers, v16

2012-03-15 Thread Dimitri Fontaine
Dimitri Fontaine writes: >> At this moment in time, CTAS is still outstanding. Is the plan to try >> to get that in for this release, or as an enhancement in 9.3? > > The plan is to get CTAS as a utility command in 9.2 then update the > command trigger patch to benefit from the new situation. We'

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Simon Riggs
On Thu, Mar 15, 2012 at 9:54 PM, Alvaro Herrera wrote: > > Excerpts from Simon Riggs's message of jue mar 15 18:38:53 -0300 2012: >> On Thu, Mar 15, 2012 at 2:26 AM, Robert Haas wrote: > >> > But that would only make sense if >> > we thought that getting rid of the fsyncs would be more valuable t

Re: [HACKERS] Command Triggers, v16

2012-03-15 Thread Dimitri Fontaine
Thanks for testing this new version (again). A quick answer now, I'll send another patch tomorrow. Thom Brown writes: > I don’t understand how functions can return a type of “command > trigger”. This certainly works, but I’ve never seen a type consisting > of more than one word. Could you expl

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of jue mar 15 18:46:44 -0300 2012: > > On Thu, Mar 15, 2012 at 1:17 AM, Alvaro Herrera > wrote: > > > As things stand today > > Can I confirm where we are now? Is there another version of the patch > coming out soon? Yes, another version is coming soon. --

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Alvaro Herrera
Excerpts from Simon Riggs's message of jue mar 15 18:38:53 -0300 2012: > On Thu, Mar 15, 2012 at 2:26 AM, Robert Haas wrote: > > But that would only make sense if > > we thought that getting rid of the fsyncs would be more valuable than > > avoiding the blocking here, and I don't. > > You're ri

Re: [HACKERS] Faster compression, again

2012-03-15 Thread Daniel Farina
On Wed, Mar 14, 2012 at 11:06 AM, Daniel Farina wrote: >...and it has been ported to C (recently, and with some > quirks, like no LICENSE file...yet, although it is linked from the > original Snappy project). I poked the author about the license and he fixed it in a jiffy. Now under BSD, with In

Re: [HACKERS] CREATE FOREGIN TABLE LACUNA

2012-03-15 Thread David Fetter
On Thu, Mar 15, 2012 at 11:23:43AM -0300, Alvaro Herrera wrote: > Excerpts from David Fetter's message of jue mar 15 02:28:28 -0300 2012: > > On Wed, Mar 14, 2012 at 12:06:20PM -0400, Robert Haas wrote: > > > On Wed, Mar 14, 2012 at 10:22 AM, David Fetter wrote: > > > >> I think that instead of in

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Simon Riggs
On Thu, Mar 15, 2012 at 1:17 AM, Alvaro Herrera wrote: > As things stand today Can I confirm where we are now? Is there another version of the patch coming out soon? --  Simon Riggs   http://www.2ndQuadrant.com/  PostgreSQL Development, 24x7 Support, Training & Services -- Se

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Simon Riggs
On Thu, Mar 15, 2012 at 2:26 AM, Robert Haas wrote: > On Wed, Mar 14, 2012 at 9:17 PM, Alvaro Herrera > wrote: >>> > Agreed.  But speaking of that, why exactly do we fsync the multixact SLRU >>> > today? >>> >>> Good question.  So far, I can't think of a reason.  "nextMulti" is critical, >>> but

Re: [HACKERS] Another review of URI for libpq, v7 submission

2012-03-15 Thread Alex
Daniel Farina writes: > >> Finally, attached is v8.  Hopefully I didn't mess things up too much. > > I'll give it another look-over. Do you have these in git somewhere? It > will help me save time on some of the incremental changes. Yes, I've just pushed my dev branch to this fork of mine: https

Re: [HACKERS] Storage Manager crash at mdwrite()

2012-03-15 Thread Jeff Davis
On Thu, 2012-03-15 at 13:49 -0400, Tareq Aljabban wrote: > I'm implementing an extention to mdwrite() at > backend/storage/smgr/md.c > When a block is written to the local storage using mdwrite(), I'm > sending this block to an HDFS storage. > So far I don't need to read back the values I'm writin

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Simon Riggs
On Thu, Mar 15, 2012 at 2:15 AM, Robert Haas wrote: > On Wed, Mar 14, 2012 at 6:10 PM, Noah Misch wrote: >>> Well, post-release, the cat is out of the bag: we'll be stuck with >>> this whether the performance characteristics are acceptable or not. >>> That's why we'd better be as sure as possible

Re: [HACKERS] Command Triggers, v16

2012-03-15 Thread Thom Brown
On 15 March 2012 18:13, Dimitri Fontaine wrote: > Hi, > > I guess it's time to start a new thread here. Please find attached > version 16 of the command trigger patch, with augmented documentation > and “magic variable” support (TG_WHEN, TG_OBJECTID and such). > > The current version of the patch

Re: [HACKERS] Keystone auth in PostgreSQL

2012-03-15 Thread Daniel Farina
On Thu, Mar 15, 2012 at 1:14 PM, Bruce Momjian wrote: > On Wed, Mar 14, 2012 at 11:38:19AM +0530, Vivek Singh Raghuwanshi wrote: >> Hi All, >> >> Can i use keystone auth with PostgreSQL, it is very helpful when i am >> using OpenStack as a cloud service and implement DBaaS. > > I don't think so.  

Re: [HACKERS] Another review of URI for libpq, v7 submission

2012-03-15 Thread Daniel Farina
On Thu, Mar 15, 2012 at 7:36 AM, Alex Shulgin wrote: > I wonder if there's any evidence as to that mangling the email addresses > helps to reduce spam at all?  I mean replacing "(at)" back to "@" and > "(dot)" to "." is piece of cake for a spam crawler. I suspect we're long past the point in Inte

Re: [HACKERS] foreign key locks, 2nd attempt

2012-03-15 Thread Simon Riggs
On Wed, Mar 14, 2012 at 5:23 PM, Robert Haas wrote: >> You still have HEAP_XMAX_{INVALID,COMMITTED} to reduce the pressure on mxid >> lookups, so I think something more sophisticated is needed to exercise that >> cost.  Not sure what. > > I don't think HEAP_XMAX_COMMITTED is much help, because co

Re: [HACKERS] ECPG FETCH readahead

2012-03-15 Thread Robert Haas
On Tue, Mar 6, 2012 at 6:06 AM, Noah Misch wrote: > On Tue, Mar 06, 2012 at 07:07:41AM +0100, Boszormenyi Zoltan wrote: >> 2012-03-05 19:56 keltez?ssel, Noah Misch ?rta: >> >> Or how about a new feature in the backend, so ECPG can do >> >>     UPDATE/DELETE ... WHERE OFFSET N OF cursor >> >> and t

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-03-15 Thread Robert Haas
On Wed, Mar 14, 2012 at 11:10 AM, Kohei KaiGai wrote: > If it is ready to commit, please remember the credit to Yeb's volunteer > on this patch. Done. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hacke

Re: [HACKERS] Keystone auth in PostgreSQL

2012-03-15 Thread Bruce Momjian
On Wed, Mar 14, 2012 at 11:38:19AM +0530, Vivek Singh Raghuwanshi wrote: > Hi All, > > Can i use keystone auth with PostgreSQL, it is very helpful when i am > using OpenStack as a cloud service and implement DBaaS. I don't think so. I have never heard of keystone auth: http://www.bitkoo

Re: [HACKERS] patch: autocomplete for functions

2012-03-15 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of jue mar 15 16:25:53 -0300 2012: > On sön, 2012-02-19 at 20:10 +0100, Pavel Stehule wrote: > > I found so this extremely simple patch should be useful. > > > > It helps for pattern SELECT fx(); > > Isn't that just a subset of what I had proposed? > > h

Re: [HACKERS] patch: autocomplete for functions

2012-03-15 Thread Pavel Stehule
2012/3/15 Peter Eisentraut : > On sön, 2012-02-19 at 20:10 +0100, Pavel Stehule wrote: >> I found so this extremely simple patch should be useful. >> >> It helps for pattern SELECT fx(); > > Isn't that just a subset of what I had proposed? > > http://archives.postgresql.org/message-id/1328820579.11

Re: [HACKERS] patch: autocomplete for functions

2012-03-15 Thread Peter Eisentraut
On sön, 2012-02-19 at 20:10 +0100, Pavel Stehule wrote: > I found so this extremely simple patch should be useful. > > It helps for pattern SELECT fx(); Isn't that just a subset of what I had proposed? http://archives.postgresql.org/message-id/1328820579.11241.4.ca...@vanquo.pezone.net > There

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Alvaro Herrera
Excerpts from Greg Stark's message of jue mar 15 14:45:16 -0300 2012: > On Thu, Mar 15, 2012 at 3:15 PM, Andrew Dunstan wrote: > > > > You're not the only person who could do that. I don't think this is all down > > to you. It should just be understood that if the stats format is changed, > > adj

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Tom Lane
Peter Eisentraut writes: > On tor, 2012-03-15 at 11:15 -0400, Andrew Dunstan wrote: >> I haven't looked at it, but I'm wondering how hard it is going to be >> in practice? > Take a look at the commit log of pg_statistic.h; it's not a lot. That says nothing as all about the cost of dealing with a

Re: [HACKERS] CREATE FOREGIN TABLE LACUNA

2012-03-15 Thread Peter Eisentraut
On ons, 2012-03-14 at 17:38 -0400, Tom Lane wrote: > Peter Eisentraut writes: > > On ons, 2012-03-14 at 17:16 -0400, Robert Haas wrote: > >> If a constraint is NOT ENFORCED, then the query planner presumably > >> won't rely on it for planning purposes > > > Why do you presume that? > > What doe

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Peter Eisentraut
On tor, 2012-03-15 at 11:15 -0400, Andrew Dunstan wrote: > I haven't looked at it, but I'm wondering how hard it is going to be > in practice? Take a look at the commit log of pg_statistic.h; it's not a lot. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes t

Re: [HACKERS] EquivalenceClasses and subqueries and PlaceHolderVars, oh my

2012-03-15 Thread Tom Lane
I wrote: > Yeb Havinga writes: >> I'm having a hard time imagining that add_child_rel_equivalences is not >> just plain wrong. Even though it will only add child equivalence members >> to a parent eq class when certain conditions are met, isn't it the case >> that since a union (all) is additio

[HACKERS] Storage Manager crash at mdwrite()

2012-03-15 Thread Tareq Aljabban
I'm implementing an extention to mdwrite() at backend/storage/smgr/md.c When a block is written to the local storage using mdwrite(), I'm sending this block to an HDFS storage. So far I don't need to read back the values I'm writing to HDFS. This approach is working fine in the initDB phase. Howeve

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Greg Stark
On Thu, Mar 15, 2012 at 3:15 PM, Andrew Dunstan wrote: > > You're not the only person who could do that. I don't think this is all down > to you. It should just be understood that if the stats format is changed, > adjusting pg_upgrade needs to be part of the change. When we modified how > enums wo

Re: [HACKERS] CREATE FOREGIN TABLE LACUNA

2012-03-15 Thread Robert Haas
On Thu, Mar 15, 2012 at 10:23 AM, Alvaro Herrera wrote: > Looks much better to me, but the use of strcmp() doesn't look good. > ISTM that stmtType is mostly used for error messages.  I think you > should add some kind of identifier (such as the original parser Node) > into the CreateStmtContext so

Re: [HACKERS] CREATE FOREGIN TABLE LACUNA

2012-03-15 Thread David Fetter
On Thu, Mar 15, 2012 at 11:23:43AM -0300, Alvaro Herrera wrote: > Excerpts from David Fetter's message of jue mar 15 02:28:28 -0300 2012: > > On Wed, Mar 14, 2012 at 12:06:20PM -0400, Robert Haas wrote: > > > On Wed, Mar 14, 2012 at 10:22 AM, David Fetter wrote: > > > >> I think that instead of in

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Tom Lane
Andrew Dunstan writes: > On 03/15/2012 11:03 AM, Bruce Momjian wrote: >> On Thu, Mar 15, 2012 at 08:22:24AM +0200, Peter Eisentraut wrote: >>> I think this could be budgeted under keeping pg_dump backward >>> compatible. You have to do that anyway for each catalog change, and so >>> doing somethi

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Bruce Momjian
On Thu, Mar 15, 2012 at 10:20:02AM -0500, Kevin Grittner wrote: > Bruce Momjian wrote: > > > I think we have two choices --- either migrate the statistics, or > > adopt my approach to generating incremental statistics quickly. > > Does anyone see any other options? > > Would it make any sense

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Bruce Momjian
On Thu, Mar 15, 2012 at 11:15:42AM -0400, Andrew Dunstan wrote: > You're not the only person who could do that. I don't think this is > all down to you. It should just be understood that if the stats > format is changed, adjusting pg_upgrade needs to be part of the > change. When we modified how en

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Kevin Grittner
Bruce Momjian wrote: > I think we have two choices --- either migrate the statistics, or > adopt my approach to generating incremental statistics quickly. > Does anyone see any other options? Would it make any sense to modify the incremental approach to do a first pass of any tables with targe

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Andrew Dunstan
On 03/15/2012 11:03 AM, Bruce Momjian wrote: On Thu, Mar 15, 2012 at 08:22:24AM +0200, Peter Eisentraut wrote: On ons, 2012-03-14 at 17:36 -0400, Bruce Momjian wrote: Well, I have not had to make major adjustments to pg_upgrade since 9.0, meaning the code is almost complete unchanged and does

Re: [HACKERS] pg_upgrade and statistics

2012-03-15 Thread Bruce Momjian
On Thu, Mar 15, 2012 at 08:22:24AM +0200, Peter Eisentraut wrote: > On ons, 2012-03-14 at 17:36 -0400, Bruce Momjian wrote: > > Well, I have not had to make major adjustments to pg_upgrade since 9.0, > > meaning the code is almost complete unchanged and does not require > > additional testing for e

Re: [HACKERS] Another review of URI for libpq, v7 submission

2012-03-15 Thread Alex Shulgin
Daniel Farina writes: > I reviewed this and so far have not found any serious problems, > although as is par for the course it contains some of the fiddly bits > involved in any string manipulations in C. I made a few edits -- none > strictly necessary for correctness -- that the original author

Re: [HACKERS] EquivalenceClasses and subqueries and PlaceHolderVars, oh my

2012-03-15 Thread Tom Lane
Yeb Havinga writes: > On 2012-03-15 02:29, Tom Lane wrote: >>> There is an EquivalenceClass for each of "t1" and "t2", and if we don't >>> do something like wrapping the constants with distinct PHVs, then >>> add_child_rel_equivalences will end up pushing identical constants into >>> both ECs, thu

Re: [HACKERS] Another review of URI for libpq, v7 submission

2012-03-15 Thread Alvaro Herrera
Excerpts from Daniel Farina's message of jue mar 15 05:49:50 -0300 2012: > One thing I found puzzling was that in the latest revision the tests > appeared to be broken for me: all "@" signs were translated to "(at)". > Is that mangling applied by the archives, or something? Ugh, ouch. Yeah, th

Re: [HACKERS] CREATE FOREGIN TABLE LACUNA

2012-03-15 Thread Alvaro Herrera
Excerpts from David Fetter's message of jue mar 15 02:28:28 -0300 2012: > On Wed, Mar 14, 2012 at 12:06:20PM -0400, Robert Haas wrote: > > On Wed, Mar 14, 2012 at 10:22 AM, David Fetter wrote: > > >> I think that instead of inventing new grammar productions and a new > > >> node type for this, yo

Re: [HACKERS] libpq should have functions for escaping data for use in COPY FROM

2012-03-15 Thread Tom Lane
Robert Haas writes: > Considering all the above, this seems like it might be a solution in > search of a problem. It's not actually that hard to write code to do > proper escaping for a *given* encoding and a *given* set of COPY > options, but trying to write something general sounds like a job a

Re: [HACKERS] Command Triggers, patch v11

2012-03-15 Thread Thom Brown
On 14 March 2012 21:33, Dimitri Fontaine wrote: > Ok, I've implemented that. No patch attached because I need to merge > with master again and I'm out to sleep now, it sometimes ring when being > on-call… > > Curious people might have a look at my github repository where the > command_triggers bra

Re: [HACKERS] CREATE FOREGIN TABLE LACUNA

2012-03-15 Thread Etsuro Fujita
(2012/03/15 0:29), Tom Lane wrote: > The posted patch for file_fdw takes the > approach of silently filtering out rows for which they're not true, > which is not obviously the right thing either --- quite aside from > whether that's a sane semantics, it's not going to scale to foreign key > constra

Re: [HACKERS] EquivalenceClasses and subqueries and PlaceHolderVars, oh my

2012-03-15 Thread Yeb Havinga
On 2012-03-15 02:29, Tom Lane wrote: > > explain select * from > (select thousand as t1, tenthous as t2 from tenk1 a > union all > select 42 as t1, 42 as t2 from tenk1 b) c > order by t1, t2; > > There is an EquivalenceClass for each of "t1" and "t2", and if we don't > do something like wrapp

[HACKERS] Another review of URI for libpq, v7 submission

2012-03-15 Thread Daniel Farina
I reviewed this and so far have not found any serious problems, although as is par for the course it contains some of the fiddly bits involved in any string manipulations in C. I made a few edits -- none strictly necessary for correctness -- that the original author is free audit and/or include[0]