Re: [Proposal] Adding Log File Capability to pg_createsubscriber
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Gyan Sreejith <gyan.sreejith@gmail.com>
Cc: Kuroda, Hayato/黒田 隼人 <kuroda.hayato@fujitsu.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>, vignesh C <vignesh21@gmail.com>, Euler Taveira <euler@eulerto.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Peter Smith <smithpb2250@gmail.com>
Date: 2026-03-21T09:57:40Z
Lists: pgsql-hackers
On Fri, Mar 20, 2026 at 10:30 PM Gyan Sreejith <gyan.sreejith@gmail.com> wrote: > 0001: ===== * +static void pg_createsub_log(enum pg_log_level, enum pg_log_part, + const char *pg_restrict fmt,...) + pg_attribute_printf(3, 4); +pg_noreturn static void pg_fatal(const char *pg_restrict fmt,...) + pg_attribute_printf(1, 2); I see similar functions in other modules are named a bit differently. For example, see report_manifest_error(), report_backup_error(), report_fatal_error(). Then I see many other error reporting functions named similarly in code, some examples are: report_invalid_record(), report_invalid_page(), report_namespace_conflict(), and report_recovery_conflict(). Based on the above information, can we consider renaming the above functions to report_createsub_log() and report_createsub_fatal()? Other than the above point, 0001 LGTM. -- With Regards, Amit Kapila.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_createsubscriber: Don't use MAXPGPATH
- 99b726ac4894 19 (unreleased) landed
-
pg_createsubscriber: Remove separate logfile_open() function
- f5528b90b411 19 (unreleased) landed
-
pg_createsubscriber: Use logging.c log file callback
- 847336ba53af 19 (unreleased) landed
-
Add log file support to logging.c
- 41237556f8c5 19 (unreleased) landed
-
pg_createsubscriber: Add -l/--logdir option to redirect output to files.
- 6b5b7eae3ae6 19 (unreleased) landed
-
pg_createsubscriber: Introduce module-specific logging functions.
- d6628a5ea0a5 19 (unreleased) landed
-
Fix another buglet in archive_waldump.c.
- 69c57466a752 19 (unreleased) cited