pgsql: List wait events in alphabetical order in documentation

2018-10-24 Thread Michael Paquier
List wait events in alphabetical order in documentation

Keeping all those entries in order helps the user looking at the
documentation in finding them.

Author: Michael Paquier, Kuntal Ghosh
Discussion: https://postgr.es/m/[email protected]

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/374fe86a8fdd543a7eb11c68ac8c19eff29640d3

Modified Files
--
doc/src/sgml/monitoring.sgml | 24 
1 file changed, 12 insertions(+), 12 deletions(-)



pgsql: List wait events in alphabetical order in documentation

2018-10-24 Thread Michael Paquier
List wait events in alphabetical order in documentation

Keeping all those entries in order helps the user looking at the
documentation in finding them.

Author: Michael Paquier, Kuntal Ghosh
Discussion: https://postgr.es/m/[email protected]

Branch
--
REL_10_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/aa9642acb96b253f80c940f7b6bce38c7cca2c0f

Modified Files
--
doc/src/sgml/monitoring.sgml | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)



pgsql: List wait events in alphabetical order

2018-10-24 Thread Michael Paquier
List wait events in alphabetical order

This changes the documentation, and the related structures so as
everything is consistent.

Some wait events were not listed alphabetically since their
introduction, others have been added rather randomly.  Keeping all those
entries in order helps in maintenance, and helps the user looking at the
documentation.

Author: Michael Paquier, Kuntal Ghosh
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 10, only for the documentation part to avoid an ABI
breakage.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/5ef037cf0b9e130120c5a788f1f1048f6242b076

Modified Files
--
doc/src/sgml/monitoring.sgml| 24 
src/backend/postmaster/pgstat.c | 18 +-
src/include/pgstat.h| 12 ++--
3 files changed, 27 insertions(+), 27 deletions(-)



pgsql: Correctly set t_self for heap tuples in expand_tuple

2018-10-24 Thread Andrew Dunstan
Correctly set t_self for heap tuples in expand_tuple

Commit 16828d5c0 incorrectly set an invalid pointer for t_self for heap
tuples. This patch correctly copies it from the source tuple, and
includes a regression test that relies on it being set correctly.

Backpatch to release 11.

Fixes bug #15448 reported by Tillmann Schulz

Diagnosis and test case by Amit Langote

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/040a1df6149f852c3b8de96d9d13258af8a39e23

Modified Files
--
src/backend/access/common/heaptuple.c  |  2 +-
src/test/regress/expected/fast_default.out | 10 ++
src/test/regress/sql/fast_default.sql  | 12 
3 files changed, 23 insertions(+), 1 deletion(-)



pgsql: Correctly set t_self for heap tuples in expand_tuple

2018-10-24 Thread Andrew Dunstan
Correctly set t_self for heap tuples in expand_tuple

Commit 16828d5c0 incorrectly set an invalid pointer for t_self for heap
tuples. This patch correctly copies it from the source tuple, and
includes a regression test that relies on it being set correctly.

Backpatch to release 11.

Fixes bug #15448 reported by Tillmann Schulz

Diagnosis and test case by Amit Langote

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/372102b81dd0096764b712deffab00732f3c9d80

Modified Files
--
src/backend/access/common/heaptuple.c  |  2 +-
src/test/regress/expected/fast_default.out | 10 ++
src/test/regress/sql/fast_default.sql  | 12 
3 files changed, 23 insertions(+), 1 deletion(-)



pgsql: Fix typo in regression test comment

2018-10-24 Thread Andrew Dunstan
Fix typo in regression test comment

per Michael Banck

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/4beea5508e80a65a90f3fa857ea34ec71b9d6db2

Modified Files
--
src/test/regress/expected/fast_default.out | 2 +-
src/test/regress/sql/fast_default.sql  | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Fix typo in regression test comment

2018-10-24 Thread Andrew Dunstan
Fix typo in regression test comment

per Michael Banck

Branch
--
REL_11_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/ef4583238b9ceaca728a27aea711a5f467dc49d5

Modified Files
--
src/test/regress/expected/fast_default.out | 2 +-
src/test/regress/sql/fast_default.sql  | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)



pgsql: Improve unconstify() documentation

2018-10-24 Thread Peter Eisentraut
Improve unconstify() documentation

Refer to expression instead of variable when appropriate.

Discussion: 
https://www.postgresql.org/message-id/08adbe4e-38f8-2c73-55f0-591392371687%402ndquadrant.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/f2898de98a5407a8b78f49866ef4931813505ca2

Modified Files
--
src/include/c.h | 16 
1 file changed, 8 insertions(+), 8 deletions(-)



pgsql: Apply unconstify() in more places

2018-10-24 Thread Peter Eisentraut
Apply unconstify() in more places

Discussion: 
https://www.postgresql.org/message-id/08adbe4e-38f8-2c73-55f0-591392371687%402ndquadrant.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/0a8590b2a09e7a9e10612bc38d5e872b0c234eca

Modified Files
--
src/backend/utils/adt/json.c| 4 ++--
src/backend/utils/adt/misc.c| 2 +-
src/backend/utils/adt/varlena.c | 4 ++--
src/port/win32setlocale.c   | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)



pgsql: Add pg_promote function

2018-10-24 Thread Michael Paquier
Add pg_promote function

This function is able to promote a standby with this new SQL-callable
function.  Execution access can be granted to non-superusers so that
failover tools can observe the principle of least privilege.

Catalog version is bumped.

Author: Laurenz Albe
Reviewed-by: Michael Paquier, Masahiko Sawada
Discussion: 
https://postgr.es/m/[email protected]

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/10074651e3355e2405015f6253602be8344bc829

Modified Files
--
doc/src/sgml/func.sgml | 19 
doc/src/sgml/high-availability.sgml| 19 
doc/src/sgml/monitoring.sgml   |  6 ++-
doc/src/sgml/recovery-config.sgml  |  3 +-
src/backend/access/transam/xlog.c  |  6 ---
src/backend/access/transam/xlogfuncs.c | 77 ++
src/backend/catalog/system_views.sql   |  6 +++
src/backend/postmaster/pgstat.c|  3 ++
src/include/access/xlog.h  |  6 +++
src/include/catalog/catversion.h   |  2 +-
src/include/catalog/pg_proc.dat|  4 ++
src/include/pgstat.h   |  1 +
src/test/recovery/t/004_timeline_switch.pl | 11 +++--
13 files changed, 143 insertions(+), 20 deletions(-)