Re: pg_recvlogical use of SIGHUP - Mailing list pgsql-hackers

From Dave Cramer
Subject Re: pg_recvlogical use of SIGHUP
Date
Msg-id CADK3HH+cKYTLsJ=GVaPuegqm1RivcNw0+dQvSd7TA8-6arSE6Q@mail.gmail.com
Whole thread Raw
In response to Re: pg_recvlogical use of SIGHUP  (Dave Cramer <davecramer@gmail.com>)
List pgsql-hackers

On 6 July 2018 at 14:11, Andres Freund <andres@anarazel.de> wrote:
Hi,

On 2018-07-06 13:49:37 -0400, Dave Cramer wrote:
> There is some undocumented (nothing in the docs) code that allows for
> closing reopening the output file for pg_recvlogical.
>
> Since this doesn't change the name of the file in the process I'm wondering
> how one might actually use this "feature" ?

You can rename the file, then sighup, no? Renaming while the file is
open will continue to write into the renamed file, but sighup'ing will
use the original name.

That is the missing piece, thanks! 
I'll prepare a patch for the docs


See attached patch.



Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Explain buffers wrong counter with parallel plans
Next
From: Arthur Zakirov
Date:
Subject: Re: PATCH: Update snowball stemmers