Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
Дата
Msg-id 3169db59-0452-8103-647c-9da5118387ef@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 01/19/2018 06:54 PM, Robert Haas wrote:
> On Tue, Dec 26, 2017 at 9:21 AM, Nikhil Sontakke
> <nikhils@2ndquadrant.com> wrote:
>> The main issue here is that HeapTupleSatisfiesVacuum *assumes* that
>> rows belonging to an aborted transaction are not visible to anyone
>> else.
> 
> One problem here is that if a transaction aborts, it might have done
> so after inserting or update a tuple in the heap and before inserting
> new index entries for the tuple, or after inserting only some of the
> necessary new index entries.  ... [snip] ...
>

I think an important piece of this puzzle is that we only really care
about catalog changes made in a transaction that aborts after doing some
additional changes, with that catalog tuple in place. Because only then
we actually need that catalog tuple in order to interpret the changes.

AFAICS that guarantees the catalog changes were not interrupted half-way
through, leaving some of the catalogs in inconsistent state.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgsql: Local partitioned indexes
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions