[COMMITTERS] pgsql: Remove unnecessairly duplicated gram.y productions

2017-04-27 Thread Stephen Frost
Remove unnecessairly duplicated gram.y productions Declarative partitioning duplicated the TypedTableElement productions, evidently to remove the need to specify WITH OPTIONS when creating partitions. Instead, simply make WITH OPTIONS optional in the TypedTableElement production and remove all of

[COMMITTERS] pgsql: Don't build full initial logical decoding snapshot if NOEXPORT_S

2017-04-27 Thread Andres Freund
Don't build full initial logical decoding snapshot if NOEXPORT_SNAPSHOT. Earlier commits (56e19d938dd14 and 2bef06d5164) make it cheaper to create a logical slot if not exporting the initial snapshot. If NOEXPORT_SNAPSHOT is specified, we can skip the overhead, not just when creating a slot via s

[COMMITTERS] pgsql: Don't use on-disk snapshots for exported logical decoding snapsh

2017-04-27 Thread Andres Freund
Don't use on-disk snapshots for exported logical decoding snapshot. Logical decoding stores historical snapshots on disk, so that logical decoding can restart without having to reconstruct a snapshot from scratch (for which the resources are not guaranteed to be present anymore). These serialized

[COMMITTERS] pgsql: Don't use on-disk snapshots for exported logical decoding snapsh

2017-04-27 Thread Andres Freund
Don't use on-disk snapshots for exported logical decoding snapshot. Logical decoding stores historical snapshots on disk, so that logical decoding can restart without having to reconstruct a snapshot from scratch (for which the resources are not guaranteed to be present anymore). These serialized

[COMMITTERS] pgsql: Don't use on-disk snapshots for exported logical decoding snapsh

2017-04-27 Thread Andres Freund
Don't use on-disk snapshots for exported logical decoding snapshot. Logical decoding stores historical snapshots on disk, so that logical decoding can restart without having to reconstruct a snapshot from scratch (for which the resources are not guaranteed to be present anymore). These serialized

[COMMITTERS] pgsql: Don't use on-disk snapshots for exported logical decoding snapsh

2017-04-27 Thread Andres Freund
Don't use on-disk snapshots for exported logical decoding snapshot. Logical decoding stores historical snapshots on disk, so that logical decoding can restart without having to reconstruct a snapshot from scratch (for which the resources are not guaranteed to be present anymore). These serialized

[COMMITTERS] pgsql: Avoid slow shutdown of pg_basebackup.

2017-04-27 Thread Tom Lane
Avoid slow shutdown of pg_basebackup. pg_basebackup's child process did not pay any attention to the pipe from its parent while waiting for input from the source server. If no server data was arriving, it would only wake up and check the pipe every standby_message_timeout or so. This creates a pr

[COMMITTERS] pgsql: Fix bug so logical rep launcher saves correctly time of last sta

2017-04-27 Thread Fujii Masao
Fix bug so logical rep launcher saves correctly time of last startup of worker. Previously the logical replication launcher stored the last timestamp when it started the worker, in the local variable "last_start_time", in order to check whether wal_retrive_retry_interval elapsed since the last sta

[COMMITTERS] pgsql: Cope with glibc too old to have epoll_create1().

2017-04-27 Thread Tom Lane
Cope with glibc too old to have epoll_create1(). Commit fa31b6f4e supposed that we didn't have to worry about that anymore, but it seems that RHEL5 is like that, and that's still a supported platform. Put back the prior coding under an #ifdef, adding an explicit fcntl() to retain the desired CLOE

[COMMITTERS] pgsql: Cope with glibc too old to have epoll_create1().

2017-04-27 Thread Tom Lane
Cope with glibc too old to have epoll_create1(). Commit fa31b6f4e supposed that we didn't have to worry about that anymore, but it seems that RHEL5 is like that, and that's still a supported platform. Put back the prior coding under an #ifdef, adding an explicit fcntl() to retain the desired CLOE

[COMMITTERS] pgsql: Preserve required !catalog tuples while computing initial decodi

