Re: [HACKERS] [PATCH] Docs: Make notes on sequences and rollback more obvious

2012-08-07 Thread Craig Ringer
On 08/07/2012 02:27 AM, Robert Haas wrote: I did not commit the advanced.sgml changes. That's arguably the most important point to raise this. The most recent question came from someone who actually bothered to RTFM and believed based on the advanced-transactions page that rollback rolls

[HACKERS] is prefix pg_ reservated ?

2012-08-07 Thread Pavel Stehule
Hello all I found strange behave of postgresql. I would to use name pg_stat_get_some for custom function. Probably it is not smart from me, because I found so functions that has prefix pg are not searched via search_path. postgres=# select public.pg_stat_get_creation_time('xxx'::regclass);

Re: [HACKERS] [PATCH] Docs: Make notes on sequences and rollback more obvious

2012-08-07 Thread Robert Haas
On Tue, Aug 7, 2012 at 3:59 AM, Craig Ringer ring...@ringerc.id.au wrote: On 08/07/2012 02:27 AM, Robert Haas wrote: I did not commit the advanced.sgml changes. That's arguably the most important point to raise this. The most recent question came from someone who actually bothered to RTFM

Re: [HACKERS] is prefix pg_ reservated ?

2012-08-07 Thread Robert Haas
On Tue, Aug 7, 2012 at 7:16 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hello all I found strange behave of postgresql. I would to use name pg_stat_get_some for custom function. Probably it is not smart from me, because I found so functions that has prefix pg are not searched via

Re: [HACKERS] WIP Patch: Use sortedness of CSV foreign tables for query planning

2012-08-07 Thread Robert Haas
On Tue, Aug 7, 2012 at 2:02 AM, Etsuro Fujita fujita.ets...@lab.ntt.co.jp wrote: I think that optimizations like this are going to be essential for things like pgsql_fdw (or other_rdms_fdw). Despite the thorny semantic issues, we're just not going to be able to get around it. There will even

Re: [HACKERS] Beta 3

2012-08-07 Thread Robert Haas
On Mon, Aug 6, 2012 at 11:22 PM, Craig Ringer ring...@ringerc.id.au wrote: Heya all It seems like it's a bit trickier to find beta downloads than might be ideal. The beta info page simply reads: PostgreSQL 9.2 beta 3 was released on August 6, 2012. with no information about how to

Re: [HACKERS] Beta 3

2012-08-07 Thread Magnus Hagander
On Tue, Aug 7, 2012 at 2:44 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Aug 6, 2012 at 11:22 PM, Craig Ringer ring...@ringerc.id.au wrote: Heya all It seems like it's a bit trickier to find beta downloads than might be ideal. The beta info page simply reads: PostgreSQL 9.2

Re: [HACKERS] -Wformat-zero-length

2012-08-07 Thread Magnus Hagander
On Fri, Aug 3, 2012 at 10:02 PM, Bruce Momjian br...@momjian.us wrote: On Fri, Aug 3, 2012 at 04:01:18PM -0400, Robert Haas wrote: On Fri, Aug 3, 2012 at 3:22 PM, Bruce Momjian br...@momjian.us wrote: I don't disagree with pg_upgrade being operationally complex, but I don't see how this

[HACKERS] Pg_ctl promote -- wait for slave to be promoted fully ?

2012-08-07 Thread Magnus Hagander
Should we consider if we can make pg_ctl -w work for promote as well? The main problem is, I guess, that it can't log in - so wed' need something like PQping() that actually checked if it was master or slave? //Magnus -- Forwarded message -- From: Manoj Govindassamy

Re: [HACKERS] [PATCH] Docs: Make notes on sequences and rollback more obvious

2012-08-07 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Craig Ringer ring...@ringerc.id.au wrote: On 08/07/2012 02:27 AM, Robert Haas wrote: I did not commit the advanced.sgml changes. That's arguably the most important point to raise this. The most recent question came from someone who actually bothered

Re: [HACKERS] -Wformat-zero-length

