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 1udKR8-0062Vk-8h for pgsql-docs@arkaria.postgresql.org; Sun, 20 Jul 2025 03:10:02 +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 1udKR6-009Mop-Tv for pgsql-docs@arkaria.postgresql.org; Sun, 20 Jul 2025 03:10:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1udKR6-009Moh-MR for pgsql-docs@lists.postgresql.org; Sun, 20 Jul 2025 03:10:00 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1udKR3-008j7l-2a for pgsql-docs@lists.postgresql.org; Sun, 20 Jul 2025 03:10:00 +0000 Received: from [172.20.10.2] (sp49-98-213-1.msd.spmode.ne.jp [49.98.213.1]) by oss.nttdata.com (Postfix) with ESMTPSA id 6075A6137C; Sun, 20 Jul 2025 12:09:50 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: Date: Sun, 20 Jul 2025 12:09:49 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Document reopen of output file via SIGHUP in pg_recvlogical Content-Language: en-US To: Shinya Kato Cc: pgsql-docs@lists.postgresql.org References: <0977fc4f-1523-4ecd-8a0e-391af4976367@oss.nttdata.com> <29fd8017-7f4a-4d58-8649-4847c558c8a7@oss.nttdata.com> From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/07/18 16:15, Shinya Kato wrote: > On Fri, Jul 18, 2025 at 12:33 PM Fujii Masao > wrote: >> >> >> >> On 2025/07/18 11:35, Shinya Kato wrote: >>> On Thu, Jul 10, 2025 at 4:48 PM Fujii Masao wrote: >>>> >>>> Hi, >>>> >>>> pg_recvlogical continuously writes to the file specified with the --file 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 file and >>>> then send a SIGHUP to pg_recvlogical, which will close the renamed file 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 documentation. >>>> Thought? >>> >>> Agreed. >>> I have confirmed the behavior and I think it should be documented. >>> >>> 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, >> >> -- >> Fujii Masao >> NTT DATA Japan Corporation > > Thanks for updating the patch. LGTM. I've pushed the patch. Thanks! Regards, -- Fujii Masao NTT DATA Japan Corporation