diff --git a/src/bin/pg_basebackup/pg_createsubscriber.c b/src/bin/pg_basebackup/pg_createsubscriber.c index d1677f5..01328ed 100644 --- a/src/bin/pg_basebackup/pg_createsubscriber.c +++ b/src/bin/pg_basebackup/pg_createsubscriber.c @@ -1772,12 +1772,6 @@ drop_publication(PGconn *conn, const char *pubname, const char *dbname, * after promotion. If --clean=publications is specified, drop all existing * publications in the subscriber database. Otherwise, only drop publications * that were created by pg_createsubscriber during this operation. - * - * In dry-run mode, create_publication() and drop_publication() only log actions - * without modifying the database. Importantly, since no publication is actually - * created in dry-run, the query for existing publications won't include the - * "would-be" made publication. Thus, we must call drop_publication() for it - * regardless of drop_all_pubs to ensure the user sees the intended log message. */ static void check_and_drop_publications(PGconn *conn, struct LogicalRepInfo *dbinfo) @@ -1811,10 +1805,14 @@ check_and_drop_publications(PGconn *conn, struct LogicalRepInfo *dbinfo) } /* - * Handle the publication created (or would-be created) by - * pg_createsubscriber. In dry-run mode, enter this block regardless of - * drop_all_pubs to log the drop action for the made publication (which - * isn't actually present). + * Handle publication created by pg_createsubscriber. + * + * In dry-run mode, create_publication() and drop_publication() only log + * actions without modifying the database. Importantly, since no + * publication is actually created in dry-run, the above query + * for existing publications won't find the "would-be" made publication. + * Thus, we must call drop_publication() regardless of drop_all_pubs + * to ensure the user sees the intended log message. */ if (!drop_all_pubs || dry_run) {