RE: [Proposal] Adding Log File Capability to pg_createsubscriber
(unknown)
From: Kuroda, Hayato/黒田 隼人 <kuroda.hayato@fujitsu.com>
To: Gyan Sreejith <gyan.sreejith@gmail.com>, 'Amit Kapila' <amit.kapila16@gmail.com>, shveta malik <shveta.malik@gmail.com>
Cc: 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-23T09:54:59Z
Lists: pgsql-hackers
Dear Gyan,
Can you rebase the patch because 0001 is now pushed?
Also, below contains my minor comments.
01.
Found that pg_log_generic_v() has some prefix but internal_log_file_write() does not.
It means output strings are not the same. For example, on terminal:
```
pg_createsubscriber: error: standby server is running
pg_createsubscriber: hint: Stop the standby server and try again.
```
But on log file:
```
standby server is running
Stop the standby server and try again.
```
It's because pg_log_generic_v() has the format like below. I.e., the program name
is printed at the begining, and some prefix also exists in some cases.
${program name}: {error: |warning: |detail: |hint: } content
I cannot find such a difference on pg_upgrade: no prefix exists in any cases.
So, what should be here? My preference is to basically follow pg_log_generic_v()
But remove the program name. How about others?
02.
Can we check the permission of generated directory in the test?
Best regards,
Hayato Kuroda
FUJITSU LIMITED
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