Re: Function to promote standby servers
Ian Barwick <ian@2ndquadrant.com>
From: Ian Barwick <ian@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>,
Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-10-26T02:36:00Z
Lists: pgsql-hackers
Attachments
- doc-pg-promote.patch (text/x-patch) patch
Hi On 10/25/2018 09:47 AM, Michael Paquier wrote: > And committed. I double-checked the code, and tweaked a bit the tests > so as the test using wait_mode = false is removed as it did not seem > worth the extra cycles. I also added a check on the return value of > pg_promote when using the wait mode. Another thing was that the > function needs to be parallel-restricted. Documentation for this [*] says "Returns true if promotion is successful and false otherwise", which is not correct if "wait" is false, as it will always return TRUE. [*] https://www.postgresql.org/docs/devel/static/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL Attached patch contains a suggested rewording to clarify this. Regards Ian Barwick -- Ian Barwick http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Rework documentation of pg_promote
- 74171f8c12e6 12.0 landed
-
Add pg_promote function
- 10074651e335 12.0 landed