pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRecycle error logs
4+ messages / 3 participants
[nested] [flat]
* Recycle error logs
@ 2006-07-15 07:37 adey <adey11@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: adey @ 2006-07-15 07:37 UTC (permalink / raw)
To: pgsql-admin; postgresql-l <postgresql-l@Groups.ittoolbox.com>
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.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Recycle error logs
@ 2006-07-15 08:45 Devrim GUNDUZ <devrim@commandprompt.com>
parent: adey <adey11@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Devrim GUNDUZ @ 2006-07-15 08:45 UTC (permalink / raw)
To: adey <adey11@gmail.com>; +Cc: pgsql-admin
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/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Recycle error logs
@ 2006-07-17 15:23 Scott Marlowe <smarlowe@g2switchworks.com>
parent: adey <adey11@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Scott Marlowe @ 2006-07-17 15:23 UTC (permalink / raw)
To: adey <adey11@gmail.com>; +Cc: pgsql-admin; postgresql-l <postgresql-l@Groups.ittoolbox.com>
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Recycle error logs
@ 2006-07-18 01:00 adey <adey11@gmail.com>
parent: Scott Marlowe <smarlowe@g2switchworks.com>
0 siblings, 0 replies; 4+ messages in thread
From: adey @ 2006-07-18 01:00 UTC (permalink / raw)
To: Scott Marlowe <smarlowe@g2switchworks.com>; +Cc: pgsql-admin; postgresql-l <postgresql-l@groups.ittoolbox.com>
Many thanks to all of you that helped with this.
On 7/18/06, Scott Marlowe <smarlowe@g2switchworks.com> 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
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-07-18 01:00 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-15 07:37 Recycle error logs adey <adey11@gmail.com>
2006-07-15 08:45 ` Devrim GUNDUZ <devrim@commandprompt.com>
2006-07-17 15:23 ` Scott Marlowe <smarlowe@g2switchworks.com>
2006-07-18 01:00 ` adey <adey11@gmail.com>
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