| From: | Andres Freund <andres(at)anarazel(dot)de> | 
|---|---|
| To: | Greg Stark <stark(at)mit(dot)edu> | 
| Cc: | Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Reopen logfile on SIGHUP | 
| Date: | 2018-02-27 22:46:23 | 
| Message-ID: | 20180227224623.hqfx5gwx776ev5fd@alap3.anarazel.de | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On 2018-02-27 22:32:41 +0000, Greg Stark wrote:
> On 27 February 2018 at 14:41, Anastasia Lubennikova
> <a(dot)lubennikova(at)postgrespro(dot)ru> wrote:
> 
> > Small patch in the attachment implements logfile reopeninig on SIGHUP.
> > It only affects the file accessed by logging collector, which name you can
> > check with pg_current_logfile().
> 
> HUP will cause Postgres to reload its config files. That seems like a
> fine time to reopen the log files as well but it would be nice if
> there was also some way to get it to *just* do that and not reload the
> config files.
Is that an actually important thing to be able to do?
> I wonder if it would be easiest to just have the syslogger watch for
> some other signal as well (I'm guessing the the syslogger doesn't use
> relcache invalidations so it could reuse USR1 for example). That would
> be a bit inconvenient as the admins would have to find the syslogger
> and deliver the signal directly, rather than through the postmaster
> but it would be pretty easy for them.
-many. We have been "signal starved" a number of times, and definitely
shouldn't waste one on this.
- Andres
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2018-02-27 22:52:20 | Re: Reopen logfile on SIGHUP | 
| Previous Message | Peter Geoghegan | 2018-02-27 22:33:08 | Re: pgsql: Avoid valgrind complaint about write() of uninitalized bytes. |