[COMMITTERS] pgsql: Expose waitforarchive option through pg_stop_backup()

2017-03-22 Thread Stephen Frost
Expose waitforarchive option through pg_stop_backup()

Internally, we have supported the option to either wait for all of the
WAL associated with a backup to be archived, or to return immediately.
This option is useful to users of pg_stop_backup() as well, when they
are reading the stop backup record position and checking that the WAL
they need has been archived independently.

This patch adds an additional, optional, argument to pg_stop_backup()
which allows the user to indicate if they wish to wait for the WAL to be
archived or not.  The default matches current behavior, which is to
wait.

Author: David Steele, with some minor changes, doc updates by me.
Reviewed by: Takayuki Tsunakawa, Fujii Masao
Discussion: 
https://postgr.es/m/758e3fd1-45b4-5e28-75cd-e9e7f93a4...@pgmasters.net

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/017e4f2588a7fc6f2d1fbb6fff8afa1ff6e31f2b

Modified Files
--
doc/src/sgml/backup.sgml   | 13 -
doc/src/sgml/func.sgml | 10 --
src/backend/access/transam/xlog.c  |  3 ++-
src/backend/access/transam/xlogfuncs.c | 12 ++--
src/backend/catalog/system_views.sql   |  8 +++-
src/include/catalog/catversion.h   |  2 +-
src/include/catalog/pg_proc.h  |  2 +-
7 files changed, 41 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: doc: Fix logical replication setup instructions

2017-03-22 Thread Peter Eisentraut
doc: Fix logical replication setup instructions

The pg_hba.conf rules were changed in
8df9bd0b445f9bd6134915d4417efde6e85e3add.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/b9418911900ff5b68a5457b1542668077664e897

Modified Files
--
doc/src/sgml/logical-replication.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: doc: Improve CREATE PUBLICATION examples

2017-03-22 Thread Peter Eisentraut
doc: Improve CREATE PUBLICATION examples

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/cbf7ed51b8c0c3e506b91765769f76d5c2e1e9ac

Modified Files
--
doc/src/sgml/ref/create_publication.sgml | 19 ++-
1 file changed, 14 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: doc: Markup and formatting improvements

2017-03-22 Thread Peter Eisentraut
doc: Markup and formatting improvements

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/a2760915b3a88f8e1b447dd5343549a1ebbb0f78

Modified Files
--
doc/src/sgml/ref/alter_subscription.sgml  | 6 +++---
doc/src/sgml/ref/create_subscription.sgml | 7 +--
doc/src/sgml/ref/drop_subscription.sgml   | 4 ++--
3 files changed, 10 insertions(+), 7 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix wrong costing of Sort under Gather Merge.

2017-03-22 Thread Robert Haas
Fix wrong costing of Sort under Gather Merge.

There's no mechanism for such a sort to become a top-N sort, so we
should pass -1 rather than limit_tuples to cost_sort().

Rushabh Lathia, per a report from Mithun Cy

Discussion: 
http://postgr.es/m/CAGPqQf1akRcSgC9=6iwx=sepap9uvpphjlzg8_n+ouhdb6f...@mail.gmail.com

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/dc02c7bca4dccf7de278cdc6b3325a829e75b252

Modified Files
--
src/backend/optimizer/plan/planner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Support multiple RADIUS servers

2017-03-22 Thread Magnus Hagander
Support multiple RADIUS servers

This changes all the RADIUS related parameters (radiusserver,
radiussecret, radiusport, radiusidentifier) to be plural and to accept a
comma separated list of servers, which will be tried in order.

Reviewed by Adam Brightwell

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/6b76f1bb58f53aec25cfec76391270ea36ad1170

Modified Files
--
doc/src/sgml/client-auth.sgml |  26 +++--
src/backend/libpq/auth.c  | 204 +--
src/backend/libpq/hba.c   | 220 +++---
src/include/libpq/hba.h   |  12 ++-
4 files changed, 339 insertions(+), 123 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Correct erroneous comment in GetOldestXmin()

2017-03-22 Thread Simon Riggs
Correct erroneous comment in GetOldestXmin()

Craig Ringer

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/c137c68ea6bfe860c3e5f4edee7031e136ba4f0c

Modified Files
--
src/backend/storage/ipc/procarray.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Refactor GetOldestXmin() to use flags

2017-03-22 Thread Simon Riggs
Refactor GetOldestXmin() to use flags

Replace ignoreVacuum parameter with more flexible flags.

Author: Eiji Seki
Review: Haribabu Kommi

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/af4b1a0869bd3bb52e5f662e4491554b7f611489

Modified Files
--
contrib/pg_visibility/pg_visibility.c |  4 ++--
contrib/pgstattuple/pgstatapprox.c|  2 +-
src/backend/access/transam/xlog.c |  4 ++--
src/backend/catalog/index.c   |  2 +-
src/backend/commands/analyze.c|  2 +-
src/backend/commands/vacuum.c |  4 ++--
src/backend/replication/walreceiver.c |  2 +-
src/backend/storage/ipc/procarray.c   | 16 +---
src/include/storage/proc.h|  7 ++-
src/include/storage/procarray.h   | 24 +++-
10 files changed, 44 insertions(+), 23 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Assign AccessExclusiveLocks against subxacts in Hot Standby

2017-03-22 Thread Simon Riggs
Assign AccessExclusiveLocks against subxacts in Hot Standby

