From 49ca0b2fb21252ceed7ff8bc91bbd8cf33ab7909 Mon Sep 17 00:00:00 2001 From: Hayato Kuroda Date: Thu, 22 Feb 2024 11:07:22 +0000 Subject: [PATCH v24 17/18] Address comments From Vignesh #3 --- src/bin/pg_basebackup/pg_createsubscriber.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index 86e277b339..63b76bda12 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -766,7 +766,7 @@ check_publisher(LogicalRepInfo *dbinfo) if (primary_slot_name) { appendPQExpBuffer(str, - "SELECT 1 FROM pg_replication_slots " + "SELECT 1 FROM pg_catalog.pg_replication_slots " "WHERE active AND slot_name = '%s'", primary_slot_name); @@ -940,7 +940,7 @@ check_subscriber(LogicalRepInfo *dbinfo) *------------------------------------------------------------------------ */ res = PQexec(conn, - "SELECT setting FROM pg_settings WHERE name IN (" + "SELECT setting FROM pg_catalog.pg_settings WHERE name IN (" "'max_logical_replication_workers', " "'max_replication_slots', " "'max_worker_processes', " @@ -2015,6 +2015,7 @@ main(int argc, char **argv) if (conn != NULL) { drop_replication_slot(conn, &dbinfo[0], primary_slot_name); + disconnect_database(conn); } else { @@ -2022,7 +2023,6 @@ main(int argc, char **argv) primary_slot_name); pg_log_warning_hint("Drop this replication slot soon to avoid retention of WAL files."); } - disconnect_database(conn); } /* Stop the subscriber */ -- 2.43.0