Re: core file found... - Mailing list pgsql-sql

From Gaetano Mendola
Subject Re: core file found...
Date
Msg-id 002301c1f99f$440c0800$d5a9fea9@GMENDOLA2
Whole thread Raw
In response to Re: pg_stat_get_backend_pid seems to be listing non existant  (Jan Wieck <janwieck@yahoo.com>)
List pgsql-sql
"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");



pgsql-sql by date:

Previous
From: "Rajesh Kumar Mallah."
Date:
Subject: Re: Further info : Very high load average but no cpu utilization ?
Next
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: Further info : Very high load average but no cpu utilization ?