Thread
Commits
-
doc: Document reopen of output file via SIGHUP in pg_recvlogical.
- ab13b7a8c7bc 13.22 landed
- 7efaf0a1b3e2 14.19 landed
- f4a67e52b2a1 15.14 landed
- 2b09054e4d18 16.10 landed
- 227d0ce18af9 17.6 landed
- 6cf5b10ce96c 18.0 landed
- cb937e48f01f 19 (unreleased) landed
-
Document reopen of output file via SIGHUP in pg_recvlogical
Fujii Masao <masao.fujii@oss.nttdata.com> — 2025-07-10T07:47:49Z
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
-
Re: Document reopen of output file via SIGHUP in pg_recvlogical
Shinya Kato <shinya11.kato@gmail.com> — 2025-07-18T02:35:19Z
On Thu, Jul 10, 2025 at 4:48 PM Fujii Masao <masao.fujii@oss.nttdata.com> 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. -- Best regards, Shinya Kato NTT OSS Center
-
Re: Document reopen of output file via SIGHUP in pg_recvlogical
Fujii Masao <masao.fujii@oss.nttdata.com> — 2025-07-18T03:33:36Z
On 2025/07/18 11:35, Shinya Kato wrote: > On Thu, Jul 10, 2025 at 4:48 PM Fujii Masao <masao.fujii@oss.nttdata.com> 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
-
Re: Document reopen of output file via SIGHUP in pg_recvlogical
Shinya Kato <shinya11.kato@gmail.com> — 2025-07-18T07:15:50Z
On Fri, Jul 18, 2025 at 12:33 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote: > > > > On 2025/07/18 11:35, Shinya Kato wrote: > > On Thu, Jul 10, 2025 at 4:48 PM Fujii Masao <masao.fujii@oss.nttdata.com> 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. -- Best regards, Shinya Kato NTT OSS Center
-
Re: Document reopen of output file via SIGHUP in pg_recvlogical
Fujii Masao <masao.fujii@oss.nttdata.com> — 2025-07-20T03:09:49Z
On 2025/07/18 16:15, Shinya Kato wrote: > On Fri, Jul 18, 2025 at 12:33 PM Fujii Masao > <masao.fujii@oss.nttdata.com> wrote: >> >> >> >> On 2025/07/18 11:35, Shinya Kato wrote: >>> On Thu, Jul 10, 2025 at 4:48 PM Fujii Masao <masao.fujii@oss.nttdata.com> 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