> FWIW, perhaps we can change the replication origin management so that > DROP SUBSCRIPTION doesn't drop the replication origin and the apply > worker itself removes it when exit. When an apply worker exits it > removes the replication origin if the corresponding subscription had > been removed.
I don't think this is reliable -- what if worker suddenly dies without accomplishing the job? It is enough to kill the worker during execution of (possibly long) transaction with DROP SUBSCRIPTION to meet such situation. Dropping replication origin in one transaction with DROP SUBSCRIPTION seems natural to me.