Re: problem Postgres rotation logs

2003-06-14 Thread Clement Laforet
On Sat, 14 Jun 2003 18:21:29 +
"Emilio Manuel" <[EMAIL PROTECTED]> wrote:

> I use Postgres as database for my web site. Postgres write logs to 
> /var/log/pgsql.log.
> 
> To make log rotation, I append:
> 
> /var/log/pgsql  pgsql:pgsql 600  4 *$W0D23  Z
> 
> to /etc/newsyslog
> 
> The rotation works fine and Postgres still work after it occurs, but until I 
> stop and start again Postgres, it doesn_t write any line to the new file 
> /var/log/pgsql.log
> 
> ¿What am I doing wrong?


you need to send a kill -HUP to Postgres process, because you change the file name but 
not he file descriptor.

according to man newsyslog :
 path_to_pid_file
 This optional field specifies the file name to read to find the
 daemon process id, or to find a process group id if the U flag
 was specified.  If this field is present, a signal_number is sent
 the process id contained in this file.  If this field is not
 present, then a SIGHUP signal will be sent to syslogd(8), unless
 the N flag has been specified.  This field must start with "/" in
 order to be recognized properly.


Regards,

clem
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


problem Postgres rotation logs

2003-06-14 Thread Emilio Manuel
I use Postgres as database for my web site. Postgres write logs to 
/var/log/pgsql.log.

To make log rotation, I append:

/var/log/pgsql  pgsql:pgsql 600  4 *$W0D23  Z

to /etc/newsyslog

The rotation works fine and Postgres still work after it occurs, but until I 
stop and start again Postgres, it doesn’t write any line to the new file 
/var/log/pgsql.log

¿What am I doing wrong?

_
Charla con tus amigos en línea mediante MSN Messenger: 
http://messenger.yupimsn.com/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"