From 756f2763b3deff128b60ad52708c1285df2e0aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Marqu=C3=A9s?= Date: Thu, 17 Oct 2024 07:33:44 +0000 Subject: [PATCH] Fix wrong reference to connection from commit f69485c0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit f69485c0 introduced a change in how we check if the repmgr user can run checkpoints on PG15 and newer. There was a regression in the messages where the conn passed was not declared. That is because the pointer we were using was called local_conn instead of conn. Signed-off-by: Martín Marqués Co-authored-by: Mario Gonzalez --- repmgr-action-standby.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index c222c7f8..2aa46868 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -5299,7 +5299,7 @@ do_standby_switchover(void) { log_warning(_("no authorized connection available, unable to issue CHECKPOINT")); - if (PQserverVersion(conn) >= 150000) + if (PQserverVersion(local_conn) >= 150000) { log_hint(_("provide a superuser with -S/--superuser or grant pg_checkpoint role to repmgr user")); }