Re: [HACKERS] Installation of xpath (read xml on postgres)

2012-10-02 Thread Heikki Linnakangas
On 29.09.2012 15:53, Dariel Nicolas De Jesus Medrnao wrote: I need install the function in postgres to read xml. The function is xpath I do not find the guide of installation procedure of the function. Need to get something? Explain to me how to it the instalation. It's built-in, no need

Re: [HACKERS] Visual Studio 2012 RC

2012-10-02 Thread Noah Misch
On Fri, Sep 14, 2012 at 01:26:30AM +0200, Brar Piening wrote: Heikki Linnakangas wrote: I don't think we can realistically support VS2012 until Microsoft releases the gratis Visual Studio Express 2012 for Windows Desktop. As they've released now I've updated my Patch with docs and ask for

[HACKERS] Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-10-02 Thread Amit kapila
On Monday, October 01, 2012 4:08 PM Heikki Linnakangas wrote: On 21.09.2012 14:18, Amit kapila wrote: On Tuesday, September 18, 2012 6:02 PM Fujii Masao wrote: On Mon, Sep 17, 2012 at 4:03 PM, Amit Kapilaamit.kap...@huawei.com wrote: Approach-2 : Provide a variable wal_send_status_interval,

[HACKERS] Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-10-02 Thread Amit kapila
On Monday, October 01, 2012 8:36 PM Robert Haas wrote: On Mon, Oct 1, 2012 at 6:38 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: Hmm, I think we need to step back a bit. I've never liked the way replication_timeout works, where it's the user's responsibility to set

[HACKERS] Patch for removng unused targets

2012-10-02 Thread Alexander Korotkov
Hi! Attached patch removes unused targets which are used only for order by when data already comes in right order. It introduces resorderbyonly flag of TargetEntry which indicated that entry is used only for ORDER BY clause. If data comes in right order then such entries are removed in

Re: [HACKERS] date_in and buffer overrun

2012-10-02 Thread Heikki Linnakangas
On 02.10.2012 01:30, Hitoshi Harada wrote: It seems date_in() has a risk of buffer overrun. If the input is '.', it sets field[0] to the beginning of workbuf and goes into DecodeDate(). This function checks null-termination of the head of string, but it can go beyond the end of string inside

