Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Amit Kapila
On Fri, Jan 10, 2014 at 9:17 PM, Bruce Momjian 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 provide a

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 t

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 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 parses the result

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 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 with > cont

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 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: > > http://postgres-benchmarks.s3-website-us-east-1.amazonaws.com/exclusion-no-deadlock/ To pu

Re: [HACKERS] Simple improvements to freespace allocation

2014-01-11 Thread Simon Riggs
On 9 January 2014 01:38, Jim Nasby 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 there's

Re: [HACKERS] array_length(anyarray)

2014-01-11 Thread Florian Pflug
On Jan10, 2014, at 15:10 , Merlin Moncure wrote: > On Fri, Jan 10, 2014 at 6:00 AM, Florian Pflug wrote: >> On Jan10, 2014, at 11:00 , Merlin Moncure wrote: >>> On Fri, Jan 10, 2014 at 3:52 AM, Marko Tiikkaja wrote: On 1/10/14, 10:41 AM, Merlin Moncure wrote: > > What's needed for

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Tom Lane
Craig Ringer 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 any of the standard

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. Ev

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Magnus Hagander
On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane wrote: > Craig Ringer 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

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 wrote: > On Thu, Jan 9, 2014, at 20:05, Magnus Hagander wrote: > > On Thu, Nov 14, 2013 at 10:27 AM, Mika Eloranta wrote: > >> On 13 Nov 2013, at 20:51, Mika Eloranta wrote: > >> > >> > >> > > Prevent excessive progress reporting that can grow to g

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Florian Pflug
On Jan11, 2014, at 01:48 , Joshua D. Drake 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 existing sy

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Tom Lane
Florian Pflug 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 simply generate

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 state

Re: [HACKERS] Compiling extensions on Windows

2014-01-11 Thread Tom Lane
Magnus Hagander writes: > On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane 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 enables exporting of *all* > symbo

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 wrote: > > > We cannot run parallel pg_dump on the standby server because

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 wrote: > Magnus Hagander writes: > > On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane 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 thro

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

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 > stringT

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 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 >> the

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 4)

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 ma

Re: [HACKERS] pg_export_snapshot on standby side

2014-01-11 Thread Simon Riggs
On 11 January 2014 18:34, Bruce Momjian 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 (pgsql-hackers@po

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 > 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 deprecated,

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 di

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 this

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 > wrote: Magnus Hagander mailto:mag...@hagander.net>> writes: > On Sat, Jan 11, 2014 at 5:00 PM, Tom Lane mailto:t...@sss.pgh.pa.us>> wrote: >> I'm not sure I beli

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Tom Lane
Mark Kirkwood 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 > availability. Also a reasonabl

Re: [HACKERS] nested hstore patch

2014-01-11 Thread David E. Wheeler
On Jan 11, 2014, at 1:47 PM, Andrew Dunstan wrote: > It's been committed at > . > It will be in the next version of the patch posted. Bah! Sorry about that. Habit from decades of typing HTML. David -- Sent

[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 participating

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 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 January commitfest.

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'

Re: [HACKERS] Recovery to backup point

2014-01-11 Thread MauMau
From: "Michael Paquier" On Fri, Jan 10, 2014 at 12:08 AM, MauMau 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. Although I don't have a good naming sense i

Re: [HACKERS] Standalone synchronous master

2014-01-11 Thread Amit Kapila
On Sun, Jan 12, 2014 at 8:48 AM, Josh Berkus 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 of the admi

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 " > >

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 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 parameter, s

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[][]) = 4

[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=20&status=3 their registration is valid still? Regards Pavel

Re: [HACKERS] array_length(anyarray)

2014-01-11 Thread Pavel Stehule
2014/1/12 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

[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 rais

Re: [HACKERS] plpgsql.consistent_into

2014-01-11 Thread Pavel Stehule
Hello 2014/1/12 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 o

[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: http://www.postgresql.org/message-id/ca+tgmoakogujqbedgeykysxud9eaidqx

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 wrote: > 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 Computer started > and the

[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 h