Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Amit Kapila
On Fri, Jan 10, 2014 at 9:17 PM, Bruce Momjian br...@momjian.us wrote: On Fri, Jan 10, 2014 at 10:21:42AM +0530, Amit Kapila wrote: Here I think if user is aware from beginning that this is the behaviour, then may be the importance of message is not very high. What I want to say is that if we

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Craig Ringer
On 01/06/2014 07:44 PM, Sandeep Thakkar wrote: Okay. BTW, I just checked that Windows 32bit installer ships the libintl.h. Did you try if it works for you? Or it requires more headers? Somehow, Windows 64bit installer installer missed it. I'll fix the build script. That appears to be the

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Craig Ringer
On 01/06/2014 07:44 PM, Sandeep Thakkar wrote: Okay. BTW, I just checked that Windows 32bit installer ships the libintl.h. Did you try if it works for you? Or it requires more headers? Somehow, Windows 64bit installer installer missed it. I'll fix the build script. Actually, on second

Re: [HACKERS] Add CREATE support to event triggers

2014-01-11 Thread Simon Riggs
On 10 January 2014 23:22, Alvaro Herrera alvhe...@2ndquadrant.com wrote: On the subject of testing the triggers, Robert Haas wrote: Here's one idea: create a contrib module that (somehow, via APIs to be invented) runs every DDL command that gets executed through the deparsing code, and then

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-11 Thread Peter Geoghegan
On Fri, Jan 10, 2014 at 7:59 PM, Peter Geoghegan p...@heroku.com wrote: *shrug*. I'm not too concerned about performance during contention. But let's see how this fixed version performs. Could you repeat the tests you did with this? Why would you not be too concerned about the performance

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-11 Thread Peter Geoghegan
On Sat, Jan 11, 2014 at 2:39 AM, Peter Geoghegan p...@heroku.com wrote: So I re-ran the same old benchmark, where we're almost exclusively updating. Results for your latest revision were very similar to my patch:

Re: [HACKERS] Simple improvements to freespace allocation

2014-01-11 Thread Simon Riggs
On 9 January 2014 01:38, Jim Nasby j...@nasby.net wrote: On 1/8/14, 1:43 AM, Heikki Linnakangas wrote: I've wanted the cluster case for a long time. I also see the use for the RECENT scenario, especially if we had CLUSTER CONCURRENT that let you shrink the head of the table as needed. But

Re: [HACKERS] array_length(anyarray)

2014-01-11 Thread Florian Pflug
On Jan10, 2014, at 15:10 , Merlin Moncure mmonc...@gmail.com wrote: On Fri, Jan 10, 2014 at 6:00 AM, Florian Pflug f...@phlo.org wrote: On Jan10, 2014, at 11:00 , Merlin Moncure mmonc...@gmail.com wrote: On Fri, Jan 10, 2014 at 3:52 AM, Marko Tiikkaja ma...@joh.to wrote: On 1/10/14, 10:41 AM,

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Tom Lane
Craig Ringer cr...@2ndquadrant.com writes: We don't set __declspec(dllexport) on extension functions automatically when building stand-alone on Windows. So it's necessary to explicitly specify PGDLLEXPORT for each function. I'm not sure I believe this. I don't see any PGDLLEXPORT symbols in

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Bruce Momjian
On Sat, Jan 11, 2014 at 01:29:23PM +0530, Amit Kapila wrote: Okay, this is one way of providing this new mode, others could be: a. Have just one GUC sync_standalone_mode = true|false and make this as PGC_POSTMASTER parameter, so that user is only allowed to set this mode at startup. Even if

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Magnus Hagander
On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote: Craig Ringer cr...@2ndquadrant.com writes: We don't set __declspec(dllexport) on extension functions automatically when building stand-alone on Windows. So it's necessary to explicitly specify PGDLLEXPORT for each

Re: [HACKERS] [PATCH] pg_basebackup: progress report max once per second

