Re: Add support for specifying tables in pg_createsubscriber. - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Add support for specifying tables in pg_createsubscriber.
Date
Msg-id CAHut+PsYKXKmMSim5FcFo177gosY7a5xgMH_p4AY1_25HMVL7Q@mail.gmail.com
Whole thread Raw
In response to Re: Add support for specifying tables in pg_createsubscriber.  (Shubham Khanna <khannashubham1197@gmail.com>)
List pgsql-hackers
Hi Shubham,

Another review comment about patch v14...

While reviewing pg_createsubscriber logs, I was surprised to see some
almost duplicate consecutive logs for the pub/slot creation. e.g.
----------
pg_createsubscriber: creating publication "pub2" in database "db2"
pg_createsubscriber: create publication "pub2" in database "db2"
----------

I found the code is doing:
- pg_log_info("creating publication...") unconditionally inside
create_publication
- pg_log_info("create publication...") immediately after call to
create_publication

(patch fragment)
+ create_publication(conn, &dbinfo[i]);
+ pg_log_info("create publication \"%s\" in database \"%s\"",
+ dbinfo[i].pubname, dbinfo[i].dbname);

I think the logging *after* the call is redundant and should be removed.

======
Kind Regards,
Peter Smith.
Fujitsu Australia



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Add support for specifying tables in pg_createsubscriber.
Next
From: Peter Smith
Date:
Subject: duplicate logging in pg_createsubscriber