Re: [HACKERS] Logfile rotation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Hagerty <matthew(at)venux(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Logfile rotation
Date: 1999-12-27 16:14:09
Message-ID: 26316.946311249@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Matthew Hagerty <matthew(at)venux(dot)net> writes:
> Does pg open its logfile every time it writes or does it open the file and
> hold it open as long as the postmaster is running?

If you do the usual
postmaster >logfile 2>&1
then the logfile is actually opened by the shell before the postmaster
ever starts; the postmaster has no way to close and re-open it. So,
no, you can't rotate the logfile transparently in that scenario.

I believe there's a compile-time option to use syslog instead, which
probably works better for this (assuming you have syslog).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ansley, Michael 1999-12-27 17:20:14 RE: [HACKERS] Explain plan output
Previous Message Tom Lane 1999-12-27 16:09:26 Re: [HACKERS] memory dilemma