2014-01-11 Thread Magnus Hagander
On Fri, Jan 10, 2014 at 3:56 AM, Mika Eloranta m...@ohmu.fi wrote: On Thu, Jan 9, 2014, at 20:05, Magnus Hagander wrote: On Thu, Nov 14, 2013 at 10:27 AM, Mika Eloranta m...@ohmu.fi wrote: On 13 Nov 2013, at 20:51, Mika Eloranta m...@ohmu.fi wrote: Prevent excessive progress

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Florian Pflug
On Jan11, 2014, at 01:48 , Joshua D. Drake j...@commandprompt.com wrote: On 01/10/2014 04:38 PM, Stephen Frost wrote: Adrian, * Adrian Klaver (adrian.kla...@gmail.com) wrote: On 01/10/2014 04:25 PM, Stephen Frost wrote: * Adrian Klaver (adrian.kla...@gmail.com) wrote: A) Change the

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Tom Lane
Florian Pflug f...@phlo.org writes: Hm, I was about to suggest that you can set statement_timeout before doing COMMIT to limit the amount of time you want to wait for the standby to respond. Interestingly, however, that doesn't seem to work, which is weird, since AFAICS statement_timeout

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Andres Freund
On 2014-01-11 18:28:31 +0100, Florian Pflug wrote: Hm, I was about to suggest that you can set statement_timeout before doing COMMIT to limit the amount of time you want to wait for the standby to respond. Interestingly, however, that doesn't seem to work, which is weird, since AFAICS

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not sure I believe this. I don't see any PGDLLEXPORT symbols in any of the standard contrib modules; how is it that they work? They are built through our perl toolkit, which

Re: [HACKERS] pg_export_snapshot on standby side

2014-01-11 Thread Bruce Momjian
Uh, was this ever addressed? I don't think so. --- On Sat, May 25, 2013 at 10:18:57AM +0100, Simon Riggs wrote: On 21 May 2013 19:16, Fujii Masao masao.fu...@gmail.com wrote: We cannot run parallel pg_dump on the

Re: [HACKERS] [GENERAL] pg_upgrade tablespaces

2014-01-11 Thread Bruce Momjian
On Sat, Jan 11, 2014 at 10:40:20AM -0800, Adrian Klaver wrote: Right. I know there were multiple issue with this upgrade, jails probably being the biggest, but a new one I had never heard is that _if_ you are placing your tablespaces in the PGDATA directory, and you are upgrading from

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Magnus Hagander
On Sat, Jan 11, 2014 at 7:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not sure I believe this. I don't see any PGDLLEXPORT symbols in any of the standard contrib modules; how

Re: [HACKERS] units in postgresql.conf comments

2014-01-11 Thread Bruce Momjian
On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from the name or the default value that time

Re: [HACKERS] Partitioning performance: cache stringToNode() of pg_constraint.ccbin

2014-01-11 Thread Bruce Momjian
On Mon, Jun 3, 2013 at 03:07:27PM -0400, Noah Misch wrote: A colleague, Korry Douglas, observed a table partitioning scenario where deserializing pg_constraint.ccbin is a hot spot. The following test case, a simplification of a typical partitioning setup, spends 28% of its time in

Re: [HACKERS] Recovery to backup point

2014-01-11 Thread Peter Eisentraut
The documentation doesn't build. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] units in postgresql.conf comments

2014-01-11 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from

Re: [HACKERS] nested hstore patch

2014-01-11 Thread Peter Eisentraut
The documentation doesn't build. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] patch: make_timestamp function

2014-01-11 Thread Tomas Vondra
Hi, I've done a quick review of this patch: 1) patch applies fine to the current HEAD, with a few hunks offset by a few lines 2) the compilation fails because of duplicate OIDs in pg_proc, so I had to change 3969-3975 to 4033-4039, then it compiles fine 3) make installcheck works fine

Re: [HACKERS] nested hstore patch

2014-01-11 Thread Erik Rijkers
On Sat, January 11, 2014 20:30, Peter Eisentraut wrote: The documentation doesn't build. corrective patch is here: http://www.postgresql.org/message-id/37b9f104d5a838eec9b75f3668517aa5.squir...@webmail.xs4all.nl -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] pg_export_snapshot on standby side

2014-01-11 Thread Simon Riggs
On 11 January 2014 18:34, Bruce Momjian br...@momjian.us wrote: Uh, was this ever addressed? I don't think so. It appears not. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Deprecations in authentication

