Received: from anarchy.io.com (anarchy.io.com [199.170.88.101]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f2JD0j642494 for ; Mon, 19 Mar 2001 08:00:45 -0500 (EST) (envelope-from hentosh@fnord.io.com) Received: from deliverator.io.com (root@deliverator.io.com [199.170.88.17]) by anarchy.io.com (8.9.3/8.9.3) with ESMTP id HAA28678 for ; Mon, 19 Mar 2001 07:00:42 -0600 Received: from fnord.io.com (IDENT:hentosh@fnord.io.com [199.170.88.12]) by deliverator.io.com (8.9.3/8.9.3) with ESMTP id HAA07212 for ; Mon, 19 Mar 2001 07:00:42 -0600 Received: (from hentosh@localhost) by fnord.io.com (8.8.7/8.8.7) id HAA31659 for pgsql-admin@postgresql.org; Mon, 19 Mar 2001 07:00:41 -0600 Date: Mon, 19 Mar 2001 07:00:41 -0600 From: Robert Hentosh To: pgsql-admin@postgresql.org Subject: Re: Postgres/Postmaster logging and log rotation Message-ID: <20010319070041.B30102@fnord.io.com> References: <3AA64F95.F9323A84@inetmi.com> <01030710392300.30364@dennis.veritime.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <01030710392300.30364@dennis.veritime.com>; from root@dennis.veritime.com on Wed, Mar 07, 2001 at 10:37:30AM -0500 X-Archive-Number: 200103/141 X-Sequence-Number: 989 Try the copytruncate directive in the logrotate configuration file. (See 'man logrotate'). This should allow it to work without restarting postgresql. But as the man file says, there is a small chance of losing some log entries. On Wed, Mar 07, 2001 at 10:37:30AM -0500, root wrote: > Be sure to stop postgres, rotate your log (or move it out of the /var/log > directory and then rotate it), and restart postgresql. That will solve your > problem. Hopefully you don't need a 24x7 available database as this might take > a few seconds for your server to complete. > > On Wed, 07 Mar 2001, William L James wrote: > > Hi there: > > > > We are running PostgreSQL 7.0.2 on RedHat Linux 6.2 and > > have encountered a few strange problems that continue to > > elude us - namely INSERT and DELETE functions that end > > abnormally, but do not include any information as to why (the > > JDBC connection just seems to have gone away). Trying to > > further diagnose the situation, I have been successful in starting > > the Postgres logging (by including the following in the postgresql > > script - su -l postgresql -c "/usr/bin/pg_ctl -D $PGDATA -p > > /usr/bin/postmaster start >>/var/log/postgresql 2>&1"), but > > when the weekly logrotate.d function kicks in, Postgres logging > > stops. We also have trouble doing a simple restart - I wind up > > having to do a stop and then a start minutes later. Can anyone > > explain how to get Postgres to log and to be able to rotate the > > log periodically? Any information would be appreciated. > > > > Thanks, > > Bill James > -- > Thanks, > > > Rodney Hampton