"Rajesh Kumar Mallah." <mallah@trade-india.com> wrote:
> Yes you are very correct,
>
> postmaster's log had exceed the OS file limit
> which was ~ 2.1 GB  .
>
> i wanted to rotate these log but i do not know
> how to make postmaster recreate a log file while
> it is running.
Well,
the most correct way to do a logrotate is ( Redhat ):
1) Put on your postgresql.conf the following lines:
syslog = 2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
2)  Put on the directory /etc/logrotate.d a file called
'postgres' with the following lines:
/var/log/postgresql.log {   compress   rotate 2   size=10000k   errors mendola@bigfoot.com   create 0664 postgres
postgres  daily   postrotate            /usr/bin/killall -HUP syslogd   endscript
 
}
change the email address of course :-)
3) Put the following line on your /etc/syslog.conf
# Save postgresql logs
LOCAL0.*
/var/log/postgresql.log
Ciao
Gaetano
--
#exclude <windows>
#include <CSRSS>
printf("\t\t\b\b\b\b\b\b");.
printf("\t\t\b\b\b\b\b\b");