aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/worker.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-05-24 18:56:21 -0400
committerPeter Eisentraut <peter_e@gmx.net>2017-05-24 18:57:56 -0400
commit92ecb148e517704ec945dce513db71fee7790cfd (patch)
treef955f56a5ccfba9bd15a4d9d94622ea4073b86c9 /src/backend/replication/logical/worker.c
parent85c2b9a15a1d667b1e2cd580da8c1d9fef0af1e8 (diff)
downloadpostgresql-92ecb148e517704ec945dce513db71fee7790cfd.tar.gz
postgresql-92ecb148e517704ec945dce513db71fee7790cfd.zip
Improve logical replication worker log messages
Reduce some redundant messages to DEBUG1. Be clearer about the distinction between apply workers and table synchronization workers. Add subscription and table name where possible. Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Diffstat (limited to 'src/backend/replication/logical/worker.c')
-rw-r--r--src/backend/replication/logical/worker.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 7d1787db5cb..c67720bd2fd 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -1325,7 +1325,7 @@ reread_subscription(void)
if (!newsub)
{
ereport(LOG,
- (errmsg("logical replication worker for subscription \"%s\" will "
+ (errmsg("logical replication apply worker for subscription \"%s\" will "
"stop because the subscription was removed",
MySubscription->name)));
@@ -1340,7 +1340,7 @@ reread_subscription(void)
if (!newsub->enabled)
{
ereport(LOG,
- (errmsg("logical replication worker for subscription \"%s\" will "
+ (errmsg("logical replication apply worker for subscription \"%s\" will "
"stop because the subscription was disabled",
MySubscription->name)));
@@ -1355,7 +1355,7 @@ reread_subscription(void)
if (strcmp(newsub->conninfo, MySubscription->conninfo) != 0)
{
ereport(LOG,
- (errmsg("logical replication worker for subscription \"%s\" will "
+ (errmsg("logical replication apply worker for subscription \"%s\" will "
"restart because the connection information was changed",
MySubscription->name)));
@@ -1370,7 +1370,7 @@ reread_subscription(void)
if (strcmp(newsub->name, MySubscription->name) != 0)
{
ereport(LOG,
- (errmsg("logical replication worker for subscription \"%s\" will "
+ (errmsg("logical replication apply worker for subscription \"%s\" will "
"restart because subscription was renamed",
MySubscription->name)));
@@ -1388,7 +1388,7 @@ reread_subscription(void)
if (strcmp(newsub->slotname, MySubscription->slotname) != 0)
{
ereport(LOG,
- (errmsg("logical replication worker for subscription \"%s\" will "
+ (errmsg("logical replication apply worker for subscription \"%s\" will "
"restart because the replication slot name was changed",
MySubscription->name)));
@@ -1403,7 +1403,7 @@ reread_subscription(void)
if (!equal(newsub->publications, MySubscription->publications))
{
ereport(LOG,
- (errmsg("logical replication worker for subscription \"%s\" will "
+ (errmsg("logical replication apply worker for subscription \"%s\" will "
"restart because subscription's publications were changed",
MySubscription->name)));
@@ -1503,7 +1503,7 @@ ApplyWorkerMain(Datum main_arg)
if (!MySubscription->enabled)
{
ereport(LOG,
- (errmsg("logical replication worker for subscription \"%s\" will not "
+ (errmsg("logical replication apply worker for subscription \"%s\" will not "
"start because the subscription was disabled during startup",
MySubscription->name)));
@@ -1516,11 +1516,13 @@ ApplyWorkerMain(Datum main_arg)
(Datum) 0);
if (am_tablesync_worker())
- elog(LOG, "logical replication sync for subscription %s, table %s started",
- MySubscription->name, get_rel_name(MyLogicalRepWorker->relid));
+ ereport(LOG,
+ (errmsg("logical replication table synchronization worker for subscription \"%s\", table \"%s\" has started",
+ MySubscription->name, get_rel_name(MyLogicalRepWorker->relid))));
else
- elog(LOG, "logical replication apply for subscription %s started",
- MySubscription->name);
+ ereport(LOG,
+ (errmsg("logical replication apply worker for subscription \"%s\" has started",
+ MySubscription->name)));
CommitTransactionCommand();