Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7kKE-00026o-2x for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 10:21:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U7kKD-0000FG-Gw for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 10:21:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7kKD-0000FA-0C for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 10:21:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7kK7-0000zr-E4 for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 10:21:24 +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 r1JALIUn023410; Tue, 19 Feb 2013 05:21:18 -0500 (EST) From: Tom Lane To: Rafael Martinez cc: sari.thiele@usit.uio.no, pgsql-bugs@postgresql.org Subject: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on In-reply-to: <512350D9.5010609@usit.uio.no> References: <22797.1361267670@sss.pgh.pa.us> <512350D9.5010609@usit.uio.no> Comments: In-reply-to Rafael Martinez message dated "Tue, 19 Feb 2013 11:15:53 +0100" Date: Tue, 19 Feb 2013 05:21:18 -0500 Message-ID: <23409.1361269278@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: > If the behavior we are talking about is intentional, why do be have > pg_rotate_logfile() if we can not manually override with this function > log_rotation_age and log_rotation_size? It works fine as long as the filename pattern is such that a new file would be selected. If we didn't have this filter, then a rotation operation would wipe out *current* log entries, even those that were made a millisecond ago. That can't possibly be a good idea. Any rotation scheme ought to provide for recent entries to survive at least until you've rotated through whichever other log files you have. 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