Re: [GENERAL] Socket file lock

Поиск
Список
Период
Сортировка
От ^chewie
Тема Re: [GENERAL] Socket file lock
Дата
Msg-id Pine.LNX.4.10.9911231154180.6016-100000@guinness.urw.org
обсуждение исходный текст
Ответ на [GENERAL] Socket file lock  (Fabian.Frederick@prov-liege.be)
Список pgsql-general
On Tue, 23 Nov 1999 Fabian.Frederick@prov-liege.be wrote:

> Sometimes I've got some core socket file in /tmp.However Postgres
> leaved correctly in previous shutdown : / What would be the best way
> to avoid this. (The big big problem is that postmaster can't be
> launched due to that core).

I am not versed in the mannerisms or options of Postgresql quite yet, so
bear with me if there is another more suited approach to this problem.
If you're talking about a /tmp file, you are obviously running this on a
*NIX based system.  I use Debian Linux, so my background with the
scripts to launch Postgresql stem from my familiarity with this
distribution, and subsequently the SysV standard for init.d scripts.

To launch Postgresql, I use the script found in /etc/init.d.  I have
found it a fairly nominal task to include a 'cleanup()' function in the
init.d script.  Something to the effect of:

#!/bin/sh

cleanup() {
    for i in /tmp/<insert string match for socket file> ; do
        rm -rf ${i}
    done
}

This you can include as the first line under each of the case statements
of start, stop, restart, reload, etc...

^chewie


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Re: Is PostgreSQL ready for ...
Следующее
От: ^chewie
Дата:
Сообщение: PL/pgsql or C/C++