problem Postgres rotation logs
sheepkiller at cultdeadsheep.org
Sat Jun 14 12:45:38 PDT 2003
On Sat, 14 Jun 2003 18:21:29 +0000
"Emilio Manuel" <curioso1100 at hotmail.com> wrote:
> I use Postgres as database for my web site. Postgres write logs to
> 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
> ¿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 :
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.
More information about the freebsd-questions