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 1vVoRJ-008QQ9-1J for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Dec 2025 10:07:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVoRI-00Bynx-19 for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Dec 2025 10:07: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 1vVoRI-00Bynp-0B for pgsql-hackers@lists.postgresql.org; Wed, 17 Dec 2025 10:07:24 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVoRH-0017vi-1F for pgsql-hackers@lists.postgresql.org; Wed, 17 Dec 2025 10:07:23 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-34c1d84781bso4917424a91.2 for ; Wed, 17 Dec 2025 02:07:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765966042; x=1766570842; 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=nzfl1PdQOPWYYNK9c9lazcXH491lQ4Yo6vg5nyKWlYE=; b=PPelM+tRQbtq+cBQiPJhfZgVi5gwEpNHxfWdHX3tVwkD1WpuOrlu36x9oxjf0ueSI3 30KtK02L9fOZVuVIgJaDIQ/snzYQXJNJpB2retsL/quoKd447coCbfAz7UTXYlJZp5Uz Di2isDArnTI4PNlA12dIaa1uiKqbwF31lg1aipCQnuAYsRAyqCTDQEdPPGPjUvbNpogw WqBPE67tA1+ZQod8AsprBA0jcc6WN+DlJZHX0cj+vuo0ySb3HenrP5GFGwuCh1FjNXEM jBsWEV8dmgTsxhRkAkCDpVbRi8yiUNnn4Dlv3487r2w/PbwA+MuvnWC4VnS7bsVz6P+L DzbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765966042; x=1766570842; 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=nzfl1PdQOPWYYNK9c9lazcXH491lQ4Yo6vg5nyKWlYE=; b=d0sWWeada567k2nDL6eA4NDF9MVlptIK5tmHwflxY8MaiRxdfDpMgHZ8TQo6KbwIQh bkPMZ/AGuqD18YrAwE2XCYHcIRUE9ZusebnkNq0SOtVmswShiZLpPy0poaxf5fb24XjT IKMxba7SKx8tYFMlsw6fQTltCXnKW9CSoXnCV1WyddGhauCjmwi4MeSXGD3dA/NwoSZA XZDfoHJXI+fqVyzytrhRN/H0F0y7oVQuPdwprEooj1+tqb6RPeO29KdyFRH25mIxy+/P 0JxkClZdJV+QPFYtQtvfeidG0SMpqRF5xDMysUxgM/YJCDDuWRe7E4m5XKH5ivDYQxhR I5ow== X-Forwarded-Encrypted: i=1; AJvYcCUwmw0Dwv7IqAAwOAEUZHp8FxsQN2Sdu95MlBoUqPwqUwerebBB0FqlEJempGx5+jHAELt6Tfbs5W56NlLJ@lists.postgresql.org X-Gm-Message-State: AOJu0YzZKsAzLt/U3pV7tX99n7U3BlpNQKnJl7ghKtjwYT0jqq+G/kGB 2wNTFzcE3XOrp0emwNgtbSEANv+AHeMlv54UDwghFEkvsKZDlRejOsNA6Mj4olF872sJbp3CdG+ 5hJ/ny8tS7PHUYWo9ECHuinmQ0DqZW/U= X-Gm-Gg: AY/fxX5c407DwgUFElb9QptNTyIz/D1CWpcvpcIVYdW+wmNVKDh41SF19aMBIedxLeA q/6NIc0k9MtXMbqPgB/Y/fPopo5pxaVEaSyG30s5bd3eOe14XY643mXwB8LV0UUBEN8DRJJ35Ng UPXFGcfgaFEBni7C+W/Z6lBtYA7LtaFxxoEYeA54uA2/UrIzTu7E+P+gYurSX+5Jzx+6xJSz2XU W1tf6Qp6mJ176ZApAimjY0lj+uWpYY5OpDf7eCFdffXhSYCpQpwLHVlX9cD8gpYVJOxBXzmwWWg OlndLAhZ X-Google-Smtp-Source: AGHT+IF1/KZl+m0rMKmMP50Bc+Ql6SU0C3FyxwpUm3y5CTb6pO9gnHCORrGbwGpCvvn4C7rg8Rnh2dvYu/zLdYfu7uw= X-Received: by 2002:a17:90b:3b8a:b0:34c:27ad:71e7 with SMTP id 98e67ed59e1d1-34c27ad7bf5mr15510324a91.35.1765966042053; Wed, 17 Dec 2025 02:07:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Wed, 17 Dec 2025 15:37:09 +0530 X-Gm-Features: AQt7F2r4WR9ipXrZORT1JN2zHFQwz38tnZBrM9oQaWYLP8yI3DOjqJrRH4MuAHQ Message-ID: Subject: Re: [Proposal] Adding Log File Capability to pg_createsubscriber To: "Hayato Kuroda (Fujitsu)" Cc: Gyan Sreejith , "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, 16 Dec 2025 at 12:31, Hayato Kuroda (Fujitsu) wrote: > > Dear Gyan, > > +1 for the idea. This point has already been discussed since the initial commit > [1], but it has left till now. I'm happy if you can take initiative. > Of course I can review your patches. > > Per my understanding, pg_upgrade puts logfiles at the directory, under > "${PGDATANEW}/pg_upgrade_output.d/${timestamp}". See Note part in [2]. > I feel more straightforward way is to follow that approach: > > 1. pg_createsubscriber creates a directory pg_createsubscriber_output.d/${timestamp}. > ${timestamp} has the same format as ISO 8601 (%Y%m%dT%H%M%S). > 2. pg_craetesubscriber saves outputs under the directory. > 3. Outputs can be retained when the command failed or --retain is specified. > Otherwise, they are removed at the end. If I recall correctly, this was implemented that way earlier, but the approach was abandoned around [1]. The primary reason was that when users take a backup of the data directory, they would need to explicitly manage the exclusion of this data, which was considered undesirable. > Are there benefits to provide -l option? By providing this as an option, users can store the log files outside the data directory, eliminating the need for any additional handling during backups. [1] - https://www.postgresql.org/message-id/d546c4bb-92d1-4e2d-898f-48234b12ed25%40app.fastmail.com Regards, Vignesh