Re: How to shoot yourself in the foot: kill -9 postmaster

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to shoot yourself in the foot: kill -9 postmaster
Дата
Msg-id 7350.983910059@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to shoot yourself in the foot: kill -9 postmaster  (Alfred Perlstein <bright@wintelcom.net>)
Список pgsql-hackers
Alfred Perlstein <bright@wintelcom.net> writes:
> Of course not, the size of the struct changed (short->unsigned
> long, basically int16_t -> uint32_t), because the kernel and userland
> in Linux are hardly in sync you have the fun of guessing if you
> get:

> old struct -> old syscall (ok)
> new struct -> old syscall (boom)
> old struct -> new syscall (boom)
> new struct -> new syscall (ok)

Ugh.  However, it looks like it might be fairly fail-soft: if we
have the wrong declaration then we pick up some other field of the
struct, and probably end up complaining because nattch appears nonzero.
Recovery method (clean up the shm seg or delete lockfile) is the same.

I'm still inclined to go with this; it beats corrupting the WAL log,
and the fcntl(SETLK) alternative has its own set of portability
booby-traps.
        regards, tom lane


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

Предыдущее
От: Alfred Perlstein
Дата:
Сообщение: Re: How to shoot yourself in the foot: kill -9 postmaster
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: epoch