Re: [HACKERS] [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

2012-10-02 Thread Heikki Linnakangas
On 02.10.2012 10:36, Amit kapila wrote: On Monday, October 01, 2012 4:08 PM Heikki Linnakangas wrote: So let's think how this should ideally work from a user's point of view. I think there should be just two settings: walsender_timeout and walreceiver_timeout. walsender_timeout specifies how

Re: [HACKERS] small LDAP error message change

2012-10-02 Thread Magnus Hagander
On Tue, Oct 2, 2012 at 2:57 AM, Peter Eisentraut pete...@gmx.net wrote: I'm proposing to make the attached change to some LDAP error messages. Aside from fixing a pluralization issue, I want to separate fact (search resulted in != 1 result) from interpretation (LDAP user does not exist, and

[HACKERS] Re: ToDo: allow to get a number of processed rows by COPY statement [Review of Patch]

2012-10-02 Thread Pavel Stehule
2012/10/1 Heikki Linnakangas hlinnakan...@vmware.com: On 27.09.2012 23:58, Pavel Stehule wrote: Hello I reduced this patch as just plpgsql (SPI) problem solution. Correct generic solution needs a discussion about enhancing our libpq interface - we can take a number of returned rows, but we

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Peter Geoghegan
On 1 October 2012 18:05, Stephen Frost sfr...@snowman.net wrote: * Peter Geoghegan (pe...@2ndquadrant.com) wrote: That won't really help matters. There'd still be duplicate entries, from before and after the change, even if we make it immediately obvious which is which. The only reasonable

[HACKERS] MVCC and large objects

2012-10-02 Thread Scott Corscadden
While I'm referring to the 8.4 release, it's a slightly more general question. We're moving away from using pg_largeobject as fast as we can, and while doing so I'm seeing interesting behaviour. I'd like to confirm that this is is expected, or perhaps I don't have tuning parameters set quite

[HACKERS] Missing OID define

2012-10-02 Thread Phil Sorber
Thom Brown and I were doing some hacking the other day and came across this missing define. We argued over who was going to send the patch in and I lost. So here it is. pg_type_uuid_oid.diff Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Euler Taveira
On 02-10-2012 10:15, Peter Geoghegan wrote: There are other, similar tools that exist in proprietary databases. They expose a hash value, which is subject to exactly the same caveats as our own. They explicitly encourage the type of aggregation by third-party tools that I anticipate will

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Magnus Hagander
P On Oct 2, 2012 5:04 PM, Euler Taveira eu...@timbira.com wrote: On 02-10-2012 10:15, Peter Geoghegan wrote: There are other, similar tools that exist in proprietary databases. They expose a hash value, which is subject to exactly the same caveats as our own. They explicitly encourage the

Re: [HACKERS] Doc patch to note which system catalogs have oids

2012-10-02 Thread Karl O. Pinc
On 09/25/2012 12:28:13 AM, Karl O. Pinc wrote: On 09/23/2012 08:57:45 PM, Karl O. Pinc wrote: The attached patch documents the oid column of those system catalogs having an oid. Don't use the first version of this patch (oid_doc.patch) without discarding the last hunk. The last hunk

Re: [HACKERS] [ADMIN] pg_upgrade from 9.1.3 to 9.2 failed

2012-10-02 Thread Bruce Momjian
On Tue, Sep 25, 2012 at 09:10:33AM -0400, Bruce Momjian wrote: lc_collate cluster values do not match: old zh_CN.utf8, new zh_CN.UTF-8 Failure, exiting zh_CN.utf8 is provided by the installer and zh_CN.UTF-8 is my system default. OK, this tells us that the canonicalization code used

[HACKERS] xmalloc = pg_malloc

2012-10-02 Thread Tom Lane
While looking around to fix the pg_malloc(0) issue, I noticed that various other pieces of code such as pg_basebackup have essentially identical functions, except they're called xmalloc(). I propose to standardize all these things on this set of names: pg_malloc pg_malloc0

Re: [HACKERS] xmalloc = pg_malloc

2012-10-02 Thread Andres Freund
On Tuesday, October 02, 2012 06:02:13 PM Tom Lane wrote: While looking around to fix the pg_malloc(0) issue, I noticed that various other pieces of code such as pg_basebackup have essentially identical functions, except they're called xmalloc(). I propose to standardize all these things on

Re: [HACKERS] xmalloc = pg_malloc

2012-10-02 Thread Bruce Momjian
On Tue, Oct 2, 2012 at 12:02:13PM -0400, Tom Lane wrote: While looking around to fix the pg_malloc(0) issue, I noticed that various other pieces of code such as pg_basebackup have essentially identical functions, except they're called xmalloc(). I propose to standardize all these things on

Re: [HACKERS] xmalloc = pg_malloc

2012-10-02 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: pg_calloc(randomly different API for pg_malloc0) Do we need this? I thought about getting rid of it, but there are some dozens of calls scattered across several files, so I wasn't sure it was worth it. Anybody else have an opinion? I wonder

Re: [HACKERS] xmalloc = pg_malloc

2012-10-02 Thread Phil Sorber
On Tue, Oct 2, 2012 at 12:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: pg_calloc(randomly different API for pg_malloc0) Do we need this? I thought about getting rid of it, but there are some dozens of calls scattered across several files, so I

Re: [HACKERS] xmalloc = pg_malloc

2012-10-02 Thread Andres Freund
On Tuesday, October 02, 2012 06:30:33 PM Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: pg_calloc (randomly different API for pg_malloc0) Do we need this? I thought about getting rid of it, but there are some dozens of calls scattered across several files, so I wasn't

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Stephen Frost
* Peter Geoghegan (pe...@2ndquadrant.com) wrote: On 1 October 2012 18:05, Stephen Frost sfr...@snowman.net wrote: You're going to have to help me here, 'cause I don't see how there can be duplicates if we include the PGSS_FILE_HEADER as part of the hash, unless we're planning to keep

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: * Peter Geoghegan (pe...@2ndquadrant.com) wrote: I simply do not understand objections to the proposal. Have I missed something? It was my impression that the concern is the stability of the hash value and ensuring that tools which operate on it

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-02 Thread Noah Misch
On Tue, Aug 28, 2012 at 05:04:09PM -0400, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's also the big-picture question of whether we should just get rid of fuzzy comparisons in the geometric types instead

Re: [HACKERS] Prevent restored WAL files from being archived again Re: Unnecessary WAL archiving after failover

2012-10-02 Thread Fujii Masao
On Sat, Aug 11, 2012 at 2:19 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 9, 2012 at 8:08 AM, Simon Riggs si...@2ndquadrant.com wrote: On 29 July 2012 16:01, Fujii Masao masao.fu...@gmail.com wrote: Attached patch changes the startup process so that it creates .done file whenever

[HACKERS] review: pgbench - aggregation of info written into log

2012-10-02 Thread Pavel Stehule
Hello I did review of pgbench patch http://archives.postgresql.org/pgsql-hackers/2012-09/msg00737.php * this patch is cleanly patched * I had a problem with doc make[1]: Entering directory `/home/pavel/src/postgresql/doc/src/sgml' openjade -wall -wno-unused-param -wno-empty -wfully-tagged -D

Re: [HACKERS] Prevent restored WAL files from being archived again Re: Unnecessary WAL archiving after failover

2012-10-02 Thread Simon Riggs
On 2 October 2012 19:06, Fujii Masao masao.fu...@gmail.com wrote: On Sat, Aug 11, 2012 at 2:19 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 9, 2012 at 8:08 AM, Simon Riggs si...@2ndquadrant.com wrote: On 29 July 2012 16:01, Fujii Masao masao.fu...@gmail.com wrote: Attached patch

Re: [HACKERS] Prevent restored WAL files from being archived again Re: Unnecessary WAL archiving after failover

2012-10-02 Thread Fujii Masao
On Wed, Oct 3, 2012 at 3:11 AM, Simon Riggs si...@2ndquadrant.com wrote: On 2 October 2012 19:06, Fujii Masao masao.fu...@gmail.com wrote: On Sat, Aug 11, 2012 at 2:19 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Aug 9, 2012 at 8:08 AM, Simon Riggs si...@2ndquadrant.com wrote: On 29

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Peter Geoghegan
On 2 October 2012 18:16, Tom Lane t...@sss.pgh.pa.us wrote 1. Why isn't something like md5() on the reported query text an equally good solution for users who want a query hash? Because that does not uniquely identify the entry. The very first thing that the docs say on search_path is Qualified

Re: [HACKERS] Raise a WARNING if a REVOKE affects nothing?

2012-10-02 Thread Noah Misch
On Tue, Aug 21, 2012 at 02:31:29PM +0800, Craig Ringer wrote: It'd really help if REVOKE consistently raised warnings when it didn't actually revoke anything. +1 This will invite the same mixed feelings as the CREATE x IF NOT EXISTS notices, but I think it's worthwhile. Even better, a

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Alvaro Herrera
The fundamental issue with this patch hasn't been answered sufficiently, I think. Consider the following sequence of commands: create schema if not exists foo create table first (a int); create schema if not exists foo create table second (a int); As far as I can see, with the patch as it

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Peter Geoghegan
On 2 October 2012 17:58, Stephen Frost sfr...@snowman.net wrote: Right, and that's all I'm trying to address here- how do we provide a value for a given query which can be relied upon by outside sources, even in the face of a point release which changes what our internal hash value for a given

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Alvaro Herrera
Excerpts from Volker Grabsch's message of sáb sep 29 06:32:13 -0300 2012: Dickson S. Guedes schrieb: - https://commitfest.postgresql.org/action/patch_view?id=907 The patch is small and implements a new syntax to CREATE SCHEMA that allow the creation of a schema be skipped when IF NOT

Re: [HACKERS] Raise a WARNING if a REVOKE affects nothing?

2012-10-02 Thread David Johnston
-Original Message- From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers- ow...@postgresql.org] On Behalf Of Noah Misch Sent: Tuesday, October 02, 2012 3:02 PM To: Craig Ringer Cc: PostgreSQL Hackers Subject: Re: [HACKERS] Raise a WARNING if a REVOKE affects nothing? On

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread David E. Wheeler
On Oct 2, 2012, at 12:08 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: create schema if not exists foo create table first (a int); create schema if not exists foo create table second (a int); As far as I can see, with the patch as it currently stands, you would end up with only table

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Alvaro Herrera
Excerpts from David E. Wheeler's message of mar oct 02 16:16:37 -0300 2012: On Oct 2, 2012, at 12:08 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: create schema if not exists foo create table first (a int); create schema if not exists foo create table second (a int); As far as

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread David E. Wheeler
On Oct 2, 2012, at 12:30 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: How about call this for precedent: mkdir -p /tmp/foo/bar mkdir -p /tmp/foo/baz In this case you end up with directory foo and at least two subdirs in it, bar and baz. This works even if /tmp/foo existed

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Excerpts from David E. Wheeler's message of mar oct 02 16:16:37 -0300 2012: On Oct 2, 2012, at 12:08 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: create schema if not exists foo create table first (a int); create schema if not exists foo

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Alvaro Herrera
Excerpts from David E. Wheeler's message of mar oct 02 16:37:30 -0300 2012: On Oct 2, 2012, at 12:30 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: How about call this for precedent: mkdir -p /tmp/foo/bar mkdir -p /tmp/foo/baz In this case you end up with directory foo and at

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread David E. Wheeler
On Oct 2, 2012, at 12:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think we should just disallow putting any contained objects in the statement when IF NOT EXISTS is used. It's simple to understand, simple to document and implement, and I think it covers all the sane use-cases anyway. +1

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Andrew Dunstan
On 10/02/2012 03:48 PM, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Excerpts from David E. Wheeler's message of mar oct 02 16:16:37 -0300 2012: On Oct 2, 2012, at 12:08 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: create schema if not exists foo create table first

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Alvaro Herrera
Excerpts from Andrew Dunstan's message of mar oct 02 17:24:38 -0300 2012: On 10/02/2012 03:48 PM, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Well, if that's the rationale then you end up with no schema foo at all (i.e. both die), which seems even more surprising

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Martijn van Oosterhout
On Tue, Oct 02, 2012 at 12:58:15PM -0400, Stephen Frost wrote: I simply do not understand objections to the proposal. Have I missed something? It was my impression that the concern is the stability of the hash value and ensuring that tools which operate on it don't mistakenly lump two

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Fabrízio de Royes Mello
2012/10/2 Alvaro Herrera alvhe...@2ndquadrant.com Excerpts from Andrew Dunstan's message of mar oct 02 17:24:38 -0300 2012: On 10/02/2012 03:48 PM, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Well, if that's the rationale then you end up with no schema foo at all

