pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Rafael Martinez <r.m.guerrero@usit.uio.no>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
Date: Tue, 19 Feb 2013 14:42:34 +0200
Message-ID: <5123733A.1090904@vmware.com> (raw)
In-Reply-To: <512370B7.6030805@usit.uio.no>
References: <E1U7PZN-0000zg-NC@wrigleys.postgresql.org>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (11+ messages)

Message-ID: <5123733A.1090904@vmware.com>
Permalink:  ../5123733A.1090904@vmware.com/
Also on:    postgresql.org/message-id/5123733A.1090904@vmware.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: hlinnakangas@vmware.com, r.m.guerrero@usit.uio.no, tgl@sss.pgh.pa.us
  Subject: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
  In-Reply-To: <5123733A.1090904@vmware.com>
  References: <E1U7PZN-0000zg-NC@wrigleys.postgresql.org> <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> <5123733A.1090904@vmware.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox