Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-17 Thread Fabrízio de Royes Mello
2012/8/16 Dickson S. Guedes lis...@guedesoft.net 2012/8/16 Fabrízio de Royes Mello fabriziome...@gmail.com: The attached patch implement this feature: CREATE SCHEMA [ IF NOT EXISTS ] schema_name [ AUTHORIZATION user_name ] [ schema_element [ ... ] ] CREATE SCHEMA [ IF NOT EXISTS ]

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-17 Thread Fabrízio de Royes Mello
2012/8/17 Fabrízio de Royes Mello fabriziome...@gmail.com I started testing this, but I didn't see regression tests for it. Could you write them?. The attached patch contains regression tests for it. Please, don't consider de last patch (v2) because I make a little mistake on

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-17 Thread Alvaro Herrera
Excerpts from Fabrízio de Royes Mello's message of vie ago 17 09:16:30 -0400 2012: The attached patch contains regression tests for it. I think you're missing support in copyfuncs.c and equalfuncs.c for the new field in the node. -- Álvaro Herrerahttp://www.2ndQuadrant.com/

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-17 Thread Fabrízio de Royes Mello
2012/8/17 Alvaro Herrera alvhe...@2ndquadrant.com Excerpts from Fabrízio de Royes Mello's message of vie ago 17 09:16:30 -0400 2012: The attached patch contains regression tests for it. I think you're missing support in copyfuncs.c and equalfuncs.c for the new field in the node. You're

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-17 Thread Dickson S. Guedes
2012/8/17 Fabrízio de Royes Mello fabriziome...@gmail.com: 2012/8/17 Alvaro Herrera alvhe...@2ndquadrant.com Excerpts from Fabrízio de Royes Mello's message of vie ago 17 09:16:30 -0400 2012: The attached patch contains regression tests for it. I think you're missing support in

[HACKERS] SERIAL columns in foreign tables

2012-08-17 Thread Alvaro Herrera
Hi, While working on the NOT NULL constraint stuff, I noticed that if you're creating a foreign table with a SERIAL column, it bleats like this: CREATE FOREIGN TABLE ft1 (c1 serial) SERVER sc; ERROR: default values on foreign tables are not supported Note that it's talking about a default

Re: [HACKERS] psql output locations

2012-08-17 Thread Bruce Momjian
On Wed, Dec 14, 2011 at 10:57:25AM -0500, Robert Haas wrote: On Wed, Dec 14, 2011 at 4:45 AM, Magnus Hagander mag...@hagander.net wrote: * There are a number of things that are always written to stdout, that there is no way to redirect. In some cases it's interactive prompts - makes sense -

Re: [HACKERS] Planner avoidance of index only scans for partial indexes

2012-08-17 Thread Merlin Moncure
On Thu, Aug 16, 2012 at 5:20 PM, Josh Berkus j...@agliodbs.com wrote: I'm mainly looking for numbers for the 9.2 release. Like, up to 14X speedup on data warehousing queries. OK: I work in the multi family industry and we have a large database which we are organizing into an on-demand OLAP

Re: [HACKERS] psql output locations

2012-08-17 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of vie ago 17 11:17:58 -0400 2012: On Wed, Dec 14, 2011 at 10:57:25AM -0500, Robert Haas wrote: On Wed, Dec 14, 2011 at 4:45 AM, Magnus Hagander mag...@hagander.net wrote: * There are a number of things that are always written to stdout, that there

Re: [HACKERS] psql output locations

2012-08-17 Thread Bruce Momjian
On Fri, Aug 17, 2012 at 12:22:38PM -0400, Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of vie ago 17 11:17:58 -0400 2012: On Wed, Dec 14, 2011 at 10:57:25AM -0500, Robert Haas wrote: On Wed, Dec 14, 2011 at 4:45 AM, Magnus Hagander mag...@hagander.net wrote: * There

Re: [HACKERS] Not HOT enough

2012-08-17 Thread Robert Haas
On Thu, Aug 16, 2012 at 8:59 PM, Bruce Momjian br...@momjian.us wrote: Did we want to apply this? Tom and I both opined upthread that it wasn't safe. Nothing's happened since then to change my mind. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] psql \set vs \copy - bug or expected behaviour?

2012-08-17 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Fri, Oct 21, 2011 at 05:31:41PM -0400, Robert Haas wrote: I'm not sure whether that's a bug per se, but I can see where a behavior change might be an improvement. I did some research on this and learned a little more about flex rules. Turns out we

Re: [HACKERS] psql \set vs \copy - bug or expected behaviour?

2012-08-17 Thread Richard Huxton
On 17/08/12 18:38, Tom Lane wrote: Bruce Momjianbr...@momjian.us writes: On Fri, Oct 21, 2011 at 05:31:41PM -0400, Robert Haas wrote: I'm not sure whether that's a bug per se, but I can see where a behavior change might be an improvement. I did some research on this and learned a little

Re: [HACKERS] psql \set vs \copy - bug or expected behaviour?

2012-08-17 Thread Bruce Momjian
On Fri, Aug 17, 2012 at 06:55:14PM +0100, Richard Huxton wrote: Well, it'd be nice to allow substitution there ... What we can't easily do is to allow quotes to prevent variable substitution in these whole-line commands because we can't process the quotes because that will remove them.

[HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Alvaro Herrera
Hi, I noticed one more problem with NOT NULL constraints and foreign tables -- which is that they are allowed at all (see also http://archives.postgresql.org/message-id/1345214955-sup-3...@alvh.no-ip.org earlier today). Right now, with my patch, foreign table creation fails if you have a NOT

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: I mean, what are NOT NULL in foreign tables for? There was previous discussion about that, in the context of check constraints in general, but I don't believe we reached consensus.

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Robert Haas
On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having pg_constraint rows? As I've mentioned when this has come up before, I think that constraints on foreign tables should be viewed

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2012-08-17 Thread Ross Reedstrom
On Wed, Aug 15, 2012 at 10:26:55PM -0400, Bruce Momjian wrote: On Mon, Nov 14, 2011 at 04:19:30PM -0600, Ross Reedstrom wrote: On Wed, Sep 28, 2011 at 11:47:51AM -0700, David Fetter wrote: On Wed, Sep 28, 2011 at 02:25:44PM -0400, Gurjeet Singh wrote: On Wed, Sep 28, 2011 at 1:51 PM,

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Alvaro Herrera
Excerpts from Robert Haas's message of vie ago 17 15:44:29 -0400 2012: On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having pg_constraint rows? As I've mentioned when this has

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-08-17 Thread Robert Haas
On Thu, Aug 16, 2012 at 9:11 PM, Bruce Momjian br...@momjian.us wrote: Was this resolved? (Sorry to be bugging everyone.) Nope. I've got some ideas, but not enough round tuits. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via

Re: [HACKERS] Planner avoidance of index only scans for partial indexes

2012-08-17 Thread Josh Berkus
Merlin, Thanks! The takeaway is that for this query I'm seeing end to end query execution improvement of 58% in the worst case (warm cache) and 20x or more in the best case when the cache is cold: that 22 sec time is unpredictable and can run into the minutes as the index randomizes the i/o

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-08-17 Thread Fabrízio de Royes Mello
2012/8/17 Alvaro Herrera alvhe...@2ndquadrant.com Excerpts from Dickson S. Guedes's message of vie ago 17 10:37:25 -0400 2012: 2012/8/17 Fabrízio de Royes Mello fabriziome...@gmail.com: 2012/8/17 Alvaro Herrera alvhe...@2ndquadrant.com Excerpts from Fabrízio de Royes Mello's

[HACKERS] asynchronous disk io (was : tuplesort memory usage)

2012-08-17 Thread johnlumby
Date: Fri, 17 Aug 2012 00:26:37 +0100 From: Peter Geoghegan pe...@2ndquadrant.com To: Jeff Janes jeff.ja...@gmail.com Cc: pgsql-hackers pgsql-hackers@postgresql.org Subject: Re: tuplesort memory usage: grow_memtuples Message-ID:

Re: [HACKERS] NOT NULL constraints in foreign tables

2012-08-17 Thread Euler Taveira
On 17-08-2012 16:44, Robert Haas wrote: On Fri, Aug 17, 2012 at 2:58 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I mean, what are NOT NULL in foreign tables for? Are they harmed or helped by having pg_constraint rows? As I've mentioned when this has come up before, I think that

[HACKERS] New WAL code dumps core trivially on replay of bad data

2012-08-17 Thread Tom Lane
I just had HEAD fail to recover after a backend core dump, because the startup process dumped core itself during replay: LOG: all server processes terminated; reinitializing LOG: database system was interrupted; last known up at 2012-08-17 20:47:37 EDT LOG: database system was not properly

[HACKERS] CLUSTER VERBOSE tab completion

2012-08-17 Thread Jeff Janes
tab completion will add USING after CLUSTER VERBOSE, as if VERBOSE were the name of a table. Instead of just making it not do the wrong thing, I tried to make it actually do the right thing. It doesn't fill in the VERBOSE for you, you have to type that in full, but then it completes table names

Re: [HACKERS] New WAL code dumps core trivially on replay of bad data

2012-08-17 Thread Amit kapila
Tom Lane Sent: Saturday, August 18, 2012 7:16 AM The startup process's stack trace is #0 0x26fd1c in RecordIsValid (record=0x4008d7a0, recptr=80658424, emode=15) at xlog.c:3713 3713COMP_CRC32(crc, XLogRecGetData(record), len); (gdb) bt #0 0x26fd1c in RecordIsValid