Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7l84-0006sP-Ij for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 11:12:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U7l83-0000q4-Uk for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 11:12:55 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7l83-0000pz-BE for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 11:12:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7l80-0007mj-6z for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 11:12:54 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r1JBCpEW024571; Tue, 19 Feb 2013 06:12:51 -0500 (EST) From: Tom Lane To: Rafael Martinez cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on In-reply-to: <51235ADF.3090109@usit.uio.no> References: <22797.1361267670@sss.pgh.pa.us> <512350D9.5010609@usit.uio.no> <23409.1361269278@sss.pgh.pa.us> <51235ADF.3090109@usit.uio.no> Comments: In-reply-to Rafael Martinez message dated "Tue, 19 Feb 2013 11:58:39 +0100" Date: Tue, 19 Feb 2013 06:12:51 -0500 Message-ID: <24570.1361272371@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Rafael Martinez writes: > Well, postgreSQL is versatile enough to allow you to decide many > aspects of log rotation. It should be the user who decide what will > happen with log data after and during a rotation. TBH, I don't think the rotation configuration options need to cater for stupid choices, and what you're describing sounds like a stupid choice. Why wouldn't you configure, say, a finite set of daily- or hourly-named files? Even just ping-ponging between two log files would be enough to prevent the scenario where you lose the freshest log entries. If you don't care about keeping even the latest entries, then you don't need a log at all, much less rotation --- just pipe it to /dev/null. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs