diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 83e6eae855f..3842a4fd445 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -1579,15 +1579,9 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel) /* * Tell the cumulative stats system that the subscription is getting - * dropped. We can safely report dropping the subscription statistics here - * if the subscription is associated with a replication slot since we - * cannot run DROP SUBSCRIPTION inside a transaction block. Subscription - * statistics will be removed later by (auto)vacuum either if it's not - * associated with a replication slot or if the message for dropping the - * subscription gets lost. + * dropped. */ - if (slotname) - pgstat_drop_subscription(subid); + pgstat_drop_subscription(subid); table_close(rel, NoLock); }