[HACKERS] Improvement in log message of logical replication worker - Mailing list pgsql-hackers

From Masahiko Sawada
Subject [HACKERS] Improvement in log message of logical replication worker
Date
Msg-id CAD21AoBEKzQot24KhgW8_kTTi-SGLEM7Kh8EuW8Nj=v46qvSBA@mail.gmail.com
Whole thread Raw
Responses Re: [HACKERS] Improvement in log message of logical replication worker  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] Improvement in log message of logical replicationworker  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Hi,

When I created a subscription with copydata option that corresponds to
a publication that includes several tables, I got the following log
messages.

[7019] LOG:  starting logical replication worker for subscription "hoge_sub"
[7047] LOG:  logical replication apply for subscription hoge_sub started
[7047] LOG:  starting logical replication worker for subscription "hoge_sub"
[7049] LOG:  logical replication sync for subscription hoge_sub, table
pgbench_accounts started
[7047] LOG:  starting logical replication worker for subscription "hoge_sub"
[7051] LOG:  logical replication sync for subscription hoge_sub, table
pgbench_branches started
[7049] LOG:  logical replication synchronization worker finished processing
[7051] LOG:  logical replication synchronization worker finished processing
[7047] LOG:  starting logical replication worker for subscription "hoge_sub"
[7047] LOG:  starting logical replication worker for subscription "hoge_sub"
[7056] LOG:  logical replication sync for subscription hoge_sub, table
pgbench_history started
[7057] LOG:  logical replication sync for subscription hoge_sub, table
pgbench_tellers started
[7056] LOG:  logical replication synchronization worker finished processing
[7057] LOG:  logical replication synchronization worker finished processing

PID 7019 is a logical replication launcher, PID 7047 is a apply worker
and other processes are table sync worker. I set
max_sync_workers_per_subscription = 2.

I got same log messages 'starting logical replication worker for
subscription' total 5 times but actually 4 of them mean to launch
table sync worker and another one means apply worker. We cannot
distinguish them. Also, I got same log messages 'logical replication
synchronization worker finished processing' total 4 times but I think
it's better to show the table name in finish log message as well. Any
thoughts?

Attached small patch adds relid to these log messages if it's valid.
I'd like to propose it for PG10 if possible, but since It's not a bug
and not an open item we can add it to next CF.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: "Tsunakawa, Takayuki"
Date:
Subject: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts whensome errors occur
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] UPDATE of partition key