repmgr: support further renamed WAL function for PostreSQL 10

pg_xlogfile_name() -> pg_walfile_name()
This commit is contained in:
Ian Barwick
2017-03-01 10:12:05 +09:00
parent 892e3b93d1
commit 90638811c8
3 changed files with 39 additions and 11 deletions

View File

@@ -3643,7 +3643,18 @@ do_standby_clone(void)
initPQExpBuffer(&tablespace_map);
}
if (start_backup(source_conn, first_wal_segment, runtime_options.fast_checkpoint) == false)
/*
* From 9.1 default is to wait for a sync standby to ack, avoid that by
* turning off sync rep for this session
*/
if (set_config_bool(source_conn, "synchronous_commit", false) == false)
{
r = ERR_BAD_CONFIG;
retval = ERR_BAD_CONFIG;
goto stop_backup;
}
if (start_backup(source_conn, first_wal_segment, runtime_options.fast_checkpoint, server_version_num) == false)
{
r = ERR_BAD_BASEBACKUP;
retval = ERR_BAD_BASEBACKUP;
@@ -3989,7 +4000,7 @@ stop_backup:
if (mode == rsync && pg_start_backup_executed)
{
log_notice(_("notifying master about backup completion...\n"));
if (stop_backup(source_conn, last_wal_segment) == false)
if (stop_backup(source_conn, last_wal_segment, server_version_num) == false)
{
r = ERR_BAD_BASEBACKUP;
retval = ERR_BAD_BASEBACKUP;