Re: VM map freeze corruption

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: VM map freeze corruption
Дата
Msg-id CABOikdNzi8qTJ=kn3NBE3=Lxvijw5vT+BhGJ7qvzpDrA_6abOA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: VM map freeze corruption  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: VM map freeze corruption  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers


On Wed, Apr 18, 2018 at 7:06 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:


IMO the cause is the totally_frozen variable, which starts life in a
bogus state (true) and the different code paths can set it to the right
state, or by inaction end up deciding that the initial bogus state was
correct in the first place.  Errors of omission are far too easy in that
kind of model, ISTM, so I propose this slightly different patch, which
albeit yet untested seems easier to verify and easier to get right.

I wonder if we should just avoid initialising those variables at the top and take compiler's help to detect any missed branches. That way, we shall know exactly why and where we are making them true/false. I also think that we should differentiate between scenarios where xmin/xmax is already frozen and scenarios where we are freezing them now.

I come up with attached. Not fully polished (and there is a XXX that I left for comments), but hopefully enough to tell what I am thinking. Do you think it's any improvement or actually makes the problem worse?

Thanks,
Pavan

--
 Pavan Deolasee                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
Вложения

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Corrupted btree index on HEAD because of covering indexes
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Corrupted btree index on HEAD because of covering indexes