[COMMITTERS] pgsql: Don't include sys/poll.h anymore.

2017-04-23 Thread Andres Freund
Don't include sys/poll.h anymore. poll.h is mandated by Single Unix Spec v2, the usual baseline for postgres on unix. None of the unixoid buildfarms animals has sys/poll.h but not poll.h. Therefore there's not much point to test for sys/poll.h's existence and include it optionally. Author: Andr

[COMMITTERS] pgsql: Zero padding in replication origin's checkpointed on disk-state.

2017-04-23 Thread Andres Freund
Zero padding in replication origin's checkpointed on disk-state. This seems to be largely cosmetic, avoiding valgrind bleats and the like. The uninitialized padding influences the CRC of the on-disk entry, but because it's also used when verifying the CRC, that doesn't cause spurious failures. Ba

[COMMITTERS] pgsql: Initialize all memory for logical replication relation cache.

2017-04-23 Thread Andres Freund
Initialize all memory for logical replication relation cache. As reported by buildfarm animal skink / valgrind, some of the variables weren't always initialized. To avoid further mishaps use memset to ensure the entire entry is initialized. Author: Petr Jelinek Reported-By: Andres Freund Discuss

[COMMITTERS] pgsql: Zero padding in replication origin's checkpointed on disk-state.

2017-04-23 Thread Andres Freund
Zero padding in replication origin's checkpointed on disk-state. This seems to be largely cosmetic, avoiding valgrind bleats and the like. The uninitialized padding influences the CRC of the on-disk entry, but because it's also used when verifying the CRC, that doesn't cause spurious failures. Ba

[COMMITTERS] pgsql: Zero padding in replication origin's checkpointed on disk-state.

2017-04-23 Thread Andres Freund
Zero padding in replication origin's checkpointed on disk-state. This seems to be largely cosmetic, avoiding valgrind bleats and the like. The uninitialized padding influences the CRC of the on-disk entry, but because it's also used when verifying the CRC, that doesn't cause spurious failures. Ba

[COMMITTERS] pgsql: Remove select(2) backed latch implementation.

2017-04-23 Thread Andres Freund
Remove select(2) backed latch implementation. poll(2) is required by Single Unix Spec v2, the usual baseline for postgres (leaving windows aside). There's not been any buildfarm animals without poll(2) for a long while, leaving the select(2) implementation to be largely untested. On windows, inc

[COMMITTERS] pgsql: Workaround for RecoverPreparedTransactions()

2017-04-23 Thread Simon Riggs
Workaround for RecoverPreparedTransactions() Force overwriteOK = true while we investigate deeper fix Proposed by Tom Lane as temporary measure, accepted by me Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/546c13e11b29a5408b9d6a6e3cca301380b47f7f Modified Files

[COMMITTERS] pgsql: Fix LagTrackerRead() for timeline increments

2017-04-23 Thread Simon Riggs
Fix LagTrackerRead() for timeline increments Bug was masked by error in running 004_timeline_switch.pl that was fixed recently in 7d68f2281a. Detective work by Alvaro Herrera and Tom Lane Author: Thomas Munro Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8463880

[COMMITTERS] pgsql: Fix order of arguments to SubTransSetParent().

2017-04-23 Thread Tom Lane
Fix order of arguments to SubTransSetParent(). ProcessTwoPhaseBuffer (formerly StandbyRecoverPreparedTransactions) mixed up the parent and child XIDs when calling SubTransSetParent to record the transactions' relationship in pg_subtrans. Remarkably, analysis by Simon Riggs suggests that this does

[COMMITTERS] pgsql: Fix order of arguments to SubTransSetParent().

2017-04-23 Thread Tom Lane
Fix order of arguments to SubTransSetParent(). ProcessTwoPhaseBuffer (formerly StandbyRecoverPreparedTransactions) mixed up the parent and child XIDs when calling SubTransSetParent to record the transactions' relationship in pg_subtrans. Remarkably, analysis by Simon Riggs suggests that this does

[COMMITTERS] pgsql: Fix order of arguments to SubTransSetParent().

2017-04-23 Thread Tom Lane
Fix order of arguments to SubTransSetParent(). ProcessTwoPhaseBuffer (formerly StandbyRecoverPreparedTransactions) mixed up the parent and child XIDs when calling SubTransSetParent to record the transactions' relationship in pg_subtrans. Remarkably, analysis by Simon Riggs suggests that this does

[COMMITTERS] pgsql: Fix order of arguments to SubTransSetParent().

2017-04-23 Thread Tom Lane
Fix order of arguments to SubTransSetParent(). ProcessTwoPhaseBuffer (formerly StandbyRecoverPreparedTransactions) mixed up the parent and child XIDs when calling SubTransSetParent to record the transactions' relationship in pg_subtrans. Remarkably, analysis by Simon Riggs suggests that this does

[COMMITTERS] pgsql: Fix order of arguments to SubTransSetParent().

2017-04-23 Thread Tom Lane
Fix order of arguments to SubTransSetParent(). ProcessTwoPhaseBuffer (formerly StandbyRecoverPreparedTransactions) mixed up the parent and child XIDs when calling SubTransSetParent to record the transactions' relationship in pg_subtrans. Remarkably, analysis by Simon Riggs suggests that this does

[COMMITTERS] pgsql: Fix order of arguments to SubTransSetParent().

2017-04-23 Thread Tom Lane
Fix order of arguments to SubTransSetParent(). ProcessTwoPhaseBuffer (formerly StandbyRecoverPreparedTransactions) mixed up the parent and child XIDs when calling SubTransSetParent to record the transactions' relationship in pg_subtrans. Remarkably, analysis by Simon Riggs suggests that this does

[COMMITTERS] pgsql: Fix TAP infrastructure to support Mingw better

2017-04-23 Thread Andrew Dunstan
Fix TAP infrastructure to support Mingw better archive_command and restore_command need to refer to Windows paths, not Msys virtual file system paths, as postgres is completely unaware of the latter, so prefix them with the Windows path to the virtual file system root. Clean psql output of carriag

[COMMITTERS] pgsql: Fix TAP infrastructure to support Mingw better

2017-04-23 Thread Andrew Dunstan
Fix TAP infrastructure to support Mingw better archive_command and restore_command need to refer to Windows paths, not Msys virtual file system paths, as postgres is completely unaware of the latter, so prefix them with the Windows path to the virtual file system root. Clean psql and pg_recvlogica