Fix wrong reference to connection from commit f69485c0

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 <martin.marques@enterprisedb.com>
Co-authored-by: Mario Gonzalez <mario.gonzalez@enterprisedb.com>
This commit is contained in:
Martín Marqués
2024-10-17 07:33:44 +00:00
committed by Mario Gonzalez
parent b92d43d136
commit 8f27e3bc5d

View File

@@ -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"));
}