[HACKERS] PostgreSQL 9.4 InterlockedCompareExchange appearing in mingw64-w32 causing issue with PostGIS win32 load

2014-05-21 Thread Paragon Corporation
Not sure if people know this, but PostGIS windows builds are built with mingw64-w32 and mingw64-w64 chains and usually used with EDB VC++ built PostgreSQL. This is mostly because there is too much unix stuff ingrained in PostGIS toolchain making it difficult to compile in VC++. Anyrate this has w

[HACKERS] relaying errors from background workers

2014-05-21 Thread Robert Haas
Suppose a user backend starts a background worker for some purpose; the background worker dies with an error. The infrastructure we have today is sufficient for the user backend to discover that the worker backend has died, but not why. There might be an error in the server log, but the error inf

[HACKERS] Re: Logical slots not mentioned in CREATE_REPLICATION_SLOT for replication protocol docs

2014-05-21 Thread Michael Paquier
On Thu, May 22, 2014 at 12:44 PM, Michael Paquier wrote: > Hi all, > > As written in subject, replication protocol documentation lacks > details about logical slots in CREATE_REPLICATION_SLOT command: > http://www.postgresql.org/docs/devel/static/protocol-replication.html > Attached is a patch cor

[HACKERS] Logical slots not mentioned in CREATE_REPLICATION_SLOT for replication protocol docs

2014-05-21 Thread Michael Paquier
Hi all, As written in subject, replication protocol documentation lacks details about logical slots in CREATE_REPLICATION_SLOT command: http://www.postgresql.org/docs/devel/static/protocol-replication.html Attached is a patch correcting that. Regards, -- Michael diff --git a/doc/src/sgml/protocol

[HACKERS] 9.4 btree index corruption

2014-05-21 Thread Jeff Janes
Testing partial-write crash-recovery in 9.4 (e12d7320ca494fd05134847e30) with foreign keys, I found some btree index corruption. 28807 VACUUM 2014-05-21 15:33:46.878 PDT:ERROR: right sibling 4044 of block 460 is not next child 23513 of block 1264 in index "foo_p_id_idx" 28807 VACUUM 2014-05-21 15

Re: [HACKERS] [PATCH] Add --ordered option to pg_dump

2014-05-21 Thread Thomas Sibley
I came across this thread from a web search when looking for prior art. I'm reviving it to alert other interested folks to a flaw in the provided patch should they try to use it. The feature request seems somewhat common on the web, and the patch here would cause some fun debugging sessions otherw

Re: [HACKERS] pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3

2014-05-21 Thread Bruce Momjian
On Wed, May 21, 2014 at 04:23:34PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Wed, May 21, 2014 at 10:56:59AM -0600, Jeff Ross wrote: > >> Yes, using 9.3's pg_dump of 8.4 and applying it to both an 8.4 and a > >> 9.3 cluster, the contact_email table now has toast in both 8.4 and > >> 9.

Re: [HACKERS] pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3

2014-05-21 Thread Tom Lane
Bruce Momjian writes: > On Wed, May 21, 2014 at 10:56:59AM -0600, Jeff Ross wrote: >> Yes, using 9.3's pg_dump of 8.4 and applying it to both an 8.4 and a >> 9.3 cluster, the contact_email table now has toast in both 8.4 and >> 9.3. > So the big question is why doesn't the existing 8.4 table have

Re: [HACKERS] pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3

2014-05-21 Thread Bruce Momjian
On Wed, May 21, 2014 at 10:56:59AM -0600, Jeff Ross wrote: > > On 5/21/14, 9:13 AM, Bruce Momjian wrote: > > > >On Wed, May 21, 2014 at 09:11:05AM -0600, Jeff Ross wrote: > >>-- For binary upgrade, set heap's relfrozenxid > >>UPDATE pg_catalog.pg_class > >>SET relfrozenxid = '1944' > >>WHERE oid =

Re: [HACKERS] Bison 3.0 updates

2014-05-21 Thread Tom Lane
Vik Fearing writes: > On 05/21/2014 12:29 PM, Tom Lane wrote: >> I didn't do anything to suppress those warnings: >>> gram.y:172.1-13: warning: deprecated directive, use ‘%name-prefix’ >>> [-Wdeprecated] >>> %name-prefix="base_yy" >>> ^ >> because it's hard to see how that's anythi

