pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDatabase logging.... Recycle server logs ???
3+ messages / 2 participants
[nested] [flat]
* Database logging.... Recycle server logs ???
@ 2003-01-13 15:44 codeWarrior <GPatnude@adelphia.net>
0 siblings, 1 reply; 3+ messages in thread
From: codeWarrior @ 2003-01-13 15:44 UTC (permalink / raw)
To: pgsql-admin
I recently discovered that another programmers CGI's are occasionally
killing my postgreSQL server so I decided to modify the postgres.conf file
to do some extended logging and additionally redirect the server output into
an error log (using the -l pgdblog.log) switch...
postgreSQL was restarted like this:
> pg_ctl start -D /usr/bin/pgsql/data -l pgdblog.log
I noticed that the server generated logfile gets real big real fast -- (15
queries and it's already at 1.5MB) -- Is there a switch / option to recycle
the server logs periodically ???
TIA...
GP
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Database logging.... Recycle server logs ???
@ 2003-01-13 20:10 Tom Lane <tgl@sss.pgh.pa.us>
parent: codeWarrior <GPatnude@adelphia.net>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2003-01-13 20:10 UTC (permalink / raw)
To: codeWarrior <gpatnude@hotmail.com>; +Cc: pgsql-admin
"codeWarrior" <GPatnude@adelphia.net> writes:
> I noticed that the server generated logfile gets real big real fast -- (15
> queries and it's already at 1.5MB) -- Is there a switch / option to recycle
> the server logs periodically ???
The recommended procedure is not to use pg_ctl's -l switch, but to pipe
output from it into a log-rotating script. The rotatelogs script from
the Apache distribution works well, or you can roll your own. See
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/logfile-maintenance.html
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Database logging.... Recycle server logs ???
@ 2003-01-13 21:40 codeWarrior <GPatnude@adelphia.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: codeWarrior @ 2003-01-13 21:40 UTC (permalink / raw)
To: pgsql-admin
"Tom Lane" <tgl@sss.pgh.pa.us> wrote in message
news:4864.1042488639@sss.pgh.pa.us...
> "codeWarrior" <GPatnude@adelphia.net> writes:
> > I noticed that the server generated logfile gets real big real fast --
(15
> > queries and it's already at 1.5MB) -- Is there a switch / option to
recycle
> > the server logs periodically ???
>
> The recommended procedure is not to use pg_ctl's -l switch, but to pipe
> output from it into a log-rotating script. The rotatelogs script from
> the Apache distribution works well, or you can roll your own. See
>
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/logfile-maintena
nce.html
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Thanks Tom -- Of course -- I located that section of the manual immediately
after my post... I will use logrotate....
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-01-13 21:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-01-13 15:44 Database logging.... Recycle server logs ??? codeWarrior <GPatnude@adelphia.net>
2003-01-13 20:10 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-01-13 21:40 ` codeWarrior <GPatnude@adelphia.net>
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