Skip site navigation (1) Skip section navigation (2)

Re: Definitive logrotate solution?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wells Oliver <wellsoliver(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Definitive logrotate solution?
Date: 2012-04-11 23:03:17
Message-ID: 12916.1334185397@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-admin
Wells Oliver <wellsoliver(at)gmail(dot)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

In response to

Responses

pgsql-admin by date

Next:From: Wells OliverDate: 2012-04-11 23:40:28
Subject: Re: Definitive logrotate solution?
Previous:From: Wells OliverDate: 2012-04-11 22:20:34
Subject: Definitive logrotate solution?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group