From: Tom Lane <tgl@sss.pgh.pa.us>
To: Wells Oliver <wellsoliver@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Definitive logrotate solution?
Date: Wed, 11 Apr 2012 19:03:17 -0400
Message-ID: <12916.1334185397@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOC+FBXFaNC7Ez4rSBFYqPKHdGx7=7xnD4G4b+Qua8Qx5Lmx7A@mail.gmail.com>
References: <CAOC+FBXFaNC7Ez4rSBFYqPKHdGx7=7xnD4G4b+Qua8Qx5Lmx7A@mail.gmail.com>
Wells Oliver <wellsoliver@gmail.com> writes:
> Might anyone share theirs? My log_rotation is set to 'stderr', and the log
> files are being put into /var/log/postgresql.
> My main concern is the postrotate action-- want to make sure the log is
> properly rotated, unneeded older logs removed, and postgres... properly
> bounced?
Use the logging collector with its built-in rotation parameters, and you
don't need anything else.
If you insist on an external solution, there's basically no way except
to shut down and restart postgres after any rotation, because there are
going to be N processes all connected to the same stderr file descriptor.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, wellsoliver@gmail.com
Subject: Re: Definitive logrotate solution?
In-Reply-To: <12916.1334185397@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox