Skip site navigation (1) Skip section navigation (2)

Re: [7.0.2] rotating log files ...

From: Ragnar Kjørstad <postgres(at)ragnark(dot)vestdata(dot)no>
To: Chris Ryan <chris(at)greatbridge(dot)com>
Cc: Mitch Vincent <mitch(at)venux(dot)net>, The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: [7.0.2] rotating log files ...
Date: 2000-08-28 19:23:13
Message-ID: 20000828212313.A19112@vestdata.no (view raw or flat)
Thread:
Lists: pgsql-admin
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

In response to

Responses

pgsql-admin by date

Next:From: Dana HudesDate: 2000-08-28 19:53:11
Subject: Re: [7.0.2] rotating log files ...
Previous:From: Dana HudesDate: 2000-08-28 18:36:21
Subject: Re: [7.0.2] rotating log files ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group