Thread: keeping a log / debug info
Howdy:
Running PostgreSQL 7.2.1 on RedHat Linux 7.2 kernel 2.4.7.
I am running postgres with a '-d' option (debug)
and storing that info in a log file. This morning
I moved the log file (trying to gzip it) and touched
a new version of that file ... (didn't mean to do that).
Now no data is being recorded ...
Can I restart the database without losing backends
that currently exist? Sort of a -HUP postmaster<pid>?
Is there a way to record this info via /etc/syslog.conf
and have the system do it? (for instance, the message file ...
when it gets so large, it is moved to message.0
and you see a *new* message file).
Thanks!
-X
"Johnson, Shaunn" <SJohnson6@bcbsm.com> writes: > I am running postgres with a '-d' option (debug) > and storing that info in a log file. This morning > I moved the log file (trying to gzip it) and touched > a new version of that file ... (didn't mean to do that). > Now no data is being recorded ... If you are just directing stderr into a file then you can't rotate log files that way. You could use syslog instead, or you could pipe stderr to a log-rotation script. I prefer the latter, mainly because there are some messages that can't be redirected to syslog (eg, dynamic linker failure messages). See http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/logfile-maintenance.html and past discussions in the mailing list archives. regards, tom lane
On 19 Sep 2002 at 11:53, Johnson, Shaunn wrote: > > Howdy: > Running PostgreSQL 7.2.1 on RedHat Linux 7.2 kernel 2.4.7. > I am running postgres with a '-d' option (debug) > and storing that info in a log file. This morning > I moved the log file (trying to gzip it) and touched > a new version of that file ... (didn't mean to do that). > Now no data is being recorded ... > Can I restart the database without losing backends > that currently exist? Sort of a -HUP postmaster<pid>? > Is there a way to record this info via /etc/syslog.conf > and have the system do it? (for instance, the message file ... > when it gets so large, it is moved to message.0 > and you see a *new* message file). I can think of way to do this. Taken from apache. It can pipe the logs to another process and compress compress it etc... Check apache/logs.html#rotation in apache documentation.. May be you can pipe the logs to your own program which roatates the log or may be logrotate itself.. HTH.. Bye Shridhar -- weapon, n.: An index of the lack of development of a culture.