Re: [GENERAL] Log File Maintainance
Neil Dugan wrote: On Tue, 2005-04-12 at 08:51 +0100, Richard Huxton wrote: Inpreet Singh wrote: syslog = 2 # range 0-2 syslog_facility = 'LOCAL0' syslog_ident = 'postgres' You also need to update your syslog.conf and restart syslogd Add a line like: local0.* /var/log/pgsql Saw this post and tried to setup the log info to be sent to a different file '/var/log/pgsql'. There was no trouble with this. I then thought I would use a more logical name than 'LOCAL0' for the facility name. However no matter what name I tried '/etc/init.d/postgresql' wouldn't restart the 'postmaster' program. The local0/1/etc facilities are for "custom" applications logging to syslog. You can see a list of valid facilities with "man syslog.conf" HTH -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [GENERAL] Log File Maintainance
On Tue, 12 Apr 2005, Richard Huxton wrote: Inpreet Singh wrote: Hello, I am working on live server where we have installed postgres database as our back end. But now the problem is due to continues work on postgres, size of log files has become problem for us. And the partition where our postgres exists is full. Postmaster is not working now. I tried to rotate log file by adding lines in postgresql.conf syslog = 2 # range 0-2 syslog_facility = 'LOCAL0' syslog_ident = 'postgres' You also need to update your syslog.conf and restart syslogd Add a line like: local0.* /var/log/pgsql probably, better -/var/log/pgsql Read the man page(s) for details. Regards, Oleg _ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Log File Maintainance
Inpreet Singh wrote: Hello, I am working on live server where we have installed postgres database as our back end. But now the problem is due to continues work on postgres, size of log files has become problem for us. And the partition where our postgres exists is full. Postmaster is not working now. I tried to rotate log file by adding lines in postgresql.conf syslog = 2 # range 0-2 syslog_facility = 'LOCAL0' syslog_ident = 'postgres' You also need to update your syslog.conf and restart syslogd Add a line like: local0.* /var/log/pgsql Read the man page(s) for details. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 8: explain analyze is your friend
[GENERAL] Log File Maintainance
Hello, I am working on live server where we have installed postgres database as our back end. But now the problem is due to continues work on postgres, size of log files has become problem for us. And the partition where our postgres exists is full. Postmaster is not working now. I tried to rotate log file by adding lines in postgresql.conf syslog = 2 # range 0-2syslog_facility = 'LOCAL0'syslog_ident = 'postgres' But it doesn't working. Is there anything else I had to due in this respect. I think I am missing some point. Also I had written rotate script and save it at location :/etc/logrotate.d ** /usr/local/pgsql/data/serverlog{ weekly notifempty rotate 2 create /bin/kill -HUP `cat /usr/local/pgsql/data/postmaster.pid 2> /dev/null` 2> /dev/null || true endscript} *** But when I am executing following command it is flagging error ** /etc/logrotate/postgres [EMAIL PROTECTED] logrotate.d]# logrotate -f -v postgresreading config file postgresreading config info for /usr/local/pgsql/data/logfile error: postgres:6 unexpected log filename* Please guide me thru... Inpreet Singh