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

From Simon Riggs
Subject Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
Date
Msg-id CANP8+jLZbsgV3ByfFXbwTmcN+nRCWJvcjqk545m_eFeiAOXsPQ@mail.gmail.com
Whole thread Raw
In response to Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
List pgsql-hackers
On 29 January 2018 at 13:34, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:

> The important detail is that we only really care
> about aborts in transactions that modified catalogs in some way (e.g. by
> doing DDL). But we can safely decode (and stream) changes up to the
> point when the catalogs get modified, so we can do two different things
> at that point:

Safely? Hmm.

I think what we are missing here is a test case, or a detailed
description of what we think happens. I can't see why a concurrent
abort would be unsafe, as in, it would make decoding explode.

If all it does is give the wrong answer when we process DDL, then all
we have to do is check for abort before and after we process any DDL
during decoding. Handling DDL is rare, so that test won't cost much in
terms of handling DDL. So ISTM that we can continue decoding after we
hit DDL, we just need some care.

(My earlier comments were based on the idea that 2PC patch would
simply block aborts, which of course will not work for streaming,
hence the difference)

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


pgsql-hackers by date:

Previous
From: Arthur Zakirov
Date:
Subject: Re: [HACKERS] [PATCH] Generic type subscripting
Next
From: Chapman Flack
Date:
Subject: Re: [HACKERS] WIP: Aggregation push-down