Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Daniel Farina
On Mon, Jul 9, 2012 at 1:30 PM, Shaun Thomas stho...@optionshouse.com wrote: 1. Slave wants to be synchronous with master. Master wants replication on at least one slave. They have this, and are happy. 2. For whatever reason, slave crashes or becomes unavailable. 3. Master notices no more

FW: [HACKERS] Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-10 Thread Amit Kapila
Sorry by mistake for below mail, I have not kept hackers in loop. From: Amit Kapila [mailto:amit.kap...@huawei.com] Sent: Tuesday, July 10, 2012 12:07 PM To: 'Gurjeet Singh' Subject: RE: [HACKERS] Allow replacement of bloated primary key indexes without foreign key rebuilds From:

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Amit Kapila
From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Daniel Farina Sent: Tuesday, July 10, 2012 11:42 AM On Mon, Jul 9, 2012 at 1:30 PM, Shaun Thomas stho...@optionshouse.com wrote: 1. Slave wants to be synchronous with master. Master wants

[HACKERS] HTTP API experimental implementation

2012-07-10 Thread Björn Harrtell
Hey all, I've begun an implementation of the proposed HTTP API [1] (with some changes) using node.js The project lives at https://github.com/bjornharrtell/postgresql-http-server and basic functionality is in place. Feedback appriciated! [1] http://wiki.postgresql.org/wiki/HTTP_API Regards

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 8:42 AM, Amit Kapila amit.kap...@huawei.com wrote: From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Daniel Farina Sent: Tuesday, July 10, 2012 11:42 AM On Mon, Jul 9, 2012 at 1:30 PM, Shaun Thomas stho...@optionshouse.com

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 3:23 AM, Joe Conway m...@joeconway.com wrote: I noticed today that has_language_privilege() returns incorrect answer for non-superuser, e.g.: 8--- select has_language_privilege('nobody',

Re: [HACKERS] Testing of various opclasses for ranges

2012-07-10 Thread Heikki Linnakangas
On 10.07.2012 02:33, Alexander Korotkov wrote: Hackers, I've tested various opclasses for ranges (including currently in-core one and my patches). I've looked into scholar papers for which datasets they are using for testing. The lists below show kinds of datasets used in papers. Great!

[HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Colin 't Hart
Hi, Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. This allows you to navigate a database very quickly in psql as follows: \dn \n my_schema \d \d my_table etc. Not yet done: updating documentation (psql internal help,

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Dimitri Fontaine
Pavel Stehule pavel.steh...@gmail.com writes: When I worked on parametrised DO statement, I had to solve following issue: DO currently is a utility command, not a query. Do you mean to change that? Also, did you think about a lambda construct, which is basically allowing functions to be defined

Re: [HACKERS] pg_prewarm

2012-07-10 Thread Dimitri Fontaine
Jeff Janes jeff.ja...@gmail.com writes: I think we want this. There is some discussion about how much overlap it has with pgfincore, but I don't think there is an active proposal to put that into contrib, so don't see that as blocking this. It is my understanding that Cédric wants to propose

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Pavel Stehule
2012/7/10 Dimitri Fontaine dimi...@2ndquadrant.fr: Pavel Stehule pavel.steh...@gmail.com writes: When I worked on parametrised DO statement, I had to solve following issue: DO currently is a utility command, not a query. Do you mean to change that? Also, did you think about a lambda

[HACKERS] BlockNumber initialized to InvalidBuffer?

2012-07-10 Thread Markus Wanner
Hackers, I stumbled across an initialization of a BlockNumber with InvalidBuffer, which seems strange to me, as the values for invalid of the two types are different, see attached patch. In case the 'stack' argument passed to that function is not NULL, the variable in question gets overridden

Re: [HACKERS] Use of rsync for data directory copying

2012-07-10 Thread Bruce Momjian
On Mon, Jul 9, 2012 at 08:00:48PM -0700, David Kerr wrote: On Jul 9, 2012, at 7:48 PM, Bruce Momjian wrote: Rsync is popular with Postgres users, but I don't understand how they are using the default check mode (file size, modification time) to synchronize shut-down data directories?

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Shaun Thomas
On 07/10/2012 01:11 AM, Daniel Farina wrote: So if I get this straight, what you are saying is be asynchronous replication unless someone is around, in which case be synchronous is the mode you want. Er, no. I think I see where you might have gotten that, but no. This is a pretty tricky

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Aidan Van Dyk
On Tue, Jul 10, 2012 at 9:28 AM, Shaun Thomas stho...@optionshouse.com wrote: Async is simply too slow for our OLTP system except for the disaster recovery node, which isn't expected to carry on within seconds of the primary's failure. I briefly considered sync mode when it appeared as a

Re: [HACKERS] Event Triggers reduced, v1

2012-07-10 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: I also attach various typo/grammar fixes. In fact Robert's cleanup of the docs make that patch of yours not apply anymore, and I think a part of it is maybe already fixed. Do you have time to look at this with the new v1.8 patch that you will receive in a

[HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Colin 't Hart
Hi, Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. This allows you to use psql as follows: \dn \n my_schema \d \d my_table etc. Not yet done: updating documentation (psql internal help, psql man page, main

Re: [HACKERS] autocomplete - SELECT fx

2012-07-10 Thread Josh Kupershmidt
On Sat, Jul 7, 2012 at 5:43 PM, Noah Misch n...@leadboat.com wrote: I like the patch, as far as it goes. It's the natural addition to the completions we already offer; compare the simplistic completion after WHERE. Like Pavel and Robert, I think a delightful implementation of tab completion

[HACKERS] Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-10 Thread Greg Stark
On Sat, Jul 7, 2012 at 4:53 AM, Gurjeet Singh singh.gurj...@gmail.com wrote: All we need to do is allow swapping of pg_class.relfilenode of two indexes. This will let the dependency entries stand as they are and allow us to drop the bloated primary key index structure without having to rebuild

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: We could imagine several syntax to show up the idea, common keywords here include LAMBDA, FLET or LABELS, but I think that expanding WITH would be preferable for us. WITH FUNCTION foo(param list) returns rettype language foo AS (

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Shaun Thomas
On 07/09/2012 05:15 PM, Josh Berkus wrote: Total-consistency replication is what I think you want, that is, to guarantee that at any given time a read query on the master will return the same results as a read query on the standby. Heck, *most* people would like to have that. You would also

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Pavel Stehule
2012/7/10 Tom Lane t...@sss.pgh.pa.us: Dimitri Fontaine dimi...@2ndquadrant.fr writes: We could imagine several syntax to show up the idea, common keywords here include LAMBDA, FLET or LABELS, but I think that expanding WITH would be preferable for us. WITH FUNCTION foo(param list) returns

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Heikki Linnakangas
On 10.07.2012 17:31, Shaun Thomas wrote: On 07/09/2012 05:15 PM, Josh Berkus wrote: So I'm unclear on why sync rep would be faster than async rep given that they use exactly the same mechanism. Explain? Too many mental gymnastics. I get that async is faster than sync, but the inconsistent

Re: [HACKERS] Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-10 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Sat, Jul 7, 2012 at 4:53 AM, Gurjeet Singh singh.gurj...@gmail.com wrote: All we need to do is allow swapping of pg_class.relfilenode of two indexes. Fwiw I don't like swapping relfilenodes on indexes the user created. REINDEX currently does this but it's a

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Dimitri Fontaine
Pavel Stehule pavel.steh...@gmail.com writes: WITH FUNCTION foo(param list) returns rettype language foo AS ( definition here ) query using foo() here; I like this idea. This gets rid of both the how to pass parameters and the how to return results issues that exist with DO, as

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Pavel Stehule
2012/7/10 Dimitri Fontaine dimi...@2ndquadrant.fr: Pavel Stehule pavel.steh...@gmail.com writes: WITH FUNCTION foo(param list) returns rettype language foo AS ( definition here ) query using foo() here; I like this idea. This gets rid of both the how to pass parameters and the

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2012/7/10 Dimitri Fontaine dimi...@2ndquadrant.fr: I'm not sure I can understand the difference between that and the use case for which you want to implement DO blocks with parameters. this is similar to temporary functions - you need some

Re: [HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Josh Kupershmidt
On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. I think the use-case is a bit narrow: saving a few characters typing on a command not everyone uses

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mar jul 10 10:56:50 -0400 2012: Pavel Stehule pavel.steh...@gmail.com writes: 2012/7/10 Dimitri Fontaine dimi...@2ndquadrant.fr: I'm not sure I can understand the difference between that and the use case for which you want to implement DO blocks with

Re: [HACKERS] Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-10 Thread Greg Stark
On Tue, Jul 10, 2012 at 3:44 PM, Tom Lane t...@sss.pgh.pa.us wrote: The problem you describe is one of constraints and dependencies and not one of indexes. It seems what you really want is a way to alter foreign key dependencies to depend on a new index. Either an explicit command that lets

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Shaun Thomas
On 07/10/2012 09:40 AM, Heikki Linnakangas wrote: You are mistaken. It only guarantees that it's been sync'd to disk in the standby, but if there are open snapshots or the system is simply busy, it might takes minutes or more until the effects of that transaction become visible. Well, crap.

Re: [HACKERS] Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-10 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mar jul 10 10:44:03 -0400 2012: All of these things seem like ugly, hard-to-use kluges anyway (the make-sure-the-indexes-match business is just as much of a PITA for the DBA as it is for the system). What we really want is REINDEX CONCURRENTLY.

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Daniel Farina
On Tue, Jul 10, 2012 at 6:28 AM, Shaun Thomas stho...@optionshouse.com wrote: On 07/10/2012 01:11 AM, Daniel Farina wrote: So if I get this straight, what you are saying is be asynchronous replication unless someone is around, in which case be synchronous is the mode you want. Er, no. I

Re: [HACKERS] expression evaluation with expected datatypes

2012-07-10 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Excerpts from Tom Lane's message of mar jul 10 10:56:50 -0400 2012: What's to solve? Presumably the WITH function name would take precedence over anything in the catalogs, the same as WITH query names take precedence over actual tables. Hm,

[HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Bruce Momjian
I occasionally get questions about how to run pg_upgrade on log-shipping standby servers. The attached documentation patch outlines how to do it. I don't think we can assume that because pg_upgrade was run on the master and standby that they are binary identical, can we? Technically the user

Re: [HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Tom Lane
Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set search_path =. I think the use-case is a bit narrow: saving a few

Re: [HACKERS] Re: Allow replacement of bloated primary key indexes without foreign key rebuilds

2012-07-10 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Excerpts from Tom Lane's message of mar jul 10 10:44:03 -0400 2012: What we really want is REINDEX CONCURRENTLY. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.47.9961 ? Hm ... that paper looks like something we might want to

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: +While a Log-Shipping Standby Server (xref linkend=warm-standby) can +be upgraded, the server must be in changed to a primary server to allow +writes, and after the upgrade it cannot be reused as a standby server. +(Running commandrsync/

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Bruce Momjian
On Tue, Jul 10, 2012 at 12:04:50PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: +While a Log-Shipping Standby Server (xref linkend=warm-standby) can +be upgraded, the server must be in changed to a primary server to allow +writes, and after the upgrade it cannot

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 6:17 PM, Bruce Momjian br...@momjian.us wrote: On Tue, Jul 10, 2012 at 12:04:50PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: +While a Log-Shipping Standby Server (xref linkend=warm-standby) can +be upgraded, the server must be in changed

Re: [HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread David Fetter
On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote: Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart co...@sharpheart.org wrote: Attached please find a trivial patch for psql which adds a \n meta command as a shortcut for typing set

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Bruce Momjian
On Tue, Jul 10, 2012 at 06:21:35PM +0200, Magnus Hagander wrote: On Tue, Jul 10, 2012 at 6:17 PM, Bruce Momjian br...@momjian.us wrote: On Tue, Jul 10, 2012 at 12:04:50PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: +While a Log-Shipping Standby Server (xref

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 6:26 PM, Bruce Momjian br...@momjian.us wrote: On Tue, Jul 10, 2012 at 06:21:35PM +0200, Magnus Hagander wrote: On Tue, Jul 10, 2012 at 6:17 PM, Bruce Momjian br...@momjian.us wrote: On Tue, Jul 10, 2012 at 12:04:50PM -0400, Tom Lane wrote: Bruce Momjian

Re: [HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread David Fetter
On Tue, Jul 10, 2012 at 06:26:22PM +0200, Colin 't Hart wrote: On 10 July 2012 18:24, David Fetter da...@fetter.org wrote: On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote: Josh Kupershmidt schmi...@gmail.com writes: On Tue, Jul 10, 2012 at 2:09 AM, Colin 't Hart

Re: [HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Tom Lane
David Fetter da...@fetter.org writes: On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote: ISTM there was some discussion awhile back about user-definable typing shortcuts in psql. In some sense, we already have them: Good point: regression=# show search_path ; search_path

Re: [HACKERS] several problems in pg_receivexlog

2012-07-10 Thread Fujii Masao
On Tue, Jul 10, 2012 at 6:27 AM, Magnus Hagander mag...@hagander.net wrote: On Mon, Jul 9, 2012 at 8:23 PM, Fujii Masao masao.fu...@gmail.com wrote: Hi, I found several problems in pg_receivexlog, e.g., memory leaks, file-descripter leaks, ..etc. The attached patch fixes these problems.

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Josh Berkus
Shaun, Too many mental gymnastics. I get that async is faster than sync, but the inconsistent transactional state makes it *look* slower. If a customer makes an order, but just happens to check that order state on the secondary before it can catch up, that's a net loss. Like I said, that's

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Bruce Momjian
On Tue, Jul 10, 2012 at 06:29:24PM +0200, Magnus Hagander wrote: Testing maybe? I feel we have just avoided saying what you can and can't do with the standbys and pg_upgrade, so I think we have to state something. If we just want to say recreate, let's say that. Well, the bottom line is

Re: [HACKERS] pg_prewarm

2012-07-10 Thread Josh Berkus
On 7/10/12 5:22 AM, Dimitri Fontaine wrote: Jeff Janes jeff.ja...@gmail.com writes: I think we want this. There is some discussion about how much overlap it has with pgfincore, but I don't think there is an active proposal to put that into contrib, so don't see that as blocking this. It is

Re: [HACKERS] several problems in pg_receivexlog

2012-07-10 Thread Fujii Masao
On Tue, Jul 10, 2012 at 3:23 AM, Fujii Masao masao.fu...@gmail.com wrote: Hi, I found several problems in pg_receivexlog, e.g., memory leaks, file-descripter leaks, ..etc. The attached patch fixes these problems. ISTM there are still some other problems in pg_receivexlog, so I'll read it

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 6:59 PM, Bruce Momjian br...@momjian.us wrote: On Tue, Jul 10, 2012 at 06:29:24PM +0200, Magnus Hagander wrote: Testing maybe? I feel we have just avoided saying what you can and can't do with the standbys and pg_upgrade, so I think we have to state something. If

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Bruce Momjian
On Tue, Jul 10, 2012 at 07:06:39PM +0200, Magnus Hagander wrote: rsync where and how? What are you actually trying to suggest people do? Updated docs attached. I suggest just removing the rsync part completely. You're basically saying you ca nset up a new standby after you're

Re: [HACKERS] Btree or not btree? That is the question

2012-07-10 Thread Greg Sabino Mullane
On Mon, Jul 09, 2012 at 04:02:13PM -0400, Tom Lane wrote: ... Could you crank up the log verbosity so we can get file and line number, at least? Here is what the increased verbosity reveals in aggregate. This is about an 18-hour span, covering 12.5M transactions, on version 8.3.18: (13

Re: [HACKERS] [PATCH] psql \n shortcut for set search_path =

2012-07-10 Thread Björn Häuser
Am 10.07.2012 18:44, schrieb Tom Lane: David Fetter da...@fetter.org writes: On Tue, Jul 10, 2012 at 12:00:06PM -0400, Tom Lane wrote: ISTM there was some discussion awhile back about user-definable typing shortcuts in psql. In some sense, we already have them: Good point: regression=#

Re: [HACKERS] enhanced error fields

2012-07-10 Thread Peter Geoghegan
On 7 July 2012 13:57, Pavel Stehule pavel.steh...@gmail.com wrote: In my revision, I've just added a pre-declaration and removed the dedicated header, which didn't make too much sense to me: + /* Pre-declare Relation, in order to avoid a build dependency on rel.h. */ + typedef struct

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 7:27 PM, Bruce Momjian br...@momjian.us wrote: On Tue, Jul 10, 2012 at 07:06:39PM +0200, Magnus Hagander wrote: rsync where and how? What are you actually trying to suggest people do? Updated docs attached. I suggest just removing the rsync part completely.

Re: [HACKERS] enhanced error fields

2012-07-10 Thread Alvaro Herrera
Excerpts from Peter Geoghegan's message of mar jul 10 14:56:40 -0400 2012: On 7 July 2012 13:57, Pavel Stehule pavel.steh...@gmail.com wrote: +#define PG_DIAG_TRIGGER_SCHEMA 'h' Not all appear to have a way of setting the value within the ereport interface. For example, there

Re: [HACKERS] enhanced error fields

2012-07-10 Thread Peter Geoghegan
On 10 July 2012 20:28, Alvaro Herrera alvhe...@commandprompt.com wrote: I think we should just define constants for the set of fields the patch currently uses. When and if we later add new fields to other callsites, we can define more constants. Fair enough. Let's do that. FWIW about the

Re: [SPAM] [MessageLimit][lowlimit] Re: [HACKERS] pl/perl and utf-8 in sql_ascii databases

2012-07-10 Thread Alvaro Herrera
Excerpts from Kyotaro HORIGUCHI's message of mar jul 03 04:59:38 -0400 2012: Hello, Here is regression test runs on pg's also built with cygwin-gcc and VC++. The patches attached following, - plperl_sql_ascii-4.patch : fix for pl/perl utf8 vs sql_ascii -

Re: [HACKERS] enhanced error fields

2012-07-10 Thread Alvaro Herrera
Excerpts from Peter Geoghegan's message of mar jul 10 15:54:59 -0400 2012: On 10 July 2012 20:28, Alvaro Herrera alvhe...@commandprompt.com wrote: FWIW about the new include: I feel a strong dislike about the forward declaration you suggest. Defining Relation in elog.h seems completely

Re: [HACKERS] enhanced error fields

2012-07-10 Thread Peter Geoghegan
On 10 July 2012 21:26, Alvaro Herrera alvhe...@commandprompt.com wrote: I haven't defined Relation in elog.h; I have pre-declared it there. Maybe that isn't to your taste, but there is surely something to be said for adding exactly one line of code in preference to adding an entire new header

Re: [HACKERS] Schema version management

2012-07-10 Thread Peter Eisentraut
On sön, 2012-07-08 at 18:52 -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On lör, 2012-07-07 at 17:18 -0400, Tom Lane wrote: Sure. You need not look further than / to find an operator name that absolutely *will* cause trouble if it's dumped into a filename literally.

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Dimitri Fontaine
Shaun Thomas stho...@optionshouse.com writes: When you re-connect a secondary device, it catches up as fast as possible by replaying waiting transactions, and then re-attaching to the cluster. Until it's fully caught-up, it doesn't exist. DRBD acknowledges the secondary is there and attempting

Re: [HACKERS] Schema version management

2012-07-10 Thread Andrew Dunstan
On 07/10/2012 05:39 PM, Peter Eisentraut wrote: On sön, 2012-07-08 at 18:52 -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On lör, 2012-07-07 at 17:18 -0400, Tom Lane wrote: Sure. You need not look further than / to find an operator name that absolutely *will* cause

Re: [HACKERS] Schema version management

2012-07-10 Thread Magnus Hagander
On Tue, Jul 10, 2012 at 11:39 PM, Peter Eisentraut pete...@gmx.net wrote: On sön, 2012-07-08 at 18:52 -0400, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On lör, 2012-07-07 at 17:18 -0400, Tom Lane wrote: Sure. You need not look further than / to find an operator name that

Re: [HACKERS] Schema version management

2012-07-10 Thread Merlin Moncure
On Sun, May 20, 2012 at 2:41 PM, Joel Jacobson j...@trustly.com wrote: Hi, I just read a very interesting post about schema version management. Quote: You could set it up so that every developer gets their own test database, sets up the schema there, takes a dump, and checks that in. There

Re: [HACKERS] has_language_privilege returns incorrect answer for non-superuser

2012-07-10 Thread Joe Conway
On 07/10/2012 12:50 AM, Magnus Hagander wrote: On Tue, Jul 10, 2012 at 3:23 AM, Joe Conway m...@joeconway.com wrote: I verified this behavior on head as well as 9.1 (didn't bother looking any further back). Looks like the reason is that CreateFunction() correctly checks lanpltrusted, whereas

Re: [HACKERS] Testing of various opclasses for ranges

2012-07-10 Thread Alexander Korotkov
On Tue, Jul 10, 2012 at 1:38 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: I think the ultimate question is, which ones of these should we include in core? We cannot drop the existing range_ops opclass, if only because that would break pg_upgrade. However, range_ops2 seems

Re: [HACKERS] enhanced error fields

2012-07-10 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: FWIW about the new include: I feel a strong dislike about the forward declaration you suggest. Defining Relation in elog.h seems completely out of place. Agreed. Maybe a reasonable solution is to allow some ereport helper functions (or,

Re: [HACKERS] Synchronous Standalone Master Redoux

2012-07-10 Thread Daniel Farina
On Tue, Jul 10, 2012 at 2:42 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: What you explain you want reads to me Async replication + Archiving. Notable caveat: one can't very easily measure or bound the amount of transaction loss in any graceful way as-is. We only have unlimited lag and

Re: [HACKERS] Patch: add conversion from pg_wchar to multibyte

2012-07-10 Thread Tatsuo Ishii
Tatsuo Ishii is...@postgresql.org writes: So far as I can see, the only LCPRVn marker code that is actually in use right now is 0x9d --- there are no instances of 9a, 9b, or 9c that I can find. I also read in the xemacs internals doc, at

Re: [HACKERS] Using pg_upgrade on log-shipping standby servers

2012-07-10 Thread Bruce Momjian
On Tue, Jul 10, 2012 at 09:10:25PM +0200, Magnus Hagander wrote: On Tue, Jul 10, 2012 at 7:27 PM, Bruce Momjian br...@momjian.us wrote: On Tue, Jul 10, 2012 at 07:06:39PM +0200, Magnus Hagander wrote: rsync where and how? What are you actually trying to suggest people do?

Re: [HACKERS] BlockNumber initialized to InvalidBuffer?

2012-07-10 Thread Tom Lane
Markus Wanner mar...@bluegap.ch writes: I stumbled across an initialization of a BlockNumber with InvalidBuffer, which seems strange to me, as the values for invalid of the two types are different, see attached patch. That's certainly bogus ... In case the 'stack' argument passed to that

Re: [HACKERS] Patch: add conversion from pg_wchar to multibyte

2012-07-10 Thread Tom Lane
Tatsuo Ishii is...@postgresql.org writes: Done along with comment that we follow emacs's implementation, not xemacs's. Well, when the preceding comment block contains five references to xemacs and the link for more information leads to www.xemacs.org, I don't think it's real helpful to add one

Re: [HACKERS] Patch: add conversion from pg_wchar to multibyte

2012-07-10 Thread Tatsuo Ishii
Well, when the preceding comment block contains five references to xemacs and the link for more information leads to www.xemacs.org, I don't think it's real helpful to add one sentence saying oh by the way we're not actually following xemacs. I continue to think that we'd be better off to