From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | duplicate logging in pg_createsubscriber |
Date: | 2025-10-08 06:29:20 |
Message-ID: | CAHut+Pv7qDvLbDgc9PQGhULT3rPXTxdu_=w+iW-kMs+zPADR+w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
While reviewing pg_createsubscriber logs (in another thread) I saw
some unexpected (almost) duplicate consecutive logs for the slot
creation in --dry-run mode.
e.g.
----------
pg_createsubscriber: creating the replication slot
"pg_createsubscriber_16386_e9a70df3" in database "db2"
pg_createsubscriber: create replication slot
"pg_createsubscriber_16386_e9a70df3" on publisher
----------
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?
======
Kind Regards,
Peter Smith.
Fujitsu Asutralia
Attachment | Content-Type | Size |
---|---|---|
v1-0001-remove-duplicate-logging-for-slot-creation.patch | application/octet-stream | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | shveta malik | 2025-10-08 06:37:04 | Re: Logical Replication of sequences |
Previous Message | Peter Smith | 2025-10-08 06:05:14 | Re: Add support for specifying tables in pg_createsubscriber. |