Re: [Proposal] Adding Log File Capability to pg_createsubscriber - Mailing list pgsql-hackers

From Gyan Sreejith
Subject Re: [Proposal] Adding Log File Capability to pg_createsubscriber
Date
Msg-id CAEqnbaU50vLy031AbvmfXJ3_qv9iS4pVaMdmsnmpF87r=EqW7Q@mail.gmail.com
Whole thread
In response to Re: [Proposal] Adding Log File Capability to pg_createsubscriber  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [Proposal] Adding Log File Capability to pg_createsubscriber
List pgsql-hackers
On Thu, Mar 5, 2026 at 9:49 AM Euler Taveira <euler@eulerto.com> wrote:

Don't duplicate code. If you are reusing a function, my advice is to move it to
src/common. You can always use "ifdef FRONTEND" to use the appropriate log
message (elog/ereport vs pg_error, for example).

I have made all the changes except for this one, and I am deferring to Amit Kapila regarding the marks.
Regarding duplicating code - I was trying to keep the change contained. Is it okay to make that change in a separate check in since it would also touch src/backend/postmaster/syslogger.c?

Thank you!
Gyan Sreejith


On Fri, Mar 6, 2026 at 5:51 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
On Thu, Mar 5, 2026 at 8:19 PM Euler Taveira <euler@eulerto.com> wrote:
>
> One of the arguments to have this feature was that pg_createsubscriber mixes the
> server and tool messages. Couldn't we fix it adding "marks" on the output saying
> the server log messages starts here and the server log messages ends here?
>

It will simplify the output to some extent but still it will be mixed
at different intervals in the LOG which is not good for grepping
required info. Also, I am not sure if we use such markers at other
places.

--
With Regards,
Amit Kapila.
Attachment

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Add starelid, attnum to pg_stats and leverage this in pg_dump
Next
From: Sami Imseih
Date:
Subject: Re: Add missing stats_reset column to pg_stat_database_conflicts view