]> granicus.if.org Git - postgresql/commitdiff
Restore behavior for replication origin drop
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 1 Sep 2017 14:30:02 +0000 (16:30 +0200)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 1 Sep 2017 14:30:02 +0000 (16:30 +0200)
Do for replication origins what the previous commit did for replication
slots: restore the original behavior of replication origin drop to raise
an error rather than blocking, because users might be depending on the
original behavior.  Maintain the blocking behavior when invoked
internally from logical replication subscription handling.

Discussion: https://postgr.es/m/20170830133922.tlpo3lgfejm4n2cs@alvherre.pgsql

src/backend/replication/logical/origin.c

index 14cb3d0bf235228337a1d482db7a436724495b79..edc6efb8a6a1a16fef47f9d6ededa5c8048fbd1a 100644 (file)
@@ -1205,7 +1205,7 @@ pg_replication_origin_drop(PG_FUNCTION_ARGS)
        roident = replorigin_by_name(name, false);
        Assert(OidIsValid(roident));
 
-       replorigin_drop(roident, false);
+       replorigin_drop(roident, true);
 
        pfree(name);