Re: Failure while inserting parent tuple to B-tree is not fun

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Failure while inserting parent tuple to B-tree is not fun
Дата
Msg-id 3673.1382469880@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Failure while inserting parent tuple to B-tree is not fun  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Failure while inserting parent tuple to B-tree is not fun  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Re: Failure while inserting parent tuple to B-tree is not fun  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-10-22 21:29:13 +0300, Heikki Linnakangas wrote:
>> We could put a critical section around the whole recursion that inserts the
>> downlinks, so that you would get a PANIC and the incomplete split mechanism
>> would fix it at recovery. But that would hardly be an improvement.

> For me this clearly *has* to be in a critical section with the current
> code. I had always assumed all multi-part actions would be.

No, that's hardly a good idea.  As Heikki says, that would amount to
converting an entirely foreseeable situation into a PANIC.

Note also that the problem might be persistent, eg if you're out of disk
space.  In that case, you'd just get the PANIC again at recovery, so now
not only have you crashed all your sessions but you have a database that
won't start up.

I wonder whether Heikki's approach could be used to remove the need for
the incomplete-split-fixup code altogether, thus eliminating a class of
recovery failure possibilities.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Reasons not to like asprintf
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Location for external scripts for Extensions?