Re: [Proposal] Adding Log File Capability to pg_createsubscriber - Mailing list pgsql-hackers

From vignesh C
Subject Re: [Proposal] Adding Log File Capability to pg_createsubscriber
Date
Msg-id CALDaNm1Mj+eNVETmYAYd4ojrbTbQU5iCX20Fso24r2VuXF69AQ@mail.gmail.com
Whole thread Raw
In response to Re: [Proposal] Adding Log File Capability to pg_createsubscriber  (Gyan Sreejith <gyan.sreejith@gmail.com>)
Responses Re: [Proposal] Adding Log File Capability to pg_createsubscriber
List pgsql-hackers
On Tue, 20 Jan 2026 at 06:28, Gyan Sreejith <gyan.sreejith@gmail.com> wrote:
>
> Thank you for all your input. I have attached the latest version of the patch that includes the changes proposed by
Vigneshand Amit. Please let me know if you have any questions or suggestions.
 

1)  Currently you are creating directories like
specifiedlogdir_timestamp for each run, so it generates log
directories like:
logdir_2026-01-20-18-15-55.267510
logdir_2026-01-20-18-16-49.468882

Instead can you change it to specifiedlogdir/exec_timestamp1.
specifiedlogdir/exec_timestamp2, etc

+                               populate_timestamp(timestamp,
sizeof(timestamp));
+                               log_dir = psprintf("%s_%s", optarg, timestamp);
+                               opt.log_dir = pg_strdup(log_dir);
+                               canonicalize_path(opt.log_dir);
+
+                               if (stat(opt.log_dir, &statbuf) != 0)
+                               {
+                                       if (errno == ENOENT)
+                                       {
+                                               mkdir(opt.log_dir, S_IRWXU);


2) Your patch is based on a slightly older code, it does not apply on
HEAD, Kindly rebase your patch on top of HEAD,

Regards,
Vignesh



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Patch: dumping tables data in multiple chunks in pg_dump
Next
From: vignesh C
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication