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

From Peter Geoghegan
Subject Re: BUG #14150: Attempted to delete invisible tuple
Date
Msg-id CAM3SWZTEfeG3r2OibYFu_UQpC=8B328m2U=XCNc3bgP5UMYE7g@mail.gmail.com
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  (Peter Tripp <peter@chartio.com>)
Re: BUG #14150: Attempted to delete invisible tuple  (Peter Geoghegan <pg@heroku.com>)
List pgsql-bugs
On Tue, Jun 7, 2016 at 6:41 PM, Peter Geoghegan <pg@heroku.com> wrote:
> Does your test case also use foreign keys?

It's clearly in evidence that there is some kind of delete involved
here, possibly from a cascading foreign key. That's because the error
message "attempted to delete invisible tuple" is not one that is
reachable from a simple ON CONFLICT DO UPDATE. (Yes, it's true that
heap_abort_speculative() performs something pretty close when there's
lots of concurrency -- it performs what I've called a "super deletion"
-- but its equivalent "can't happen" error message is not what we see
here.)

So, if it's not coming from a cascading foreign key, as I suspect,
then it's definitely coming from some other user-visible delete
(Something that can reach heap_delete(), very probably through
ExecDelete()). I'm very curious about what that is.

--
Peter Geoghegan

pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: BUG #14150: Attempted to delete invisible tuple
Next
From: Michael Paquier
Date:
Subject: Re: BUG #14178: output of jsonb_object and json_object doesn't match textually