Re: [HACKERS] [COMMITTERS] pgsql: Fix traversal of half-frozen update chains

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [HACKERS] [COMMITTERS] pgsql: Fix traversal of half-frozen update chains
Дата
Msg-id CAH2-Wzk+DPggeCamv=kJ6zNocGMsOoEgJkFL6eTz3qx+jvq41A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [COMMITTERS] pgsql: Fix traversal of half-frozen update chains  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Fri, Oct 13, 2017 at 4:54 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> I haven't really followed this thread in depth, but I'm very nervous
> about the idea that we should ever be examining the raw-xmin of a
> tuple that has been marked HEAP_XMIN_FROZEN for anything other than
> forensic purposes.

I'm nervous about it as well. These problems are very difficult to reason about.

> The design principle I followed in writing the
> original patch was that marking a tuple HEAP_XMIN_FROZEN was identical
> to setting the xmin to 2 except that the original xmin was still
> available for manual inspection.

I did point this out myself.

> If we're finding that we need the
> raw xmin after freezing, doesn't that mean that our freezing algorithm
> was flat busted prior to that commit?

I wouldn't put it that way at all. That commit provided us with the
opportunity to put in a better fix for a problem with update chain
traversal, a problem that was particularly critical when certain HOT
pruning + freezing races occur (the "failed to find parent tuple"
thing). It's clear that freezing was just as busted before and after
that commit, though.

> And maybe still busted when
> things wrap around multiple times and raw-xmins are reused?

I'm more concerned about the situation that will remain (or has now
been created) on 9.3, where we don't have raw xmin, and so must use
very forgiving FrozenTransactionId matching within
HeapTupleUpdateXmaxMatchesXmin().

-- 
Peter Geoghegan


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: [HACKERS] relkind check in DefineIndex
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pgsql: Avoid coercing a whole-row variable that is already coerced