Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-02-01 Thread Peter Geoghegan
I thought I'd try out what I was in an immediate position to do without having access to dedicated multi-socket hardware: A benchmark on AWS. This was a c3.8xlarge instance, which are reportedly backed by Intel Xeon E5-2680 processors. Since the Intel ARK website reports that these CPUs have 16

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-02-01 Thread Greg Stark
On Fri, Jan 31, 2014 at 8:21 PM, Tom Lane t...@sss.pgh.pa.us wrote: So on a filesystem that supports holes in files, I'd expect that the added segments would be fully allocated if XLogReadBufferExtended did the deed, but they'd be quite small if _mdfd_getseg did so. The du results you

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-02-01 Thread Greg Stark
The plot thickens... Looking at the next relation I see a similar symptom of a single valid block at the end of several segments of nuls. This relation is also a btree on the same table and has a header in the near vicinity of the xlog: d9de7pcqls4ib6=# select

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

2014-02-01 Thread Oskari Saarenmaa
31.01.2014 10:59, Sawada Masahiko kirjoitti: On Tue, Jan 21, 2014 at 7:17 AM, Oskari Saarenmaa o...@ohmu.fi wrote: 18.11.2013 07:53, Sawada Masahiko kirjoitti: On 13 Nov 2013, at 20:51, Mika Eloranta m...@ohmu.fi wrote: Prevent excessive progress reporting that can grow to gigabytes of

Re: [HACKERS] [PATCH] Support for pg_stat_archiver view

2014-02-01 Thread Michael Paquier
On Wed, Jan 29, 2014 at 3:03 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jan 28, 2014 at 3:42 AM, Fujii Masao masao.fu...@gmail.com wrote: On Sat, Jan 25, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Sat, Jan 25, 2014 at 5:41 AM, Fujii Masao

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-02-01 Thread Andres Freund
On 2014-01-31 17:52:58 -0800, Peter Geoghegan wrote: On Fri, Jan 31, 2014 at 1:54 AM, Andres Freund and...@2ndquadrant.com wrote: I plan to split the atomics patch into smaller chunks before reposting. Imo the Convert the PGPROC-lwWaitLink list into a dlist instead of open coding it. is

Re: [HACKERS] install libpq.dll in bin directory on Windows / Cygwin

2014-02-01 Thread Peter Eisentraut
On 1/31/14, 12:47 PM, Andrew Dunstan wrote: Hmm, looks like it got dropped. I think my original patch is probably about the the right thing to do, and given that it's already done by the MSVC build it's a bug and should be backported, as Alvaro said in the original discussion. I'll get on

Re: [HACKERS] LDAP: bugfix and deprecated OpenLDAP API

