Re: server auto-restarts and ipcs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: server auto-restarts and ipcs
Дата
Msg-id 14346.1099971715@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: server auto-restarts and ipcs  ("Ed L." <pgsql@bluepolka.net>)
Ответы Re: server auto-restarts and ipcs  ("Ed L." <pgsql@bluepolka.net>)
Re: server auto-restarts and ipcs  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
"Ed L." <pgsql@bluepolka.net> writes:
> A power failure led to failed postmaster restart using 7.4.6 (see
> output below).  The short-term fix is usually to delete the pid file
> and restart.

Thinking some more about this ... does anyone know the algorithm used
in Linux to assign shared memory segment IDs?

Your report shows about a dozen shmem segments in use; which would put
the probability of an accidental collision at pretty-tiny.  But if the
kernel's assignment algorithm is nonrandom then it'd be plausible for
the Postgres shmem ID from the previous system boot cycle to match
one of the shmem IDs already handed out in the current boot cycle.
In that case we'd get EACCES from shmctl() which we take to be a trouble
indication.  (This is probably over-conservatism, but I don't want to
relax it without knowing for sure that we need to.)

BTW, do you know what all those shmem segments are for?  My Linux box
shows only one segment in use besides the ones Postgres is using.

            regards, tom lane

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

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Per-Table Transaction Isolation Level?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Per-Table Transaction Isolation Level?