2017-04-27 Thread Andres Freund
Preserve required !catalog tuples while computing initial decoding snapshot. The logical decoding machinery already preserved all the required catalog tuples, which is sufficient in the course of normal logical decoding, but did not guarantee that non-catalog tuples were preserved during computati

[COMMITTERS] pgsql: Preserve required !catalog tuples while computing initial decodi

2017-04-27 Thread Andres Freund
Preserve required !catalog tuples while computing initial decoding snapshot. The logical decoding machinery already preserved all the required catalog tuples, which is sufficient in the course of normal logical decoding, but did not guarantee that non-catalog tuples were preserved during computati

[COMMITTERS] pgsql: Preserve required !catalog tuples while computing initial decodi

2017-04-27 Thread Andres Freund
Preserve required !catalog tuples while computing initial decoding snapshot. The logical decoding machinery already preserved all the required catalog tuples, which is sufficient in the course of normal logical decoding, but did not guarantee that non-catalog tuples were preserved during computati

[COMMITTERS] pgsql: Preserve required !catalog tuples while computing initial decodi

2017-04-27 Thread Andres Freund
Preserve required !catalog tuples while computing initial decoding snapshot. The logical decoding machinery already preserved all the required catalog tuples, which is sufficient in the course of normal logical decoding, but did not guarantee that non-catalog tuples were preserved during computati

[COMMITTERS] pgsql: Make latch.c more paranoid about child-process cases.

2017-04-27 Thread Tom Lane
Make latch.c more paranoid about child-process cases. Although the postmaster doesn't currently create a self-pipe or any latches, there's discussion of it doing so in future. It's also conceivable that a shared_preload_libraries extension would try to create such a thing in the postmaster proces

[COMMITTERS] pgsql: Make latch.c more paranoid about child-process cases.

2017-04-27 Thread Tom Lane
Make latch.c more paranoid about child-process cases. Although the postmaster doesn't currently create a self-pipe or any latches, there's discussion of it doing so in future. It's also conceivable that a shared_preload_libraries extension would try to create such a thing in the postmaster proces

[COMMITTERS] pgsql: doc: PG10 release note typo fix

2017-04-27 Thread Bruce Momjian
doc: PG10 release note typo fix Reported-by: daniel.westermann Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/a311d2a04f849f76d33b59995097999a311a4c62 Modified Files -- doc/src/sgml/release-10.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[COMMITTERS] pgsql: doc PG10rel: adjust hash index commits and add parallel subquery

2017-04-27 Thread Bruce Momjian
doc PG10rel: adjust hash index commits and add parallel subquery Reported-by: Amit Kapila Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f8ab08ad0e411139060bf943fa9931f7fbe97cde Modified Files -- doc/src/sgml/release-10.sgml | 18 ++ 1 f

[COMMITTERS] pgsql: Rework handling of subtransactions in 2PC recovery

2017-04-27 Thread Simon Riggs
Rework handling of subtransactions in 2PC recovery The bug fixed by 0874d4f3e183757ba15a4b3f3bf563e0393dd9c2 caused us to question and rework the handling of subtransactions in 2PC during and at end of recovery. Patch adds checks and tests to ensure no further bugs. This effectively removes the t

Re: [COMMITTERS] pgsql: Additional tests for subtransactions in recovery

2017-04-27 Thread Michael Paquier
On Thu, Apr 27, 2017 at 9:28 PM, Simon Riggs wrote: > Additional tests for subtransactions in recovery > > Tests for normal and prepared transactions > > Author: Nikhil Sontakke, placed in new test file by me +$node_slave->promote; +$node_slave->poll_query_until('postgres', + "SELECT NOT pg_is_

[COMMITTERS] pgsql: Additional tests for subtransactions in recovery

2017-04-27 Thread Simon Riggs
Additional tests for subtransactions in recovery Tests for normal and prepared transactions Author: Nikhil Sontakke, placed in new test file by me Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0352c15e5ab4f70c3ab2ac1d48d9f38a5dd11786 Modified Files -