Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
Date
Msg-id 3169db59-0452-8103-647c-9da5118387ef@2ndquadrant.com
Whole thread Raw
In response to Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Local partitioned indexes
Next
From: Robert Haas
Date:
Subject: Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions