switchover: check for pending archive files on the demotion candidate

If the current primary (demotion candidate) still has any files to archive,
it will delay the shutdown until all files are archived. If there is a
substantial number of files, and/or the archive command executes slowly,
this will probably lead to an unwelcome delay in the switchover process.
This commit is contained in:
Ian Barwick
2017-08-08 00:37:20 +09:00
parent 068ecc963d
commit 2499b42ef8
12 changed files with 543 additions and 67 deletions

View File

@@ -8,6 +8,8 @@
extern void do_node_status(void);
extern void do_node_check(void);
extern bool do_node_check_archiver(PGconn *conn, OutputMode mode, PQExpBufferData *output);
extern void do_node_archive_config(void);
extern void do_node_restore_config(void);
extern void do_node_service(void);