The NOTICE messages about tables being added or removed during
subscription refresh would be incorrect and possibly confusing if the
transaction rolls back, so silence them but keep them available for
debugging.
Discussion: https://www.postgresql.org/message-id/CAD21AoAvaXizc2h7aiNyK_i0FQSa-tmhpdOGwbhh7Jy544Ad4Q%40mail.gmail.com
SetSubscriptionRelState(sub->oid, relid,
copy_data ? SUBREL_STATE_INIT : SUBREL_STATE_READY,
InvalidXLogRecPtr, false);
SetSubscriptionRelState(sub->oid, relid,
copy_data ? SUBREL_STATE_INIT : SUBREL_STATE_READY,
InvalidXLogRecPtr, false);
(errmsg("added subscription for table %s.%s",
quote_identifier(rv->schemaname),
quote_identifier(rv->relname))));
(errmsg("added subscription for table %s.%s",
quote_identifier(rv->schemaname),
quote_identifier(rv->relname))));
logicalrep_worker_stop_at_commit(sub->oid, relid);
namespace = get_namespace_name(get_rel_namespace(relid));
logicalrep_worker_stop_at_commit(sub->oid, relid);
namespace = get_namespace_name(get_rel_namespace(relid));
(errmsg("removed subscription for table %s.%s",
quote_identifier(namespace),
quote_identifier(get_rel_name(relid)))));
(errmsg("removed subscription for table %s.%s",
quote_identifier(namespace),
quote_identifier(get_rel_name(relid)))));