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 1uZm0f-007qLZ-5Y for pgsql-docs@arkaria.postgresql.org; Thu, 10 Jul 2025 07:48:01 +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 1uZm0d-009bOi-87 for pgsql-docs@arkaria.postgresql.org; Thu, 10 Jul 2025 07:47:59 +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 1uZm0d-009bNk-0N for pgsql-docs@lists.postgresql.org; Thu, 10 Jul 2025 07:47:59 +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 1uZm0a-006nwk-2k for pgsql-docs@lists.postgresql.org; Thu, 10 Jul 2025 07:47:59 +0000 Received: from [192.168.11.2] (p1696134-ipoe.ipoe.ocn.ne.jp [118.0.93.133]) by oss.nttdata.com (Postfix) with ESMTPSA id 719A361C10 for ; Thu, 10 Jul 2025 16:47:50 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Content-Type: multipart/mixed; boundary="------------eb9N07q0qGebA6lJi95bcXxm" Message-ID: <0977fc4f-1523-4ecd-8a0e-391af4976367@oss.nttdata.com> Date: Thu, 10 Jul 2025 16:47:49 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: pgsql-docs@lists.postgresql.org From: Fujii Masao Subject: Document reopen of output file via SIGHUP in pg_recvlogical 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. --------------eb9N07q0qGebA6lJi95bcXxm Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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? Regards, -- Fujii Masao NTT DATA Japan Corporation --------------eb9N07q0qGebA6lJi95bcXxm Content-Type: text/plain; charset=UTF-8; name="v1-0001-doc-Document-reopen-of-output-file-via-SIGHUP-in-.patch" Content-Disposition: attachment; filename*0="v1-0001-doc-Document-reopen-of-output-file-via-SIGHUP-in-.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSAzZDBiMGRmNWQyMWI1NzBiYmRhNzUzNTNjOWJhMjMwZDA5MDdlMjUzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBGdWppaSBNYXNhbyA8ZnVqaWlAcG9zdGdyZXNxbC5v cmc+CkRhdGU6IFRodSwgMTAgSnVsIDIwMjUgMTY6MjU6MTIgKzA5MDAKU3ViamVjdDogW1BB VENIIHYxXSBkb2M6IERvY3VtZW50IHJlb3BlbiBvZiBvdXRwdXQgZmlsZSB2aWEgU0lHSFVQ IGluCiBwZ19yZWN2bG9naWNhbC4KCldoZW4gcGdfcmVjdmxvZ2ljYWwgcmVjZWl2ZXMgYSBT SUdIVVAgc2lnbmFsLCBpdCBjbG9zZXMgdGhlIGN1cnJlbnQKb3V0cHV0IGZpbGUgYW5kIHJl b3BlbnMgYSBuZXcgb25lLiBUaGlzIGlzIHVzZWZ1bCBzaW5jZSBpdCBhbGxvd3MgdXMgdG8K cm90YXRlIHRoZSBvdXRwdXQgZmlsZSBieSByZW5hb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