Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical Decoding and HeapTupleSatisfiesVacuum assumptions
Date: 2018-01-29 13:49:56
Message-ID: CANP8+jLZbsgV3ByfFXbwTmcN+nRCWJvcjqk545m_eFeiAOXsPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29 January 2018 at 13:34, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2018-01-29 14:01:47 Re: [HACKERS] WIP: Aggregation push-down
Previous Message Arthur Zakirov 2018-01-29 13:41:04 Re: [HACKERS] [PATCH] Generic type subscripting