summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2025-10-14 17:36:11 -0700
committerMasahiko Sawada <msawada@postgresql.org>2025-10-14 17:36:11 -0700
commit45a7faf130176ae7c152413967c7c90068476a94 (patch)
tree6106d9ab942ea7e423c96789c8e59732be0bda35
parent3e4705484e0c64c7e90d5cc697a9aaf474287d0d (diff)
Revert "pg_createsubscriber: Add log message when no publications exist to drop."
This reverts commit 74ac377d75135e02064fc4427bec401277b4f60c. The previous change contained a misconception about how publications are cleaned up on the subscriber. The newly added log message could confuse users, particularly when running pg_createsubscriber with --dry-run - users would see a "dropping publication" message immediately followed by a "no publications found" message. Discussion: https://postgr.es/m/CAHut+Pu7xz1LqNvyQyvSHrV0Sw6D=e6T-Jm=gh1MRJrkuWGyBQ@mail.gmail.com
-rw-r--r--src/bin/pg_basebackup/pg_createsubscriber.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c
index b33566eabac..d29407413d9 100644
--- a/src/bin/pg_basebackup/pg_createsubscriber.c
+++ b/src/bin/pg_basebackup/pg_createsubscriber.c
@@ -1755,15 +1755,10 @@ check_and_drop_publications(PGconn *conn, struct LogicalRepInfo *dbinfo)
disconnect_database(conn, true);
}
- if (PQntuples(res) > 0)
- {
- /* Drop each publication */
- for (int i = 0; i < PQntuples(res); i++)
- drop_publication(conn, PQgetvalue(res, i, 0), dbinfo->dbname,
- &dbinfo->made_publication);
- }
- else
- pg_log_info("no publications found");
+ /* Drop each publication */
+ for (int i = 0; i < PQntuples(res); i++)
+ drop_publication(conn, PQgetvalue(res, i, 0), dbinfo->dbname,
+ &dbinfo->made_publication);
PQclear(res);
}