Re: is it possible to delete the psql log while psql is

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Gábor Farkas <gabor(at)nekomancer(dot)net>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: is it possible to delete the psql log while psql is
Date: 2005-12-08 13:43:44
Message-ID: 1134049424.4779.259.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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).
On Linux you can delete it, but the postgres server will still use it
even if you can't access it anymore (won't show up with ls)... the file
will be really deleted when the postgres server process dies. The only
effect you'll achieve is that you won't be able to access it anymore...
And if you want to do it for freeing up disk space, it won't do that.
So you better set up some kind of log rotation (I think you can do it
from the postgres config file), and restart your server.

Cheers,
Csaba.

On Thu, 2005-12-08 at 11:28, Gábor Farkas wrote:
> hi,
>
> i'd like to delete the postgresql log file
> (resides in /var/log/pgsql/postgres),
> because it has become too big.
>
> can i simply delete the file while postres is running?
>
> or do i have to stop postgres first, and only delete the logfile after that?
>
> thanks,
> gabor
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Rylander 2005-12-08 14:00:06 Re: Memory Leakage Problem
Previous Message Devrim GUNDUZ 2005-12-08 12:34:44 Re: how to check if a database exists programatically