From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions |
Date: | 2018-01-19 19:16:46 |
Message-ID: | 3169db59-0452-8103-647c-9da5118387ef@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/19/2018 06:54 PM, Robert Haas wrote:
> On Tue, Dec 26, 2017 at 9:21 AM, Nikhil Sontakke
> <nikhils(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-01-19 19:33:52 | Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions |
Previous Message | Alvaro Herrera | 2018-01-19 19:10:16 | Re: pgsql: Local partitioned indexes |