Re: heap_abort_speculative() sets xmin to Invalid* without HEAP_XMIN_INVALID

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: heap_abort_speculative() sets xmin to Invalid* without HEAP_XMIN_INVALID
Date: 2020-07-23 21:49:09
Message-ID: 20200723214909.GA19828@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-Jul-23, Andres Freund wrote:

> I think we should change heap_abort_speculative() to set
> HEAP_XMIN_INVALID in master.

+1

> But we can't really do anything about
> existing tuples without it - therefore we will have to forever take care
> about encountering that combination :(.
>
> Perhaps we should instead or additionally make
> HeapTupleHeaderXminInvalid() explicitly check for InvalidTransactionId?

+1 for doing it as an additional fix, with a fat comment somewhere
explaining where such tuples would come from.

Additionally, but perhaps not very usefully, maybe we could have a
mechanism to inject such tuples so that code can be hardened against the
condition.

--
Álvaro Herrera https://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 Peter Geoghegan 2020-07-23 23:32:07 Re: Default setting for enable_hashagg_disk
Previous Message Andres Freund 2020-07-23 21:09:54 Re: Making CASE error handling less surprising