Re: Log rotation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Log rotation
Date
Msg-id 3779.1079054626@sss.pgh.pa.us
Whole thread Raw
In response to Log rotation  (Fernando Nasser <fnasser@redhat.com>)
Responses Re: Log rotation  (Fernando Nasser <fnasser@redhat.com>)
List pgsql-hackers
Fernando Nasser <fnasser@redhat.com> writes:
> Please remind me again why the postmaster cannot close and open the log 
> file when it receives a SIGHUP (to re-read configuration)?

(a) Because it never opened it in the first place --- the log file is
whatever was passed as stderr.

(b) Because it would not be sufficient to make the postmaster itself
close and reopen the file; every child process would have to do so also.
Doing this in any sort of synchronized fashion seems impossible.

It's much cleaner to have stderr be a pipe to some separate collector
program that can handle log rotation (ie, the Apache solution).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: client side syntax error localisation for psql (v1)
Next
From: Marty Scholes
Date:
Subject: Re: Performance and WAL on big inserts/updates