Re: [HACKERS] pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3

2014-05-21 Thread Jeff Ross
On 5/21/14, 9:13 AM, Bruce Momjian wrote: On Wed, May 21, 2014 at 09:11:05AM -0600, Jeff Ross wrote: -- For binary upgrade, set heap's relfrozenxid UPDATE pg_catalog.pg_class SET relfrozenxid = '1944' WHERE oid = 'contact_email'::pg_catalog.regclass; -- For binary upgrade, set toast's relfroz

Re: [HACKERS] Bison 3.0 updates

2014-05-21 Thread Vik Fearing
On 05/21/2014 12:29 PM, Tom Lane wrote: > Vik Fearing writes: >> I'm getting some more of these, including some I thought you had fixed. >> Bison 3.0.2 on current head. > I didn't do anything to suppress those warnings: > >> gram.y:172.1-13: warning: deprecated directive, use ‘%name-prefix’ >> [-W

Re: [HACKERS] Bison 3.0 updates

2014-05-21 Thread Tom Lane
Vik Fearing writes: > I'm getting some more of these, including some I thought you had fixed. > Bison 3.0.2 on current head. I didn't do anything to suppress those warnings: > gram.y:172.1-13: warning: deprecated directive, use ‘%name-prefix’ > [-Wdeprecated] > %name-prefix="base_yy" > ^^^

Re: [HACKERS] Bison 3.0 updates

2014-05-21 Thread Vik Fearing
I'm getting some more of these, including some I thought you had fixed. Bison 3.0.2 on current head. <> Writing postgres.bki Writing schemapg.h Writing postgres.description Writing postgres.shdescription gram.y:172.1-13: warning: deprecated directive, use ‘%name-prefix’ [-Wdeprecated] %name-pre

Re: [HACKERS] buildfarm animals and 'snapshot too old'

2014-05-21 Thread Andrew Dunstan
On 05/20/2014 09:42 AM, Tom Lane wrote: Regarding clock skew, I think we can do better then what you suggest. The web transaction code in the client adds its own timestamp just before running the web transaction. It would be quite reasonable to reject reports from machines with skewed clocks ba

Re: [HACKERS] pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3

2014-05-21 Thread Bruce Momjian
On Tue, May 20, 2014 at 10:25:44PM -0400, Bruce Momjian wrote: > Find the table that is getting the toast file on the new cluster but not > the old one, and run all the commands related to that table from the > dump --- you don't need to load any data, just the schema items. > > Run that on the ol

Re: [HACKERS] BUGFIX: Dynamic bgworkers with BGW_NEVER_RESTART worker restarted on FatalError

2014-05-21 Thread Robert Haas
On Fri, May 16, 2014 at 1:38 AM, Craig Ringer wrote: > There's a bug in the dynamic bgworkers code that I think needs fixing > before release. TL;DR: BGW_NO_RESTART workers are restarted after > postmaster crash, attached patch changes that. > > The case that's triggering the issue is where a stat

Re: [HACKERS] jsonb failed assertions

2014-05-21 Thread Heikki Linnakangas
On 05/20/2014 09:22 PM, Peter Geoghegan wrote: On Tue, May 20, 2014 at 4:17 PM, Pavel Stehule wrote: table dump is downloadable from http://pgsql.cz/data/data.dump.gz This looks like an over-zealous assertion, without any user-visible consequences. Mea culpa. Attached patch corrects the prob

[HACKERS] replication protocol documentation inconsistencies

2014-05-21 Thread Peter Eisentraut
Looking at http://www.postgresql.org/docs/devel/static/protocol-replication.html under START_REPLICATION it goes """ The payload of each CopyData message from server to the client contains a message of one of the following formats: If a slot's name is provided via slotname, it will be updated as

Re: [HACKERS] Allowing join removals for more join types

2014-05-21 Thread David Rowley
On Tue, May 20, 2014 at 11:22 PM, Tom Lane wrote: > David Rowley writes: > > I'm also now wondering if I need to do some extra tests in the existing > > code to ensure that the subquery would have had no side affects. > > You should probably at least refuse the optimization if the subquery's > t