2014-01-11 Thread Peter Eisentraut
On Thu, 2013-10-24 at 20:37 +0200, Magnus Hagander wrote: On Thu, Oct 24, 2013 at 8:35 PM, Peter Eisentraut pete...@gmx.net wrote: On 10/18/12, 7:20 AM, Magnus Hagander wrote: 1. krb5 authentication. We've had gssapi since 8.3 (which means in all supported versions). krb5 has been

Re: [HACKERS] [GENERAL] pg_upgrade tablespaces

2014-01-11 Thread Adrian Klaver
On 01/11/2014 10:55 AM, Bruce Momjian wrote: On Sat, Jan 11, 2014 at 10:40:20AM -0800, Adrian Klaver wrote: Right. I know there were multiple issue with this upgrade, jails probably being the biggest, but a new one I had never heard is that _if_ you are placing your tablespaces in the PGDATA

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Mark Kirkwood
On 11/01/14 13:25, Stephen Frost wrote: Adrian, * Adrian Klaver (adrian.kla...@gmail.com) wrote: A) Change the existing sync mode to allow the master and standby fall out of sync should a standby fall over. I'm not sure that anyone is argueing for this.. B) Create a new mode that does

Re: [HACKERS] nested hstore patch

2014-01-11 Thread Andrew Dunstan
On 01/11/2014 03:03 PM, Erik Rijkers wrote: On Sat, January 11, 2014 20:30, Peter Eisentraut wrote: The documentation doesn't build. corrective patch is here: http://www.postgresql.org/message-id/37b9f104d5a838eec9b75f3668517aa5.squir...@webmail.xs4all.nl It's been committed at

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Andrew Dunstan
On 01/11/2014 01:55 PM, Magnus Hagander wrote: On Sat, Jan 11, 2014 at 7:05 PM, Tom Lane t...@sss.pgh.pa.us mailto:t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net mailto:mag...@hagander.net writes: On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane t...@sss.pgh.pa.us

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Tom Lane
Mark Kirkwood mark.kirkw...@catalyst.net.nz writes [slightly rearranged] My 2c is: The current behavior in CAP theorem speak is 'Cap' - i.e focused on consistency at the expense of availability. A reasonable thing to want. The other behavior being asked for is 'cAp' - i.e focused on

Re: [HACKERS] nested hstore patch

2014-01-11 Thread David E. Wheeler
On Jan 11, 2014, at 1:47 PM, Andrew Dunstan and...@dunslane.net wrote: It's been committed at https://github.com/feodor/postgres/commit/a21a4be55a5b12c4bd89b6ab2f77cf32e319de31. It will be in the next version of the patch posted. Bah! Sorry about that. Habit from decades of typing HTML.

[HACKERS] Syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2014-01-11 Thread Peter Geoghegan
Someone suggested to me that I solicit opinion on the chosen syntax of INSERT...ON DUPLICATE KEY LOCK FOR UPDATE on a separate thread. I'll do that here, while also giving a formal user-level definition of the feature. I'd like to solicit feedback from a wider set of people than those

Re: [HACKERS] Race condition in b-tree page deletion

2014-01-11 Thread Peter Geoghegan
On Sat, Dec 21, 2013 at 5:50 AM, Peter Eisentraut pete...@gmx.net wrote: This patch didn't make it out of the 2013-11 commit fest. You should move it to the next commit fest (probably with an updated patch) before January 15th, if it is not resolved before then. Uh, it's already in the

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Josh Berkus
On 01/10/2014 06:27 PM, Bruce Momjian wrote: How would that work? Would it be a tool in contrib? There already is a timeout, so if a tool checked more frequently than the timeout, it should work. The durable notification of the admin would happen in the tool, right? Well, you know what

Re: [HACKERS] units in postgresql.conf comments

2014-01-11 Thread Josh Berkus
On 01/11/2014 11:06 AM, Bruce Momjian wrote: On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear

Re: [HACKERS] Recovery to backup point

2014-01-11 Thread MauMau
From: Michael Paquier michael.paqu...@gmail.com On Fri, Jan 10, 2014 at 12:08 AM, MauMau maumau...@gmail.com wrote: C2. recovery_target = 'immediate' sounds less intuitive than my suggestion recovery_target_time = 'backup_point', at least for those who want to recover to the backup point.

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Amit Kapila
On Sun, Jan 12, 2014 at 8:48 AM, Josh Berkus j...@agliodbs.com wrote: On 01/10/2014 06:27 PM, Bruce Momjian wrote: How would that work? Would it be a tool in contrib? There already is a timeout, so if a tool checked more frequently than the timeout, it should work. The durable notification

