| From: | Gyan Sreejith <gyan(dot)sreejith(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Cc: | vignesh C <vignesh21(at)gmail(dot)com> |
| Subject: | [Proposal] Adding Log File Capability to pg_createsubscriber |
| Date: | 2025-12-09 22:16:40 |
| Message-ID: | CAEqnbaUthOQARV1dscGvB_EsqC-YfxiM6rWkVDHc+G+f4oSUHw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Background:
-
pg_createsubscriber currently outputs all messages (internal validation
messages, standby server start/stop logs, recovery progress output, and
output from utilities) directly to the console. As a result, users may find
debugging and handling errors difficult. It would be more convenient if
messages were separated and stored in different log files. There is already
a similar implementation in pg_upgrade.
Proposed Solution:
-
Based on issues mentioned previously, I would like to propose a new
argument -l <logdir> which can be specified for pg_createsubscriber. Using
it would create the following log files:
-
logdir/pg_createsubscriber_server.log which captures all logs related
to starting and stopping the standby server.
-
logdir/pg_createsubscriber_resetwal.log which captures the output of
pg_resetwal
-
logdir/pg_createsubscriber_internal.log which captures internal
diagnostic output from pg_createsubscriber (validations, checks, etc.)
Overall, this proposed solution could make the pg_createsubscriber command
output messages more organized. The command would be easier to use as users
will only have to read individual log files rather than parse through lots
of possibly irrelevant output messages. I have attached the patch for this
change.
Special thanks to Vignesh C. for his offlist guidance on this project.
Regards, Gyan Sreejith
| Attachment | Content-Type | Size |
|---|---|---|
| diff.patch | application/octet-stream | 7.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nico Williams | 2025-12-09 22:22:18 | Re: Solaris versus our NLS files |
| Previous Message | Manni Wood | 2025-12-09 22:13:02 | Re: Speed up COPY FROM text/CSV parsing using SIMD |