Re: BUG #14150: Attempted to delete invisible tuple

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Oskari Saarenmaa <os(at)aiven(dot)io>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Peter Tripp <peter(at)chartio(dot)com>, Virendra Negi <virendra(at)idyllic-software(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14150: Attempted to delete invisible tuple
Date: 2016-07-18 02:08:25
Message-ID: CAA4eK1+3T9ZJ8JYV=HVisUQHOttH3L=VDzkQnE0O7k__BECwEg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jul 18, 2016 at 5:42 AM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Sat, Jul 16, 2016 at 10:14 PM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>> 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()).
>>>
>>
>> IIUC, then I think you are proposing to have an API (something like
>> heap_delete_minimal) which will workout well for both heap and toast
>> tuples with respect to heap_abort_speculative(). I think to solve
>> this issue, the approach you outlined above seems to be better than
>> what's being done in Oskari's patch. The advantage of this approach
>> is that it will save us from touching HeapTupleSatisfiesUpdate and
>> will do the minimal things (like excluding the replica identity &
>> replication origin information from WAL) required for deletion of
>> toast tuples.
>
> Right, but Oskari's latest revision of the patch is a response to this
> feedback, which I'm happy with.
>

I have somehow missed that e-mail. I don't know why, but I could not
see any of the Oskari's e-mail in this thread in my gmail inbox. I
have to check that via postgresql.org [1].

[1] - https://www.postgresql.org/list/pgsql-bugs

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2016-07-18 02:16:44 Re: BUG #14254: The postgres service goes down while working with the application
Previous Message Peter Geoghegan 2016-07-18 00:12:50 Re: BUG #14150: Attempted to delete invisible tuple