Add pg_promote function

Enterprise / PostgreSQL - Michael Paquier [paquier.xyz] - 25 October 2018 00:46 EDT

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

10074651e3 Add pg_promote function
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(-)

Upstream: git.postgresql.org


  • Share