Re: [HACKERS] [GENERAL] pg_upgrade tablespaces

2014-01-11 Thread Bruce Momjian
On Sat, Jan 11, 2014 at 12:48:51PM -0800, Adrian Klaver wrote: pg_upgrade looks in the pg_tablespace in pre-9.2, and uses a function in 9.2+. The query is: snprintf(query, sizeof(query), SELECT%s FROM pg_catalog.pg_tablespace WHERE

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Bruce Momjian
On Sat, Jan 11, 2014 at 07:18:02PM -0800, Josh Berkus wrote: In other words, if we're going to have auto-degrade, the most intelligent place for it is in RepMgr/HandyRep/OmniPITR/pgPoolII/whatever. It's also the *easiest* place. Anything we do *inside* Postgres is going to have a really,

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Amit Kapila
On Sat, Jan 11, 2014 at 9:41 PM, Bruce Momjian br...@momjian.us wrote: On Sat, Jan 11, 2014 at 01:29:23PM +0530, Amit Kapila wrote: Okay, this is one way of providing this new mode, others could be: a. Have just one GUC sync_standalone_mode = true|false and make this as PGC_POSTMASTER

Re: [HACKERS] array_length(anyarray)

2014-01-11 Thread Marko Tiikkaja
On 1/9/14, 2:57 PM, Dean Rasheed wrote: Yes, this should just return the number of elements, and 0 for an empty array. How it should behave for multi-dimensional arrays is less clear, but I'd argue that it should return the total number of elements, i.e. cardinality('{{1,2},{3,4}}'::int[][]) =

[HACKERS] have to do move ready for commit patch from previous commitfest?

2014-01-11 Thread Pavel Stehule
Hello There are a few patches, that are ready for commit: https://commitfest.postgresql.org/action/commitfest_view?id=20status=3 their registration is valid still? Regards Pavel

Re: [HACKERS] array_length(anyarray)

2014-01-11 Thread Pavel Stehule
2014/1/12 Marko Tiikkaja ma...@joh.to On 1/9/14, 2:57 PM, Dean Rasheed wrote: Yes, this should just return the number of elements, and 0 for an empty array. How it should behave for multi-dimensional arrays is less clear, but I'd argue that it should return the total number of elements,

[HACKERS] plpgsql.consistent_into

2014-01-11 Thread Marko Tiikkaja
Greetings fellow elephants, I would humbly like to submit for your consideration my proposal for alleviating pain caused by one of the most annoying footguns in PL/PgSQL: the behaviour of SELECT .. INTO when the query returns more than one row. Some of you might know that no exception is

Re: [HACKERS] plpgsql.consistent_into

2014-01-11 Thread Pavel Stehule
Hello 2014/1/12 Marko Tiikkaja ma...@joh.to Greetings fellow elephants, I would humbly like to submit for your consideration my proposal for alleviating pain caused by one of the most annoying footguns in PL/PgSQL: the behaviour of SELECT .. INTO when the query returns more than one row.

[HACKERS] Retain dynamic shared memory segments for postmaster lifetime

2014-01-11 Thread Amit Kapila
Currently there is no way user can keep the dsm segments if he wants for postmaster lifetime, so I have exposed a new API dsm_keep_segment() to implement the same. The specs and need for this API is already discussed in thread:

Re: [HACKERS] PostgreSQL Service on Windows does not start if data directory given is relative path

2014-01-11 Thread David Rowley
On Tue, Jan 7, 2014 at 12:42 AM, Rajeev rastogi rajeev.rast...@huawei.comwrote: I have found a case that PostgreSQL as win32 service does not start, if the data directory given as relative path. Error observed in this case is: “The PostgreSQL on Local

[HACKERS] Why does numeric_out produce so many trailing zeros?

2014-01-11 Thread David Rowley
I've been reading the documents on numeric and I can't find any information on the reason that a query like this: test=# select n::numeric / 1 from generate_series(1,2) s(n); ?column? 1. 2. (2 rows) produces results that