From: Ragnar Kjørstad <postgres@ragnark.vestdata.no>
To: Chris Ryan <chris@greatbridge.com>
Cc: Mitch Vincent <mitch@venux.net>
Cc: The Hermit Hacker <scrappy@hub.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: [7.0.2] rotating log files ...
Date: Mon, 28 Aug 2000 21:23:13 +0200
Message-ID: <20000828212313.A19112@vestdata.no> (raw)
In-Reply-To: <39AAB001.59903034@greatbridge.com>
References: <Pine.BSF.4.21.0008281456510.564-100000@thelab.hub.org>
<00c501c0111d$7e1dcd60$0200000a@doot>
<39AAB001.59903034@greatbridge.com>
On Mon, Aug 28, 2000 at 02:31:29PM -0400, Chris Ryan wrote:
> It's not normally a good idea to move/remove files that a process has an
> open file handle for. The safest way is to copy the file to a new
> location/name then cat /dev/null > logfile
What's wrong with moving the file when it's in use?
Copying the file will take much longer, and you might loose log-entries
that are written after cp but before truncate.
--
Ragnar Kjorstad
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-admin@postgresql.org
Cc: postgres@ragnark.vestdata.no, chris@greatbridge.com, mitch@venux.net, scrappy@hub.org
Subject: Re: [7.0.2] rotating log files ...
In-Reply-To: <20000828212313.A19112@vestdata.no>
References: <Pine.BSF.4.21.0008281456510.564-100000@thelab.hub.org> <00c501c0111d$7e1dcd60$0200000a@doot> <39AAB001.59903034@greatbridge.com> <20000828212313.A19112@vestdata.no>
* 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