| From: | Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com> |
|---|---|
| To: | Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com>, 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, Gyan Sreejith <gyan(dot)sreejith(at)gmail(dot)com> |
| Cc: | Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Smith <smithpb2250(at)gmail(dot)com> |
| Subject: | RE: [Proposal] Adding Log File Capability to pg_createsubscriber |
| Date: | 2026-03-19 11:55:00 |
| Message-ID: | OSOPR01MB1215385EAC6A76650444E40B0F54FA@OSOPR01MB12153.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
While checking again, I found an issue in the new logging function - same va_list
is used twice, but it was the undefined behavior. va_copy() is used to fix the issue.
Also, below points were found and fixed in 0003. Thanks Peter Smith to work on.
```
+ printf(_(" -l, --logdir=LOGDIR location for the new log directory\n"));
```
But there is a possibility that existing directory is specified, right?
```
+my $logdir = PostgreSQL::Test::Utils::tempdir + "/logdir";
```
Isn't it enough to just use tempdir here? At least, I think using "+" is not
appropriate, "." is used to connect strings.
```
+ if (opt->log_dir != NULL)
+ appendPQExpBuffer(pg_ctl_cmd, " -l %s/%s/%s.log", opt->log_dir, log_timestamp, SERVER_LOG_FILE_NAME);
```
I do not have 100% confident, but do we have to quote the logfile here?
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| Attachment | Content-Type | Size |
|---|---|---|
| v12-0001-pg_createsubscriber-use-own-reporting-functions.patch | application/octet-stream | 55.1 KB |
| v12-0002-Add-a-new-argument-l-logdir-to-pg_createsubscrib.patch | application/octet-stream | 15.6 KB |
| v12-0003-Address-comments-from-Hayato-Kuroda.patch | application/octet-stream | 8.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chengxi Sun | 2026-03-19 12:12:17 | Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions |
| Previous Message | David Rowley | 2026-03-19 11:44:25 | Re: another autovacuum scheduling thread |