Re: [HACKERS] CREATE SCHEMA IF NOT EXISTS

2012-10-02 Thread Stirling Newberry
This case points to a weakness in many programming languages, not having a clear ifof (if and only if) versus if construction. The sane use case for create schema foo if not exists object is for building a database dynamically, where several points may be the first to put a table in a schema,

Re: [HACKERS] pg_upgrade does not completely honor --new-port

2012-10-02 Thread Bruce Momjian
Applied to head and 9.2. --- On Wed, Sep 26, 2012 at 10:06:50PM -0400, Bruce Momjian wrote: On Tue, Sep 25, 2012 at 05:36:54PM +0300, Devrim Gunduz wrote: Hi, I just performed a test upgrade from 9.1 to 9.2, and

Re: [HACKERS] [9.1] 2 bugs with extensions

2012-10-02 Thread Alvaro Herrera
Excerpts from Dimitri Fontaine's message of lun oct 01 04:44:28 -0300 2012: Hi, Alvaro Herrera alvhe...@2ndquadrant.com writes: Same for 9.2, attached. master needs yet another patch because of the recent headers reorg, it seems, that's for another day though. No, just remove the

[HACKERS] PQping command line tool

2012-10-02 Thread Phil Sorber
I was wondering recently if there was any command line tool that utilized PQping() or PQpingParams(). I searched the code and couldn't find anything and was wondering if there was any interest to have something like this included? I wrote something for my purposes of performing a health check that

Re: [HACKERS] Hash id in pg_stat_statements

2012-10-02 Thread Daniel Farina
On Mon, Oct 1, 2012 at 12:57 AM, Magnus Hagander mag...@hagander.net wrote: Can we please expose the internal hash id of the statements in pg_stat_statements? I know there was discussions about it earlier, and it wasn't done with an argument of it not being stable between releases (IIRC). I