2014-02-01 Thread Peter Eisentraut
On 1/31/14, 6:32 PM, Bruce Momjian wrote: On Mon, Oct 21, 2013 at 01:31:26PM +, Albe Laurenz wrote: Bind attempts to an LDAP server should time out after two seconds, allowing additional lines in the service control file to be parsed (which provide a fall back to a secondary LDAP server or

Re: [HACKERS] [bug fix] postgres.exe fails to start on Windows Server 2012 due to ASLR

2014-02-01 Thread MauMau
From: Craig Ringer cr...@2ndquadrant.com I'm reasonably persuaded that there's a need for this, though IFEO (see below) can be used at or after install-time as a workaround. I see. And I also found it effective as another workaround to set the below registry key. This disables ASLR for all

Re: [HACKERS] Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire

2014-02-01 Thread Christian Kruse
Hi, On 01/02/14 02:45, Fujii Masao wrote: LOG: process 33662 still waiting for ShareLock on transaction 1011 after 1000.184 ms DETAIL: Process holding the lock: 33660. Request queue: 33662. [… snip …] LOG: process 33665 still waiting for ExclusiveLock on tuple (0,4) of

Re: [HACKERS] [bug fix] pg_ctl fails with config-only directory

2014-02-01 Thread Christian Kruse
Hi, On 31/01/14 22:17, MauMau wrote: Thanks for reviewing the patch. Fixed. I'll add this revised patch to the CommitFest entry soon. Looks fine for me. Set it to „waiting for commit.“ Best regards, -- Christian Kruse http://www.2ndQuadrant.com/ PostgreSQL Development,

Re: [HACKERS] Patch: show xid and xmin in pg_stat_activity and pg_stat_replication

2014-02-01 Thread Christian Kruse
Hi, On 31/01/14 11:24, Robert Haas wrote: what do you think about the approach the attached patch implements? I'm not really sure if this is what you had in mind, especially if this is the right lock. The attached patch seems not to be attached, […] *sighs* I'm at FOSDEM right now, I

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-01 Thread Michael Paquier
On Fri, Dec 13, 2013 at 2:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-12-12 11:55:51 -0500, Tom Lane wrote: I'm not, however, terribly thrilled with the suggestions to add implicit casts associated with this type. Implicit casts are generally

Re: [HACKERS] should we add a XLogRecPtr/LSN SQL type?

2014-02-01 Thread Andres Freund
On 2014-02-02 00:04:41 +0900, Michael Paquier wrote: On Fri, Dec 13, 2013 at 2:47 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-12-12 11:55:51 -0500, Tom Lane wrote: I'm not, however, terribly thrilled with the suggestions to add implicit

[HACKERS] IndexBuildHeapScan doesn't use page at a time mode

2014-02-01 Thread Andres Freund
Hi, While looking at a profile I noticed that non-concurrent index builds use the page at a time mode. Since that causes more buffer lwlocks to be taken, that's a noticeable slowdown according to a completely unscientific hack. The reason for not using the page at a time mode is that we only

Re: [HACKERS] Patch: show xid and xmin in pg_stat_activity and pg_stat_replication

2014-02-01 Thread Andres Freund
Him On 2014-02-01 17:03:46 +0100, Christian Kruse wrote: diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index a37e6b6..bef5912 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -629,6 +629,16 @@ postgres: replaceableuser/

Re: [HACKERS] [PATCH] Support for pg_stat_archiver view

2014-02-01 Thread Fujii Masao
On Sat, Feb 1, 2014 at 9:32 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Jan 29, 2014 at 3:03 AM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jan 28, 2014 at 3:42 AM, Fujii Masao masao.fu...@gmail.com wrote: On Sat, Jan 25, 2014 at 3:19 PM, Michael Paquier

Re: [HACKERS] [PATCH] Support for pg_stat_archiver view

2014-02-01 Thread Gabriele Bartolini
Hi Michael and Fujii, Il 01/02/14 17:46, Fujii Masao ha scritto: I think that it's OK to add that as TODO item. There might be the system that the speed of WAL archiving is slower than that of WAL generation, at peak time. The DBA of that system might want to monitor the size of archive

Re: [HACKERS] What is happening on buildfarm member crake?

2014-02-01 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sat, Jan 25, 2014 at 5:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Yeah. If Robert's diagnosis is correct, and it sounds pretty plausible, then this is really just one instance of a bug that's probably pretty widespread in our signal handlers.

Re: [HACKERS] install libpq.dll in bin directory on Windows / Cygwin

2014-02-01 Thread Andrew Dunstan
On 02/01/2014 08:01 AM, Peter Eisentraut wrote: On 1/31/14, 12:47 PM, Andrew Dunstan wrote: Hmm, looks like it got dropped. I think my original patch is probably about the the right thing to do, and given that it's already done by the MSVC build it's a bug and should be backported, as Alvaro

Re: [HACKERS] [9.3 bug] disk space in pg_xlog increases during archive recovery

2014-02-01 Thread Andres Freund
On 2014-01-21 23:37:43 +0200, Heikki Linnakangas wrote: On 01/21/2014 07:31 PM, Fujii Masao wrote: On Fri, Dec 20, 2013 at 9:21 PM, MauMau maumau...@gmail.com wrote: From: Fujii Masao masao.fu...@gmail.com ! if (source == XLOG_FROM_ARCHIVE StandbyModeRequested) Even when standby_mode

Re: [HACKERS] [9.3 bug] disk space in pg_xlog increases during archive recovery

2014-02-01 Thread Andres Freund
On 2014-01-24 22:31:17 +0900, MauMau wrote: From: Fujii Masao masao.fu...@gmail.com On Wed, Jan 22, 2014 at 6:37 AM, Heikki Linnakangas Thanks! The patch looks good to me. Attached is the updated version of the patch. I added the comments. Thank you very much. Your comment looks great. I

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-02-01 Thread Peter Geoghegan
On Sat, Feb 1, 2014 at 4:57 AM, Andres Freund and...@2ndquadrant.com wrote: I'm looking at alternative options, because this is not terribly helpful. With those big caveats in mind, consider the results of the benchmark, which show the patch performing somewhat worse than the master baseline

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-02-01 Thread Andres Freund
On 2014-02-01 13:40:20 -0800, Peter Geoghegan wrote: On Sat, Feb 1, 2014 at 4:57 AM, Andres Freund and...@2ndquadrant.com wrote: I'm looking at alternative options, because this is not terribly helpful. With those big caveats in mind, consider the results of the benchmark, which show the

Re: [HACKERS] Postgresql for cygwin - 3rd

2014-02-01 Thread Andrew Dunstan
On 01/25/2014 01:23 PM, Andrew Dunstan wrote: I have now tested the central part of the proposed changes on both old and new Cygwin installations, and they appear to work. I'm going to commit them and backpatch back to 9.0, which is where we currently have buildfarm coverage (and 8.4 will

Re: [HACKERS] Postgresql for cygwin - 3rd

2014-02-01 Thread Marco Atzeri
On 01/02/2014 22:57, Andrew Dunstan wrote: On 01/25/2014 01:23 PM, Andrew Dunstan wrote: * isolation tests fail with an indefinite hang on newer Cygwin * prepared_xacts test fails with an indefinite hang on newer Cygwin if run in parallel with other tests * tsearch tests fail

Re: [HACKERS] jsonb and nested hstore

2014-02-01 Thread Andres Freund
On 2014-01-30 14:07:42 -0500, Andrew Dunstan wrote: + para id=functions-json-table + xref linkend=functions-json-creation-table shows the functions that are + available for creating typejson/type values. + (see xref linkend=datatype-json) /para - table id=functions-json-table

Re: [HACKERS] Postgresql for cygwin - 3rd

2014-02-01 Thread Andrew Dunstan
On 02/01/2014 05:12 PM, Marco Atzeri wrote: On 01/02/2014 22:57, Andrew Dunstan wrote: On 01/25/2014 01:23 PM, Andrew Dunstan wrote: * isolation tests fail with an indefinite hang on newer Cygwin * prepared_xacts test fails with an indefinite hang on newer Cygwin if run in

Re: [HACKERS] Postgresql for cygwin - 3rd

2014-02-01 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 02/01/2014 05:12 PM, Marco Atzeri wrote: is it possible the tsearch test never worked on en_US.utf8 but only on C locale ? Yes, that's more or less what I said, I thought. Maybe we need to test this on other Windows systems in non-C encodings.

Re: [HACKERS] jsonb and nested hstore

2014-02-01 Thread Andrew Dunstan
On 02/01/2014 05:20 PM, Andres Freund wrote: [Long review] Most of these comments actually refer to Teodor and Oleg's code. I will attend to the parts that apply to my code. Thanks for the review. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] jsonb and nested hstore

2014-02-01 Thread Andres Freund
Hi, On 2014-02-01 18:13:42 -0500, Andrew Dunstan wrote: [Long review] Most of these comments actually refer to Teodor and Oleg's code. I will attend to the parts that apply to my code. Well, somebody will need to address them nonetheless :/ Greetings, Andres Freund -- Andres Freund

Re: [HACKERS] jsonb and nested hstore

2014-02-01 Thread Andrew Dunstan
On 02/01/2014 06:15 PM, Andres Freund wrote: Hi, On 2014-02-01 18:13:42 -0500, Andrew Dunstan wrote: [Long review] Most of these comments actually refer to Teodor and Oleg's code. I will attend to the parts that apply to my code. Well, somebody will need to address them nonetheless :/

[HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Tom Lane
I happened to notice today that the owner of buildfarm member narwhal is trying to revive it after a long time offline, but it's failing in the 9.3 branch (and not attempting to build HEAD, yet). The cause appears to be that contrib/postgres_fdw is referencing the DateStyle and IntervalStyle

Re: [HACKERS] [PATCH] Support for pg_stat_archiver view

2014-02-01 Thread Michael Paquier
On Sun, Feb 2, 2014 at 2:43 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote: Hi Michael and Fujii, Il 01/02/14 17:46, Fujii Masao ha scritto: I think that it's OK to add that as TODO item. There might be the system that the speed of WAL archiving is slower than that of WAL

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Andres Freund
On 2014-02-01 20:03:58 -0500, Tom Lane wrote: I think we should give serious consideration to desupporting this combination so that we can get rid of the plague of PGDLLIMPORT marks. Obviously this would depend on confirming that there are no more-interesting Windows build methods that

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Andrew Dunstan
On 02/01/2014 08:03 PM, Tom Lane wrote: I happened to notice today that the owner of buildfarm member narwhal is trying to revive it after a long time offline, but it's failing in the 9.3 branch (and not attempting to build HEAD, yet). The cause appears to be that contrib/postgres_fdw is

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Andres Freund
On 2014-02-02 02:15:39 +0100, Andres Freund wrote: On 2014-02-01 20:03:58 -0500, Tom Lane wrote: I think we should give serious consideration to desupporting this combination so that we can get rid of the plague of PGDLLIMPORT marks. Obviously this would depend on confirming that there are

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-02-01 20:03:58 -0500, Tom Lane wrote: I think we should give serious consideration to desupporting this combination so that we can get rid of the plague of PGDLLIMPORT marks. Obviously this would depend on confirming that there are no

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I don't know why it didn't fail for postgres_fdw. Hm, maybe it's because Mkvcbuild.pm links postgres_fdw with libpq, but not test_shm_mq? Hard to see how libpq as such could have anything to do with it. I wonder though if adding libpq causes some

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Andres Freund
On 2014-02-01 21:04:44 -0500, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: I don't know why it didn't fail for postgres_fdw. Hm, maybe it's because Mkvcbuild.pm links postgres_fdw with libpq, but not test_shm_mq? Hard to see how libpq as such could have anything to do with

Re: [HACKERS] Wait free LW_SHARED acquisition - v0.2

2014-02-01 Thread Peter Geoghegan
On Sat, Feb 1, 2014 at 1:41 PM, Andres Freund and...@2ndquadrant.com wrote: However, I tested the most recent revision from your git remote on the AWS instance. But that was before my fix, right. Except you managed to timetravel :) Heh, okay. So Nathan Boley has generously made available a

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-02-01 Thread Dave Page
On Sun, Feb 2, 2014 at 1:03 AM, Tom Lane t...@sss.pgh.pa.us wrote: I happened to notice today that the owner of buildfarm member narwhal is trying to revive it after a long time offline, but it's failing in the 9.3 branch (and not attempting to build HEAD, yet). The cause appears to be that