Recycle error logs
am 15.07.2006 09:37:27 von adey
------=_Part_49591_31475715.1152949047128
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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.
------=_Part_49591_31475715.1152949047128
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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.
------=_Part_49591_31475715.1152949047128--
Re: Recycle error logs
am 15.07.2006 10:45:56 von Devrim GUNDUZ
Hi,
On Sat, 2006-07-15 at 19:37 +1200, adey wrote:
> Please advise if there is a way to start a fresh Postgresql error /
> output log at regular intervals?
PostgreSQL 8.0.0 and above has a built-in log rotation mechanism. Check
postgresql.conf for this. See the section "Error reporting and logging".
log_rotation_age will help you to determine daily rotation. Also set
log_filename to point only to %Y-%m-%d .
Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
Re: Recycle error logs
am 17.07.2006 17:23:17 von Scott Marlowe
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
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Re: Recycle error logs
am 18.07.2006 03:00:41 von adey
------=_Part_92009_26322520.1153184441513
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Many thanks to all of you that helped with this.
On 7/18/06, Scott Marlowe wrote:
>
> 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
>
------=_Part_92009_26322520.1153184441513
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Many thanks to all of you that helped with this.
On 7/18/06, Scott Marlowe <> wrote:
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
------=_Part_92009_26322520.1153184441513--