Re: bgwriter never dies

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bgwriter never dies
Дата
Msg-id 9142.1077771701@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bgwriter never dies  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: bgwriter never dies  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> I'm not event sure I'd go with the rollback; whatever killed the PM may 
> make the rest of the system unstable. I'd prefer to see the transactions 
> rolled back (if necessary) as part of the log recovery on PM startup, not 
> by possibly dying PG proceses.

Well, in the first place "rollback" is not an explicit action in
Postgres; you're thinking of Oracle or some other old-line technology.
There's nothing that has to happen to undo the effects of a failed
transaction.

But my real problem with the above line of reasoning is that there is
no basis for assuming that a postmaster failure has anything to do with
problems at the backend level.  We have always gone out of our way to
ensure that the postmaster is disconnected from backend failure causes
--- it doesn't touch any but the simplest shared-memory datastructures,
for example.  This design rule exists mostly to try to ensure that the
postmaster will survive backend crashes, but the effects cut both ways:
there is no reason that a backend won't survive a postmaster crash.
In practice, the few postmaster crashes I've seen have been due to
localized bugs in postmaster-only code or a Linux kernel randomly
seizing on the postmaster as the victim for an out-of-memory kill.
I have never seen the postmaster crash as a result of backend-level
problems, and if I did I'd be out to fix it immediately.

So my opinion is that "kill all the backends when the postmaster
crashes" is a bad idea that will only result in a net reduction in
system reliability.  There is no point in building insulated independent
components if you then put in logic to force the system uptime to be the
minimum of the component uptimes.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CVS HEAD compile warning
Следующее
От: Tom Lane
Дата:
Сообщение: Re: simple make check failures