Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viBGY-00HZvU-1j for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 12:55:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viBGX-001Dji-1x for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 12:55:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viBGX-001Dja-0z for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 12:55:25 +0000 Received: from mail-yx1-xb136.google.com ([2607:f8b0:4864:20::b136]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1viBGV-001QAy-0d for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 12:55:24 +0000 Received: by mail-yx1-xb136.google.com with SMTP id 956f58d0204a3-6420c08f886so7000237d50.3 for ; Tue, 20 Jan 2026 04:55:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768913723; cv=none; d=google.com; s=arc-20240605; b=cBJI4kucn2ASd8/DCINhkKko60/Q9wMBd2D0aWzvFVVSz1OuwWxV5+Hs1fPq0oyb/v 1NWaokjwNiV5facc9rXpeqWL4ILF+B2DiH5Kzm1Adz/wmTlTuvZhscc8BW4vJyOmE3WZ uyEgsLdTUauM9YCPBx/xIGdgq3uPOp68d6GMPqMtyR9JNXWVXr9sGH60OuaE+DntIacs VmhIcX6QKhUjz4Ox0nZiiPom3hyZv/mEmkh+RO9tf06IbQPGIZFUT8q5EmygiO5bqOKU 2fdSUqNVqzY1wLQFZlUB8MVQTR1Cz8o3wGMphi8x+dGaD5jCzSxXszly1jxVfjmGvmIu oViw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=kTfFB12k8fBYr6K+6fgxz6ANC3NN7d1pDwlK6xOZT2I=; fh=WImplRPc0Nmic7uzwmP06aNZsBk0jZD/Y1eGS1/HAec=; b=AyWPdGwgP/+eHsd1/HtNcCy/py+LX0UQEVNRHy63V5J3Nla6lE9l+IaEdt593ZlJEy cwh0udN6S36HkOZqumyMHdcAoG3b+3V0og/TsXNzjd5ZKaO3oqi2yviAHxrTMn8f6IgU Cn1ip3YBJKamC5GI0OcMtMaSWzddRdMOB2734aPTsg420WkdrJEyN/tuEI+fhwCNWN03 Gs+WuLEEdk7L4K6vawAQ3zZToQ4rTcBaSkbsrPRbG7j35HjetKF9Gu7p8Dbz/yNSi8Z7 R0S5B2UUchsWMfju4s4HGRowMm0P79clYGLZ88BwAN2Emnhe1gljrEYjVuqL4Qfm0umc 6j6g==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768913723; x=1769518523; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kTfFB12k8fBYr6K+6fgxz6ANC3NN7d1pDwlK6xOZT2I=; b=S1SQxUd0in8tlWf09o89eiLcdqodHqwDhQtgOvS1nSNfTok6coFTE6d+ZgvXR87kxW Gmqrbg9EdRbd8dPwdTtkxhfkbEUWFbzzycHE0DEPj4M0rwJfjzJAcgyRiCgRulMGRKQS rFreLrKPXiP3zszaIeXsxI8fu39aA/sV5+XM5RifgefrJM3M+b1fGQN8MJJKE1gFPvAr ojoVhbOeDrPMb70g5LCNutYU++aSDoyOA9mHwTMDDtlMPqXVYaorhNvGtRoxl8BT9jpk Q1r8+eWKvbhRZkBanRtyoPDwY/Fuc99rvJodNIwYApFUheQuWKYuhbXtYGKgKveuyf+n k8Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768913723; x=1769518523; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kTfFB12k8fBYr6K+6fgxz6ANC3NN7d1pDwlK6xOZT2I=; b=i11dvAw9NrG+BuL94WFV1VhcDqKvV0r6xocUZOXMFcm1mPW0HYCHkOI/uZNwiskllS ob8TojPMTZQTKu10R3KFkY2cpWUZ4Ah9DjSTwfe7sBevOphoEfQn22m2+qi5ZkAhUqm6 Xyh1+1cB4kdignUJlZHQxkUjSDtzqH+fi8xQIxxUm23edmuVt1tpHP+Fb4ZoU7SKQ9QG x7y1j6tqVdqZ9XjkwXjvLvAPLVwcil+Fr2N+ZUGg+8orkc+usZH5Rt1h+veqUmsfeE5D b9Om4ajodd2op621z5KvDh41CEXl4PfzKmty01nvzLz4qMKRJAUZQTqL3o2OI/MEia8f 1Krw== X-Forwarded-Encrypted: i=1; AJvYcCX8KjmUc/aOKjWGdN3k+loRXH6npOsg1v8u99GkoToZwByVWurVlF5RM0sy2Gqlaie7W5LMpCUp/aHBIBCa@lists.postgresql.org X-Gm-Message-State: AOJu0YwFTJpBjv/6rT4N7YxQ0xJfbVWlhVdMcKiV6+bbZumKezXfbIsG d5+BWPvDPN112Qz/stKCv4YUyhr8w2TsVAgskEdQWYnbhdXhJDDXMOwOV5imwKZWNvKUpCF+87B ENqwGtif4F6c7Sn6lBSGWasO02bMAmho= X-Gm-Gg: AZuq6aIctxvDL01JDf77wumd/kHjdtoIr/pnHVbN8JxtNrbZLlDI1YYYxJHAWxLFCjl hEmnmHSJ4ys6xveiEFV9HpVO3F0qC2lwn9aKmY3zcwDRQoh9smur58/TP1g4+gOoqT3LHJ9ESYB l/QpG8+NrHv9qfIyBESeWgRqvUytzT1LJLCQVC7WjIZ9RoBTPd60woJPBZdTNekfODYYxzrb88L 5QbL4hlPHqUtK5btuK/sLLvFHIdbKHRq4bzF0cjYKmU4pJzUIgS5WrUpf1V3qubnCImLoqg0xjk 5CmCslulB+rya13nmClobwz6WUctIg== X-Received: by 2002:a53:ac96:0:b0:649:32cc:18da with SMTP id 956f58d0204a3-64932cc1991mr3183349d50.95.1768913722577; Tue, 20 Jan 2026 04:55:22 -0800 (PST) MIME-Version: 1.0 References: <48261e54-c4f1-4bde-a4a9-4f3698a6b380@app.fastmail.com> In-Reply-To: From: vignesh C Date: Tue, 20 Jan 2026 18:25:09 +0530 X-Gm-Features: AZwV_QjKMn0Z4IcVuoTCzDDkidyi6frEYKMgecurb9r_JbXzJlOQsONaMpj9BB4 Message-ID: Subject: Re: [Proposal] Adding Log File Capability to pg_createsubscriber To: Gyan Sreejith Cc: Amit Kapila , Euler Taveira , "kuroda.hayato@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" , Peter Smith Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 20 Jan 2026 at 06:28, Gyan Sreejith wrote: > > Thank you for all your input. I have attached the latest version of the patch that includes the changes proposed by Vignesh and 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