| From: | Gyan Sreejith <gyan(dot)sreejith(at)gmail(dot)com> |
|---|---|
| To: | Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, 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 18:29:38 |
| Message-ID: | CAEqnbaU=EgqhxEx0ig4TdY8pdt0Vn+vmCJBuoORRHOzovW9dWA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Thank you, Kuroda-san, for all the work.
I have made a small change - I added a pg_free() to free internal_log_file.
Regards,
Gyan
On Thu, Mar 19, 2026 at 7:55 AM Kuroda, Hayato/黒田 隼人 <
kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> 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 |
|---|---|---|
| v13-0003-Address-comments-from-Hayato-Kuroda.patch | application/octet-stream | 8.5 KB |
| v13-0002-Add-a-new-argument-l-logdir-to-pg_createsubscrib.patch | application/octet-stream | 15.6 KB |
| v13-0001-pg_createsubscriber-use-own-reporting-functions.patch | application/octet-stream | 55.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2026-03-19 18:34:22 | pg_get__*_ddl consolidation |
| Previous Message | Jianghua Yang | 2026-03-19 18:28:49 | Re: [PATCH] Fix fd leak in pg_dump compression backends when dup()+fdopen() fails |