1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Revert "pg_createsubscriber: Add log message when no publications exist to drop."

This reverts commit 74ac377d75.

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
This commit is contained in:
Masahiko Sawada
2025-10-14 17:36:11 -07:00
parent 3e4705484e
commit 45a7faf130

View File

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