Re: is it possible to delete the psql log while psql is - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: is it possible to delete the psql log while psql is
Date
Msg-id 20051208140452.GB25312@svana.org
Whole thread Raw
In response to Re: is it possible to delete the psql log while psql is  (Csaba Nagy <nagy@ecircle-ag.com>)
Responses Re: is it possible to delete the psql log while psql is
List pgsql-general
On Thu, Dec 08, 2005 at 02:43:44PM +0100, Csaba Nagy wrote:
> Gabor,
>
> Short answer: you'll have to restart.
>
> Long answer:
> It depends a lot on your OS... on windows I bet you can't delete it, the
> OS will prevent you to do it (you'll get some error).

Note: on Linux I've had success with simply truncating the file using:

: > [filename]

This does free up the space used straightaway. Depending on the mode
the file was opened with it may also reset the position the postmaster
writes at.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Mike Rylander
Date:
Subject: Re: Memory Leakage Problem
Next
From: Csaba Nagy
Date:
Subject: Re: is it possible to delete the psql log while psql is