]> granicus.if.org Git - postgresql/commitdiff
Downgrade subscription refresh messages to DEBUG1
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 7 Aug 2017 13:16:03 +0000 (09:16 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 7 Aug 2017 13:16:03 +0000 (09:16 -0400)
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

src/backend/commands/subscriptioncmds.c

index 87824b8fec3fe11e53012e4035dda6aaafe80b2d..318612f86735b9edd0f53e2c4f92d865db46291f 100644 (file)
@@ -572,7 +572,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data)
                        SetSubscriptionRelState(sub->oid, relid,
                                                                        copy_data ? SUBREL_STATE_INIT : SUBREL_STATE_READY,
                                                                        InvalidXLogRecPtr, false);
-                       ereport(NOTICE,
+                       ereport(DEBUG1,
                                        (errmsg("added subscription for table %s.%s",
                                                        quote_identifier(rv->schemaname),
                                                        quote_identifier(rv->relname))));
@@ -600,7 +600,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data)
                        logicalrep_worker_stop_at_commit(sub->oid, relid);
 
                        namespace = get_namespace_name(get_rel_namespace(relid));
-                       ereport(NOTICE,
+                       ereport(DEBUG1,
                                        (errmsg("removed subscription for table %s.%s",
                                                        quote_identifier(namespace),
                                                        quote_identifier(get_rel_name(relid)))));