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

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: is it possible to delete the psql log while psql is
Дата
Msg-id 1134049424.4779.259.camel@coppola.muc.ecircle.de
обсуждение исходный текст
Ответ на is it possible to delete the psql log while psql is running?  (Gábor Farkas <gabor@nekomancer.net>)
Ответы Re: is it possible to delete the psql log while psql is  (Martijn van Oosterhout <kleptog@svana.org>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Gábor Farkas
Дата:
Сообщение: is it possible to delete the psql log while psql is running?
Следующее
От: Mike Rylander
Дата:
Сообщение: Re: Memory Leakage Problem