From: Peter Tripp <peter@chartio.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #14150: Attempted to delete invisible tuple
Date: Tue, 7 Jun 2016 21:09:47 -0700
Message-ID: <C5DBB6DE-6669-40B8-A3FF-218A513F8AA2@chartio.com> (raw)
In-Reply-To: <CAM3SWZTEfeG3r2OibYFu_UQpC=8B328m2U=XCNc3bgP5UMYE7g@mail.gmail.com>
References: <CACOLnRXL-EZ2wwdxq3=mrTL5BL21wLu5Z_KUHuMJCcVU1kPf5A@mail.gmail.com>
<CAM3SWZS4JkRZbGfOpxPgmqqTYdfYrF+E7ihBqFwyw3dyzdqNzA@mail.gmail.com>
<CAM3SWZTEfeG3r2OibYFu_UQpC=8B328m2U=XCNc3bgP5UMYE7g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
There is no foreign key, but you are correct there is a codepath which can result in a delete statement being executed:
DELETE FROM cache WHERE key=
-Pete
>> On Jun 7, 2016, at 7:00 PM, Peter Geoghegan <pg@heroku.com> wrote:
>>
>> 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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: peter@chartio.com
Subject: Re: BUG #14150: Attempted to delete invisible tuple
In-Reply-To: <C5DBB6DE-6669-40B8-A3FF-218A513F8AA2@chartio.com>
References: <CACOLnRXL-EZ2wwdxq3=mrTL5BL21wLu5Z_KUHuMJCcVU1kPf5A@mail.gmail.com> <CAM3SWZS4JkRZbGfOpxPgmqqTYdfYrF+E7ihBqFwyw3dyzdqNzA@mail.gmail.com> <CAM3SWZTEfeG3r2OibYFu_UQpC=8B328m2U=XCNc3bgP5UMYE7g@mail.gmail.com> <C5DBB6DE-6669-40B8-A3FF-218A513F8AA2@chartio.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox