Re: Log rotation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fernando Nasser <fnasser(at)redhat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Log rotation
Date: 2004-03-12 01:23:46
Message-ID: 3779.1079054626@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fernando Nasser <fnasser(at)redhat(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marty Scholes 2004-03-12 02:04:37 Re: Performance and WAL on big inserts/updates
Previous Message Tatsuo Ishii 2004-03-12 01:21:23 Re: client side syntax error localisation for psql (v1)