Previously AELs were registered against the top-level xid, which could
cause locks to be held much longer than necessary in some cases during
Hot Standby replay. We now record locks directly against their appropriate
xids. Requires few code changes because original code allowed for this
situation but didn’t fully implement it.

Discussion: CAKJS1f9vJ841HY=wonnlvbfktwgywdpn72vmxnarcgcjf3s...@mail.gmail.com

Author: Simon Riggs and David Rowley

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/49bff5300d527f28c7670cdfad9e4a1b8f5ccdea

Modified Files
--
src/backend/storage/ipc/standby.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Change logical replication pg_hba.conf use

2017-03-22 Thread Peter Eisentraut
Change logical replication pg_hba.conf use

Logical replication no longer uses the "replication" keyword.  It just
matches database entries in the normal way.  The "replication" keyword
now only applies to physical replication.

Reviewed-by: Petr Jelinek 

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/8df9bd0b445f9bd6134915d4417efde6e85e3add

Modified Files
--
doc/src/sgml/client-auth.sgml | 2 +-
doc/src/sgml/logical-replication.sgml | 8 +++-
src/backend/libpq/hba.c   | 4 ++--
3 files changed, 6 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Refine rules for altering publication owner

2017-03-22 Thread Peter Eisentraut
Refine rules for altering publication owner

Previously, the new owner had to be a superuser.  The new rules are more
refined similar to other objects.

Reviewed-by: Petr Jelinek 

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/4cfc9484d4effb0a3aa2c8742bdef0c2bc7a3ca5

Modified Files
--
doc/src/sgml/ref/alter_publication.sgml   |  7 +--
src/backend/commands/publicationcmds.c| 34 ++-
src/test/regress/expected/publication.out |  8 
src/test/regress/sql/publication.sql  |  4 
4 files changed, 41 insertions(+), 12 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Sync pg_dump and pg_dumpall output

2017-03-22 Thread Andrew Dunstan
Sync pg_dump and pg_dumpall output

Before exiting any files are fsync'ed. A --no-sync option is also
provided for a faster exit if desired.

Michael Paquier.

Reviewed by Albe Laurenz

Discussion: 
https://postgr.es/m/CAB7nPqS1uZ=ov+uruw6jr3vb-s_dlvmpc0dqpv-ftdjmm0z...@mail.gmail.com

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/96a7128b7b4c9ce4fb51df8c8b216dfab6340766

Modified Files
--
doc/src/sgml/ref/pg_dump.sgml | 14 ++
doc/src/sgml/ref/pg_dumpall.sgml  | 14 ++
src/bin/pg_dump/pg_backup.h   |  2 +-
src/bin/pg_dump/pg_backup_archiver.c  | 15 ++-
src/bin/pg_dump/pg_backup_archiver.h  |  1 +
src/bin/pg_dump/pg_backup_custom.c|  5 +
src/bin/pg_dump/pg_backup_directory.c |  8 
src/bin/pg_dump/pg_backup_tar.c   |  5 +
src/bin/pg_dump/pg_dump.c | 12 ++--
src/bin/pg_dump/pg_dumpall.c  | 15 +++
src/common/file_utils.c   | 19 +++
src/include/common/file_utils.h   |  1 +
12 files changed, 103 insertions(+), 8 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve performance of replay of AccessExclusiveLocks

2017-03-22 Thread Simon Riggs
Improve performance of replay of AccessExclusiveLocks

A hot standby replica keeps a list of Access Exclusive locks for a top
level transaction. These locks are released when the top level transaction
ends. Searching of this list is O(N^2), and each transaction had to pay the
price of searching this list for locks, even if it didn't take any AE
locks itself.

This patch optimizes this case by having the master server track which
transactions took AE locks, and passes that along to the standby server in
the commit/abort record. This allows the standby to only try to release
locks for transactions which actually took any, avoiding the majority of
the performance issue.

Refactor MyXactAccessedTempRel into MyXactFlags to allow minimal additional
cruft with this.

Analysis and initial patch by David Rowley
Author: David Rowley and Simon Riggs

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/9b013dc238cefa2860b384a3fa016ad1ceb062e4

Modified Files
--
src/backend/access/heap/heapam.c  |  4 ++--
src/backend/access/transam/twophase.c | 12 ++--
src/backend/access/transam/xact.c | 33 +
src/backend/commands/tablecmds.c  |  2 +-
src/backend/storage/ipc/standby.c |  1 +
src/include/access/xact.h | 27 ---
6 files changed, 59 insertions(+), 20 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Teach xlogreader to follow timeline switches

2017-03-22 Thread Simon Riggs
Teach xlogreader to follow timeline switches

Uses page-based mechanism to ensure we’re using the correct timeline.

Tests are included to exercise the functionality using a cold disk-level copy
of the master that's started up as a replica with slots intact, but the
intended use of the functionality is with later features.

Craig Ringer, reviewed by Simon Riggs and Andres Freund

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/1148e22a82edc96172fc78855da392b6f0015c88

Modified Files
--
src/backend/access/transam/xlogutils.c | 215 +++--
src/backend/replication/logical/logicalfuncs.c |   8 +-
src/backend/replication/walsender.c|  11 +-
src/include/access/xlogreader.h|  16 ++
src/include/access/xlogutils.h |   3 +
src/test/recovery/Makefile |   2 +
.../recovery/t/010_logical_decoding_timelines.pl   | 130 +
7 files changed, 365 insertions(+), 20 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers