Re: duplicate logging in pg_createsubscriber - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: duplicate logging in pg_createsubscriber
Date
Msg-id aOZPIoa0vz8KCgCk@paquier.xyz
Whole thread Raw
In response to duplicate logging in pg_createsubscriber  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Wed, Oct 08, 2025 at 05:29:20PM +1100, Peter Smith wrote:
> It didn't look right to me.
>
> I found the code is doing:
> - pg_log_info("creating the replication slot unconditional inside
> create_logical_replication_slot
> - pg_log_info("create replication slot...") immediately after call to
> create_logical_replication_slot
>
> Perhaps that 2nd log was once supposed to say "created" (past tense),
> but even that seemed redundant.
>
> Here is a small patch to remove the log duplication by keeping only
> the log *within* the function.
>
> Thoughts?

Agreed.  This was bugging me a bit today while looking at some logs
generated by the TAP tests.  We don't gain any additional information
here, so let's remove the duplicates.  I'll check that later, it's
late now.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Resetting recovery target parameters in pg_createsubscriber
Next
From: David Rowley
Date:
Subject: Re: VACUUM (PARALLEL) option processing not using DefElem the way it was intended