Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 73A449F9F4C for ; Mon, 29 Oct 2007 09:35:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10051-04 for ; Mon, 29 Oct 2007 09:35:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ns.bju.edu (ns.bju.edu [158.158.239.1]) by postgresql.org (Postfix) with ESMTP id 54E809F9FDA for ; Mon, 29 Oct 2007 09:35:07 -0300 (ADT) Received: from IBarr.bju.edu ([158.158.240.249]) by ns.bju.edu (Switch-2.2.8/Switch-2.2.8) with ESMTP id l9TCYvJ18975; Mon, 29 Oct 2007 08:34:57 -0400 Received: from ns2.bju.edu (ns2.bju.edu [158.158.100.233]) by IBarr.bju.edu (Spam Firewall) with ESMTP id C326F217B0F; Mon, 29 Oct 2007 08:34:51 -0400 (EDT) Received: from ns2.bju.edu (ns2.bju.edu [158.158.100.233]) by IBarr.bju.edu with ESMTP id CBd5sUS6d88B48GE; Mon, 29 Oct 2007 08:34:51 -0400 (EDT) Received: from [158.158.26.36] (dlowrymac.bju.edu [158.158.26.36]) by ns2.bju.edu (Postfix) with ESMTP id 4F62F5DC66; Mon, 29 Oct 2007 07:34:51 -0500 (EST) In-Reply-To: <29409.1193499029@sss.pgh.pa.us> References: <26960.1193434395@sss.pgh.pa.us> <20071026144005.3aa6cc29@scratch> <27413.1193435100@sss.pgh.pa.us> <20071026154202.501e9b75@scratch> <0072EC59-9FE8-461D-AD30-5116F19A1BF7@bju.edu> <29409.1193499029@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0ED5986E-B518-4F14-ABAA-5D115DF4F25F@bju.edu> Cc: "Joshua D.Drake" , pgsql-admin@postgresql.org Content-Transfer-Encoding: 7bit From: David Lowry Subject: Re: way to turn off epochs in log_filename Date: Mon, 29 Oct 2007 08:34:50 -0400 To: Tom Lane X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/285 X-Sequence-Number: 27199 On Oct 27, 2007, at 11:30 AM, Tom Lane wrote: >> 1. Logrotate moves the old log file to a new name, equivalent to >> something like this: >> mv postgresql.log postgresql.log.1 >> In the mean time, PG keeps writing to the same file. >> 2. Logrotate sends a HUP (as configured in the logrotate conf) to the >> postmaster process, which causes PG to close the old log file >> (postgresql.log.1) and open a new one (postgresql.log). > >> If I understand correctly, you're saying that this process either >> won't work or isn't portable. Is that correct? > > Specifically, PG does not respond to SIGHUP in the way you are > imagining > above. The log-file-switch capability is either nonexistent (if no > log > collector process) or built in (if log collector is active) and there > doesn't seem any value in driving the latter from outside PG. Thanks for clearing that up. I think I'll just go with a script to clean up the files. David