Document reopen of output file via SIGHUP in pg_recvlogical

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Document reopen of output file via SIGHUP in pg_recvlogical
Date: 2025-07-10 07:47:49
Message-ID: 0977fc4f-1523-4ecd-8a0e-391af4976367@oss.nttdata.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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

Attachment Content-Type Size
v1-0001-doc-Document-reopen-of-output-file-via-SIGHUP-in-.patch text/plain 1.5 KB

Browse pgsql-docs by date

  From Date Subject
Next Message Daniel Gustafsson 2025-07-10 19:48:12 Re: Outdated typedefs in documentation
Previous Message Artem Fadeev 2025-07-10 00:45:56 Outdated typedefs in documentation