Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7mWz-0004ip-RT for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 12:42:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U7mWz-000226-CE for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Feb 2013 12:42:45 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7mWy-000221-Ny for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 12:42:44 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U7mWw-0000fV-JK for pgsql-bugs@postgresql.org; Tue, 19 Feb 2013 12:42:43 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 41CD528426; Tue, 19 Feb 2013 04:42:41 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 3CF7318762; Tue, 19 Feb 2013 04:42:41 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 68A8E1219B4; Tue, 19 Feb 2013 04:45:47 -0800 (PST) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-1.vmware.com Received: from zcs-prod-ext-mta-1.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-1.vmware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20Zi4VsZOixv; Tue, 19 Feb 2013 04:45:47 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 3DF46121993; Tue, 19 Feb 2013 04:45:47 -0800 (PST) Received: from [192.168.1.90] (unknown [10.113.62.14]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Tue, 19 Feb 2013 04:45:46 -0800 (PST) Message-ID: <5123733A.1090904@vmware.com> Date: Tue, 19 Feb 2013 14:42:34 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Rafael Martinez CC: Tom Lane , pgsql-bugs@postgresql.org Subject: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on References: <22797.1361267670@sss.pgh.pa.us> <512350D9.5010609@usit.uio.no> <23409.1361269278@sss.pgh.pa.us> <51235ADF.3090109@usit.uio.no> <24570.1361272371@sss.pgh.pa.us> <512370B7.6030805@usit.uio.no> In-Reply-To: <512370B7.6030805@usit.uio.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.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 On 19.02.2013 14:31, Rafael Martinez wrote: > In the way pg_rotate_logfile() and log_truncate_on_rotation = on work > today, we have to stop postgres to truncate the log file if an > unexpected situation happens and this is not always possible in a > production system. > > If we need to run pg_rotate_logfile() manually in the middle of the > month and we don't want to lose the data in the file that is going to > be truncated, we will have to take a manual copy of it before running > pg_rotate_logfile(). You can rm the log file, then do pg_rotate_logfile(). No need to stop the system. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs