Re: PostgreSQL lock file

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PostgreSQL lock file
Дата
Msg-id 4820.1565361116@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PostgreSQL lock file  (Олег Самойлов <splarv@ya.ru>)
Ответы Re: PostgreSQL lock file  (Олег Самойлов <splarv@ya.ru>)
Список pgsql-general
=?utf-8?B?0J7Qu9C10LMg0KHQsNC80L7QudC70L7Qsg==?= <splarv@ya.ru> writes:
> I have a task to create HA PostgreSQL cross datacenter cluster. I created a test bed on VirtualBox and I simulate
differentfailures and disastrous in loops. And got one of funny bug of the Postgresql (11.4). One of the clusters has
twoinstances of PostgreSQL on port 5433 and 5434. After simulating unexpected power off of the node the lock files of
PostgreSQLstill exist in /tmp directory. And on recovery the first instance on port 5433 starts without problem, but
thesecond instance sometimes not. The reason is that the PID in /tmp/.s.PGSQL.5434.lock sometimes point to the one of
processof PostgereSQL on port 5433, for instance the logger. 

Best practice for this sort of thing is considered to be to run the two
Postgres instances under different user IDs.  That avoids them thinking
that the other one's lock files are relevant, and it provides an extra
layer of security against possible conflicts between the two instances.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL 8.4 Tablespace Inconsistency
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Generate test data inserts - 1GB