Re: BUG #14150: Attempted to delete invisible tuple - Mailing list pgsql-bugs

From Oskari Saarenmaa
Subject Re: BUG #14150: Attempted to delete invisible tuple
Date
Msg-id 6e259534-eb94-0319-dace-ee83d9535a86@aiven.io
Whole thread Raw
In response to Re: BUG #14150: Attempted to delete invisible tuple  (Peter Geoghegan <pg@heroku.com>)
Responses Re: BUG #14150: Attempted to delete invisible tuple
Re: BUG #14150: Attempted to delete invisible tuple
List pgsql-bugs
07.07.2016, 05:15, Peter Geoghegan kirjoitti:
> Maybe heap_abort_speculative() should be refactored to call another
> function, and keep only the parts that specifically expect a
> HeapTupleHeaderIsSpeculative() tuple. The function that it is made to
> call (that consists of the majority of the current
> heap_abort_speculative() implementation) could also be called by a
> special super deletion variant of toast_delete(). No need to spread
> knowledge about speculative insertion any further this way, AFAICT.
> The UPSERT commit did modify two HeapTupleSatisfies* routines, but
> that didn't include HeapTupleSatisfiesUpdate() (just
> HeapTupleSatisfiesDirty(), and the aforementioned defensive code in
> HeapTupleSatisfiesToast()).
>
> What do you think of this outline, Oskari and Andres?

Something like the attached patch?  It still modifies the toast_delete
API, but we could also implement a new speculative-tuple-aware version
of it if that's a concern.

/ Oskari

Attachment

pgsql-bugs by date:

Previous
From: bricklen
Date:
Subject: Re: Where clause in pg_dump: need help
Next
From: Julien Rouhaud
Date:
Subject: Re: BUG #14233: getting the size if the database failing with permission denied error