pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres Log Rolling
3+ messages / 3 participants
[nested] [flat]
* Postgres Log Rolling
@ 2002-02-20 18:46 Naomi Walker <nwalker@eldocomp.com>
2002-02-20 19:32 ` Re: Postgres Log Rolling Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Naomi Walker @ 2002-02-20 18:46 UTC (permalink / raw)
To: pgsql-admin
This should be an easy one, but......
We need to start rolling our postgres error logs. I wondered whether or
not I could pull the rug out from under postgres by just renaming the
pgsql.log to 'date'.log and then recreating (touch pgsql.log) the log.
I then vacuum'd a database (so it would write stuff in the log), and
noticed that the renamed log ('date'.log) was the one written to, not the
new pgsql.log.
Do I have to bounce the cluster to roll the log? How should I be
performing this task?
--
Naomi Walker
Chief Information Officer
Eldorado Computing, Inc.
602-604-3100 ext 242
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Postgres Log Rolling
2002-02-20 18:46 Postgres Log Rolling Naomi Walker <nwalker@eldocomp.com>
@ 2002-02-20 19:32 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2002-02-20 19:32 UTC (permalink / raw)
To: Naomi Walker <nwalker@eldocomp.com>; +Cc: pgsql-admin
Naomi Walker <nwalker@eldocomp.com> writes:
> Do I have to bounce the cluster to roll the log? How should I be
> performing this task?
There's some discussion of this point in the 7.2 docs:
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/logfile-maintenance.html
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Postgres Log Rolling
@ 2002-02-20 22:11 heatherm@famoice.com
0 siblings, 0 replies; 3+ messages in thread
From: heatherm@famoice.com @ 2002-02-20 22:11 UTC (permalink / raw)
To: nwalker@eldocomp.com; pgsql-admin
Naomi,
We're using Red Hat Linux logrotate to do this
A file we called pgsql is put in the /etc/logrotate.d directory, it's
contents are as follows
/var/log/pgsql {
rotate 5
copytruncate
daily
size=1k
}
This rotates the log files each morning when the daily cron jobs are
run. We found copytruncate to be the key, since without it the logs
weren't rotated.
Hope this helps
Heather Murray.
> -----Original Message-----
> From: nwalker [mailto:nwalker@eldocomp.com]
> Sent: Thursday, 21 February 2002 05:47
> To: pgsql-admin
> Cc: nwalker
> Subject: FW: [ADMIN] Postgres Log Rolling
>
>
>
> This should be an easy one, but......
>
> We need to start rolling our postgres error logs. I wondered
> whether or
> not I could pull the rug out from under postgres by just renaming the
> pgsql.log to 'date'.log and then recreating (touch pgsql.log) the log.
>
> I then vacuum'd a database (so it would write stuff in the log), and
> noticed that the renamed log ('date'.log) was the one written
> to, not the
> new pgsql.log.
>
> Do I have to bounce the cluster to roll the log? How should I be
> performing this task?
>
> --
> Naomi Walker
> Chief Information Officer
> Eldorado Computing, Inc.
> 602-604-3100 ext 242
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-02-20 22:11 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-02-20 18:46 Postgres Log Rolling Naomi Walker <nwalker@eldocomp.com>
2002-02-20 19:32 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-02-20 22:11 Re: Postgres Log Rolling heatherm@famoice.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