From 62c29aab322c57be3acd9f91b8f4a77f89626a55 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Mon, 9 Apr 2018 14:35:54 +0900 Subject: [PATCH] Don't issue a CHECKPOINT after promoting a standby. Issuing a CHECKPOINT immediately after promoting a standby may impact performance. Commit 239a548e9d5da326401ec5a00ed9c0c837d21d3c ensures one is only issued when required, i.e. during a switchover when pg_rewind will be executed. This reverts commit a2068768ab3847e71b41e4171f2426eac19e61b8. --- repmgr-action-standby.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index 258129cb..b2e166bb 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -2043,13 +2043,6 @@ _do_standby_promote_internal(PGconn *conn, const char *data_dir) log_verbose(LOG_INFO, _("standby promoted to primary after %i second(s)"), i); - /* - * Execute a CHECKPOINT as soon as possible after promotion. The primary - * reason for this is to ensure that "pg_control" has the latest timeline - * before it's read by "pg_rewind", typically during a switchover operation. - */ - checkpoint(conn); - /* update node information to reflect new status */ if (update_node_record_set_primary(conn, config_file_options.node_id) == false) {