Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8CC779FA266 for ; Sat, 27 Oct 2007 12:30:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 38105-01 for ; Sat, 27 Oct 2007 12:30:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 824CD9FA2D6 for ; Sat, 27 Oct 2007 12:30:34 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l9RFUT1Z029410; Sat, 27 Oct 2007 11:30:29 -0400 (EDT) To: David Lowry cc: "Joshua D.Drake" , pgsql-admin@postgresql.org Subject: Re: way to turn off epochs in log_filename In-reply-to: <0072EC59-9FE8-461D-AD30-5116F19A1BF7@bju.edu> 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> Comments: In-reply-to David Lowry message dated "Sat, 27 Oct 2007 11:14:37 -0400" Date: Sat, 27 Oct 2007 11:30:29 -0400 Message-ID: <29409.1193499029@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/278 X-Sequence-Number: 27192 David Lowry writes: > 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. regards, tom lane