Re: Recycle error logs

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: adey <adey11(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, postgresql-l <postgresql-l(at)Groups(dot)ittoolbox(dot)com>
Subject: Re: Recycle error logs
Date: 2006-07-17 15:23:17
Message-ID: 1153149797.2744.49.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sat, 2006-07-15 at 02:37, adey wrote:
> Please advise if there is a way to start a fresh Postgresql error /
> output log at regular intervals?
> We are tuning a "new toproduction" system, so I have all the SQL
> logged, but the file gets too big and cumbersome, so I'd like to start
> a new one each morning without restarting Postgres.

As mentioned previously, it's built into 8.0 and up. If you're stuck on
a version before that, you can use apache's log rotator to do the job.

Something like this:

pg_ctl start | /usr/sbin/rotatelogs /logs/pgsql 86400

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Anton P.Linevich 2006-07-17 15:35:56 replication loop
Previous Message Rojas, Fernando (CIAT) 2006-07-17 14:55:53 Restarting PostgreSQL