From owner-freebsd-questions@FreeBSD.ORG Sat Jun 14 12:45:38 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5966337B401 for ; Sat, 14 Jun 2003 12:45:38 -0700 (PDT) Received: from cultdeadsheep.org (charon.cultdeadsheep.org [80.65.226.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD1E343F85 for ; Sat, 14 Jun 2003 12:45:36 -0700 (PDT) (envelope-from sheepkiller@cultdeadsheep.org) Received: (qmail 33604 invoked from network); 14 Jun 2003 19:45:35 -0000 Received: from unknown (HELO lucifer.cultdeadsheep.org) (192.168.0.2) by goofy.cultdeadsheep.org with SMTP; 14 Jun 2003 19:45:35 -0000 Date: Sat, 14 Jun 2003 21:45:29 +0200 From: Clement Laforet To: "Emilio Manuel" Message-Id: <20030614214529.3dd34a55.sheepkiller@cultdeadsheep.org> In-Reply-To: References: Organization: tH3 cUlt 0f tH3 d3@d sH33p X-Mailer: Sylpheed version 0.9.1 (GTK+ 1.2.10; i386-portbld-freebsd4.8) X-Face: ._cVVRDn#-2((lnfi^P7CoD4htI$4+#G/G)!w|,}H5yK~%(3-C.JlEYbOjJGFwJkt*7N^%z jYeu[;}]}F"3}l5R'l"X0HbvT^D\Q&%deCo)MayY`);TO Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable cc: freebsd-questions@FreeBSD.ORG Subject: Re: problem Postgres rotation logs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jun 2003 19:45:38 -0000 On Sat, 14 Jun 2003 18:21:29 +0000 "Emilio Manuel" wrote: > I use Postgres as database for my web site. Postgres write logs to=20 > /var/log/pgsql.log. >=20 > To make log rotation, I append: >=20 > /var/log/pgsql pgsql:pgsql 600 4 * $W0D23 Z >=20 > to /etc/newsyslog >=20 > The rotation works fine and Postgres still work after it occurs, but unti= l I=20 > stop and start again Postgres, it doesn_t write any line to the new file= =20 > /var/log/pgsql.log >=20 > =BFWhat am I doing wrong? you need to send a kill -HUP to Postgres process, because you change the fi= le 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 s= ent the process id contained in this file. If this field is not present, then a SIGHUP signal will be sent to syslogd(8), unle= ss the N flag has been specified. This field must start with "/"= in order to be recognized properly. Regards, clem