Re: always forced restart after status 139?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: always forced restart after status 139?
Дата
Msg-id 1028.1016480837@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: always forced restart after status 139?  ("Jason Williams" <jwilliams@wc-group.com>)
Ответы Re: always forced restart after status 139?  ("Jason Williams" <jwilliams@wc-group.com>)
Список pgsql-general
"Jason Williams" <jwilliams@wc-group.com> writes:
> The problem is this:  we are planning to make this database for a commercial
> website that will handle financial transactions.  What will happen if the
> database receives a seg fault and another user of the database is in the
> middle of submitting a "critical" update?  I'm assuming it will rollback
> gracefully?

The seg fault as such is not a problem.  What concerns me a tad is that
your buggy C extension may scribble on shared-memory disk buffers at
some point before it causes an outright crash.  If corrupted data
manages to get written to disk before the backend crash and ensuing
restart, there's no guarantee we can clean it up.  The odds of this are
probably not high (assuming you use conservatively-sized shared buffers,
rather than a large fraction of your address space as some here have
been known to suggest) ... but they're not zero.

I concur with Dominic: fix your extension *before* you put it in
production, not after.  If you don't have confidence in your ability
to get the bugs out then maybe you shouldn't be writing C functions.
The interpreted PLs are a great deal safer.

            regards, tom lane

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

Предыдущее
От: "Dominic J. Eidson"
Дата:
Сообщение: Re: always forced restart after status 139?
Следующее
От: "Jason Williams"
Дата:
Сообщение: Re: always forced restart after status 139?