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.94.2) (envelope-from ) id 1ucbqz-00ErBh-Ey for pgsql-docs@arkaria.postgresql.org; Fri, 18 Jul 2025 03:33:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ucbqx-007KFB-Al for pgsql-docs@arkaria.postgresql.org; Fri, 18 Jul 2025 03:33:43 +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.94.2) (envelope-from ) id 1ucbqx-007KEz-29 for pgsql-docs@lists.postgresql.org; Fri, 18 Jul 2025 03:33:43 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1ucbqu-007rxg-1W for pgsql-docs@lists.postgresql.org; Fri, 18 Jul 2025 03:33:42 +0000 Received: from [192.168.30.98] (p383008-ipoe.ipoe.ocn.ne.jp [153.240.252.7]) by oss.nttdata.com (Postfix) with ESMTPSA id 9F2B661C21; Fri, 18 Jul 2025 12:33:36 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Content-Type: multipart/mixed; boundary="------------m3XuG5crnnnse1szxpcNr4r7" Message-ID: <29fd8017-7f4a-4d58-8649-4847c558c8a7@oss.nttdata.com> Date: Fri, 18 Jul 2025 12:33:36 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Document reopen of output file via SIGHUP in pg_recvlogical To: Shinya Kato Cc: pgsql-docs@lists.postgresql.org References: <0977fc4f-1523-4ecd-8a0e-391af4976367@oss.nttdata.com> Content-Language: en-US From: Fujii Masao In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------m3XuG5crnnnse1szxpcNr4r7 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2025/07/18 11:35, Shinya Kato wrote: > On Thu, Jul 10, 2025 at 4:48=E2=80=AFPM Fujii Masao wrote: >> >> Hi, >> >> pg_recvlogical continuously writes to the file specified with the --fi= le option, >> which means the output file can grow indefinitely. To manage file size= , >> some users may want to rotate the output periodically. >> >> While reviewing the source code to find the way to rotate the file, I = noticed >> that pg_recvlogical reopens the output file when it receives a SIGHUP = signal. >> This makes file rotation possible: we can rename the current output fi= le and >> then send a SIGHUP to pg_recvlogical, which will close the renamed fil= e and >> open a new one with the same original name. >> >> This is a useful feature, but it's currently undocumented. So I'd like= to >> apply the attached patch that adds this information to the documentati= on. >> Thought? >=20 > Agreed. > I have confirmed the behavior and I think it should be documented. >=20 > Your patch looks good, except that you should use "specified by" > instead of "given with" to be consistent with the other documents. Thanks for the review! I've updated the patch as suggested. The revised version is attached. Unless there are any objections, I will commit and back-patch it to v13. Regards, --=20 Fujii Masao NTT DATA Japan Corporation --------------m3XuG5crnnnse1szxpcNr4r7 Content-Type: text/plain; charset=UTF-8; name="v2-0001-doc-Document-reopen-of-output-file-via-SIGHUP-in-.patch" Content-Disposition: attachment; filename*0="v2-0001-doc-Document-reopen-of-output-file-via-SIGHUP-in-.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSBiYTMwZmVhNDVmMmY3ZDA4ZDhmZTViYTQ1MWI5YzY1OGEyOGYxZWUxIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBGdWppaSBNYXNhbyA8ZnVqaWlAcG9zdGdyZXNxbC5v cmc+CkRhdGU6IEZyaSwgMTggSnVsIDIwMjUgMTI6MjE6MTEgKzA5MDAKU3ViamVjdDogW1BB VENIIHYyXSBkb2M6IERvY3VtZW50IHJlb3BlbiBvZiBvdXRwdXQgZmlsZSB2aWEgU0lH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