2012-08-07 Thread Bruce Momjian
On Tue, Aug 7, 2012 at 03:06:23PM +0200, Magnus Hagander wrote: On Fri, Aug 3, 2012 at 10:02 PM, Bruce Momjian br...@momjian.us wrote: On Fri, Aug 3, 2012 at 04:01:18PM -0400, Robert Haas wrote: On Fri, Aug 3, 2012 at 3:22 PM, Bruce Momjian br...@momjian.us wrote: I don't disagree with

[HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Pavel Stehule
Hello last year we are spoke about reusing pretty print view code for some queries. Here is patch: this patch is really short - it is nice. But - it works only with known database objects (probably we would it) and it doesn't format subqueries well postgres=# select pg_pretty_query('select

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Thom Brown
On 7 August 2012 15:14, Pavel Stehule pavel.steh...@gmail.com wrote: Hello last year we are spoke about reusing pretty print view code for some queries. Here is patch: this patch is really short - it is nice. But - it works only with known database objects (probably we would it) and it

Re: [HACKERS] -Wformat-zero-length

2012-08-07 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of vie ago 03 16:02:28 -0400 2012: On Fri, Aug 3, 2012 at 04:01:18PM -0400, Robert Haas wrote: On Fri, Aug 3, 2012 at 3:22 PM, Bruce Momjian br...@momjian.us wrote: I don't disagree with pg_upgrade being operationally complex, but I don't see how

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Pavel Stehule
2012/8/7 Thom Brown t...@linux.com: On 7 August 2012 15:14, Pavel Stehule pavel.steh...@gmail.com wrote: Hello last year we are spoke about reusing pretty print view code for some queries. Here is patch: this patch is really short - it is nice. But - it works only with known database

Re: [HACKERS] -Wformat-zero-length

2012-08-07 Thread Bruce Momjian
On Tue, Aug 7, 2012 at 10:38:52AM -0400, Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of vie ago 03 16:02:28 -0400 2012: On Fri, Aug 3, 2012 at 04:01:18PM -0400, Robert Haas wrote: On Fri, Aug 3, 2012 at 3:22 PM, Bruce Momjian br...@momjian.us wrote: I don't disagree

Re: [HACKERS] [PATCH] Docs: Make notes on sequences and rollback more obvious

2012-08-07 Thread Jeff MacDonald
On Tuesday, August 07, 2012 09:45:35 AM Kevin Grittner wrote: [...snipped...] I also think it's a problem that one can get through the entire Concurrency Control chapter (mvcc.sgml) without a clue that sequences aren't transactional. I think maybe a mention in the Introduction section of that

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Bruce Momjian
On Tue, Aug 7, 2012 at 04:14:34PM +0200, Pavel Stehule wrote: Hello last year we are spoke about reusing pretty print view code for some queries. Here is patch: this patch is really short - it is nice. But - it works only with known database objects (probably we would it) and it

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Andrew Dunstan
On 08/07/2012 10:14 AM, Pavel Stehule wrote: Hello last year we are spoke about reusing pretty print view code for some queries. Here is patch: this patch is really short - it is nice. But - it works only with known database objects (probably we would it) and it doesn't format subqueries

Re: [HACKERS] Beta 3

2012-08-07 Thread Robert Haas
On Tue, Aug 7, 2012 at 8:51 AM, Magnus Hagander mag...@hagander.net wrote: Agreed. Anybody up for writing the text though? There was some text earlier (see http://git.postgresql.org/gitweb/?p=pgweb.git;a=commitdiff;h=bd02e36141bb99e9ee4e0b80fd69464e0e6d91b7#patch18 or the corresponding one in

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread David Fetter
On Tue, Aug 07, 2012 at 04:54:12PM +0200, Pavel Stehule wrote: 2012/8/7 Thom Brown t...@linux.com: On 7 August 2012 15:14, Pavel Stehule pavel.steh...@gmail.com wrote: Hello last year we are spoke about reusing pretty print view code for some queries. Here is patch: this patch

Re: [HACKERS] Pg_ctl promote -- wait for slave to be promoted fully ?

2012-08-07 Thread Fujii Masao
On Tue, Aug 7, 2012 at 10:22 PM, Magnus Hagander mag...@hagander.net wrote: Should we consider if we can make pg_ctl -w work for promote as well? +1 The main problem is, I guess, that it can't log in - so wed' need something like PQping() that actually checked if it was master or slave?

[HACKERS] pg_upgrade bug in Windows on PG 9.2

2012-08-07 Thread Bruce Momjian
I just got a bug report from EnterpriseDB saying pg_upgrade generates a file share violation on PG 9.2. I was initially confused because I know we fixed this in a May commit. Well, it turns out that this commit re-added the same failure: commit 4741e9afb93f0d769655b2d18c2b73b86f281010

Re: [HACKERS] [PATCH] Docs: Make notes on sequences and rollback more obvious

2012-08-07 Thread David Fetter
On Tue, Aug 07, 2012 at 03:59:42PM +0800, Craig Ringer wrote: On 08/07/2012 02:27 AM, Robert Haas wrote: I did not commit the advanced.sgml changes. That's arguably the most important point to raise this. The most recent question came from someone who actually bothered to RTFM and believed

Re: [HACKERS] Re: BUG #6742: pg_dump doesn't convert encoding of DB object names to OS encoding

2012-08-07 Thread Robert Haas
On Wed, Jul 25, 2012 at 7:54 AM, Alexander Law exclus...@gmail.com wrote: Hello, I would like to fix this bug, but it looks like it would be not one-line patch. Looking at the pg_dump code I see that the object names come through the following chain: 1. pg_dump executes 'SELECT c.tableoid,

Re: [HACKERS] WIP patch for LATERAL subqueries

2012-08-07 Thread Tom Lane
Here's an updated version of my LATERAL patch. * Accepts LATERAL func_name(args). * Handles LATERAL in JOIN nests now. I rewrote the way transformFromClause manages visibility of previously-parsed FROM items. Rather than my previous idea of adding more namespace lists to a ParseState, I changed

Re: [HACKERS] avoid unnecessary failure to open restored WAL files

2012-08-07 Thread Simon Riggs
On 2 August 2012 17:18, Fujii Masao masao.fu...@gmail.com wrote: Hi, In HEAD and 9.2, the following scenario happens in archive recovery. 1. The archived WAL file is restored onto the temporary file name RECOVERYXLOG. 2. The restored WAL file is renamed to the correct file name like

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Tue, Aug 7, 2012 at 04:14:34PM +0200, Pavel Stehule wrote: last year we are spoke about reusing pretty print view code for some queries. Here is patch: I can see this as very useful for people reporting badly-formatted queries to our email lists.

[HACKERS] bug of pg_trgm?

2012-08-07 Thread Fujii Masao
Hi, When I used pg_trgm, I encountered the problem that the search result of SeqScan was the different from that of BitmapScan even if the search keyword was the same. Is this a bug? Here is the test case: --- CREATE EXTENSION pg_trgm; CREATE TABLE tbl (col text); CREATE

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Andrew Dunstan
On 08/07/2012 02:14 PM, Tom Lane wrote: * As per some of the complaints already registered in this thread, ruleutils.c is not designed with the goal of being a pretty-printer. Its primary charter is to support pg_dump by regurgitating rules/views in an unambiguous form, which does not

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 08/07/2012 02:14 PM, Tom Lane wrote: In short, the only redeeming value of this patch is that it's short. One of the challenges is to have a pretty printer that is kept in sync with the dialect that's supported. Anything that doesn't use the

Re: [HACKERS] Inserting heap tuples in bulk in COPY

2012-08-07 Thread Jeff Janes
On Fri, Aug 12, 2011 at 2:59 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 13.08.2011 00:17, Simon Riggs wrote: Also, we discussed that you would work on buffering the index inserts, which is where the main problem lies. The main heap is only a small part of the

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Peter Geoghegan
On 7 August 2012 20:01, Andrew Dunstan and...@dunslane.net wrote: On 08/07/2012 02:14 PM, Tom Lane wrote: * As per some of the complaints already registered in this thread, ruleutils.c is not designed with the goal of being a pretty-printer. Its primary charter is to support pg_dump by

Re: [HACKERS] Pg_ctl promote -- wait for slave to be promoted fully ?

2012-08-07 Thread Robert Haas
On Tue, Aug 7, 2012 at 1:09 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Aug 7, 2012 at 10:22 PM, Magnus Hagander mag...@hagander.net wrote: Should we consider if we can make pg_ctl -w work for promote as well? +1 The main problem is, I guess, that it can't log in - so wed' need

Re: [HACKERS] Inserting heap tuples in bulk in COPY

2012-08-07 Thread Simon Riggs
On 7 August 2012 20:58, Jeff Janes jeff.ja...@gmail.com wrote: On Fri, Aug 12, 2011 at 2:59 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 13.08.2011 00:17, Simon Riggs wrote: Also, we discussed that you would work on buffering the index inserts, which is where the main

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Tom Lane
Peter Geoghegan pe...@2ndquadrant.com writes: On 7 August 2012 20:01, Andrew Dunstan and...@dunslane.net wrote: One of the challenges is to have a pretty printer that is kept in sync with the dialect that's supported. Anything that doesn't use the backend's parser seems to me to be guaranteed

Re: [HACKERS] WIP patch for LATERAL subqueries

2012-08-07 Thread Tom Lane
I wrote: What I'd like to do next, barring objections, is to band-aid the places where the planner could crash on a LATERAL query (probably just make it throw FEATURE_NOT_SUPPORTED errors), write some documentation, and then commit what I've got. After that I can go back to improve the

Re: [HACKERS] WIP fix proposal for bug #6123

2012-08-07 Thread Bruce Momjian
Did we ever decide on this? Is it a TODO? --- On Fri, Jul 22, 2011 at 04:01:20PM -0500, Kevin Grittner wrote: Robert Haas robertmh...@gmail.com wrote: On Wed, Jul 20, 2011 at 2:58 PM, Kevin Grittner

[HACKERS] Possible bug in PostgreSQL 9.2 stable: TwoPhaseGetDummyBackendId()

2012-08-07 Thread Robert Ross
I have looked at the Postgres 9.2 stable and Postgres 9.2 beta 3 git archives and this bug still appears to be present. TwoPhaseGetDummyProc returns a PGPROC*. In 9.0, it was safe for TwoPhaseGetDummyBackendId() to cast this to a GlobalTransaction because the GlobalTransactionData

Re: [HACKERS] Inserting heap tuples in bulk in COPY

2012-08-07 Thread Jeff Janes
On Tue, Aug 7, 2012 at 1:52 PM, Simon Riggs si...@2ndquadrant.com wrote: On 7 August 2012 20:58, Jeff Janes jeff.ja...@gmail.com wrote: Hi Heikki, Is the bulk index insert still an active area for you? If not, is there some kind of summary of design or analysis work already done, which

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Pavel Stehule
2012/8/7 Tom Lane t...@sss.pgh.pa.us: Andrew Dunstan and...@dunslane.net writes: On 08/07/2012 02:14 PM, Tom Lane wrote: In short, the only redeeming value of this patch is that it's short. One of the challenges is to have a pretty printer that is kept in sync with the dialect that's

Re: [HACKERS] WIP: pg_pretty_query

2012-08-07 Thread Pavel Stehule
2012/8/7 Peter Geoghegan pe...@2ndquadrant.com: On 7 August 2012 20:01, Andrew Dunstan and...@dunslane.net wrote: On 08/07/2012 02:14 PM, Tom Lane wrote: * As per some of the complaints already registered in this thread, ruleutils.c is not designed with the goal of being a pretty-printer. Its