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

From Masahiko Sawada
Subject Re: [HACKERS] Improvement in log message of logical replication worker
Date
Msg-id CAD21AoB8Ob_hALNbQ=b8ygy56bM8n_c=i8qoQR61kjB=9eRq_g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Improvement in log message of logical replicationworker  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] Improvement in log message of logical replication worker  (Noah Misch <noah@leadboat.com>)
Re: [HACKERS] Improvement in log message of logical replicationworker  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Thu, May 18, 2017 at 11:29 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> On 5/12/17 00:30, Masahiko Sawada wrote:
>> 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?
>
> Yeah, that's quite a lot of messages for normal operation.  I've been
> playing around with it a little bit and came up with the attached patch
> that produced a slightly reduced log volume and more consistent messages.
>
> I think we don't need a message from the launcher that it will launch a
> worker and then the worker also reporting that it started, so I
> downgraded the former to DEBUG1.

Agreed. Autovacuum launcher also doesn't emit such log message.

> A more radical solution would be to
> downgrade all these messages to DEBUG1.
>
> We want to avoid showing OIDs in user-facing messages, but it's not
> always easy to look up the names.  See the patch for one solution.
>

The patch looks good to me.
There are some log messages saying just 'logical replication worker
for subscription ...' in reread_subscription but should we add 'apply'
to these messages in order for user to distinguish between apply
worker and table sync worker?

Regards,

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



pgsql-hackers by date:

Previous
From: "Tsunakawa, Takayuki"
Date:
Subject: Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur
Next
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] Improvement in log message of logical replication worker