Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAUoc-0000u0-Kf for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jun 2016 04:10:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bAUob-0000fg-HV for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Jun 2016 04:10:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bAUoZ-0000fA-Ls for pgsql-bugs@postgresql.org; Wed, 08 Jun 2016 04:09:59 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bAUoR-0007kW-P2 for pgsql-bugs@postgresql.org; Wed, 08 Jun 2016 04:09:58 +0000 Received: by mail-pa0-x232.google.com with SMTP id bz2so52374132pad.1 for ; Tue, 07 Jun 2016 21:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chartio.com; s=google; h=subject:mime-version:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=8Juvt46eucbiqv1NKfOP0gBpybQiEPWYZIICXSBcTyg=; b=XVcWy4gv4diYjVGbPxGuu1bjX4uCFkSqdUV4O/bGkbO1PUI86SdY+ApzpCW8ZJ4P1p wnt1QMV+YPDUDI0yJ2xTYDP6ytPh0Uk4SjyWkXEUZdLkK199Mc91bnpdP0bT2Wz0qis0 vzBm5sG4l7UNglVwxUuGixAsvJOqR0MR81teM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=8Juvt46eucbiqv1NKfOP0gBpybQiEPWYZIICXSBcTyg=; b=mzJ7wQmhB6JzglBaeramBM9FtBS3yMH9g0AQItAhCVvhR+Gr9oB0sW/rWpeJROlhW3 jMuZ4/F+PW1DJkcZKbmep4weunIpVsASJqBanE6oepp9RhxSlx4zUrgfLg628kK6b0ec IM1FHwKKa9a02kNMuk7KLVRRbUUqULg+KEPXok2uo3hlVoP0FA+HFIm5Hva+ZWJKm5oT XlcrqW8PeOzqIutzjnlrL6r231vDf5qAnt+OsNnAYXwooiXAHZtS+NRGFjXJRT8k+jUm oaxKKkHFzlY3h3la3IWajckKyPgfHfkuL+4e1llcuO9niQnePvSIE5IjvJBfgX0se2BA hHyg== X-Gm-Message-State: ALyK8tLEjvdBz1bnssMSjpDw/bnYuVYGLw1Rs228RX2pEBxlm8g4aXpefDm3zs5M1Ms9fNGe X-Received: by 10.66.84.164 with SMTP id a4mr3339812paz.90.1465358989072; Tue, 07 Jun 2016 21:09:49 -0700 (PDT) Received: from ?IPv6:2600:1010:b060:b5a9:d003:6d42:bcee:db80? ([2600:1010:b060:b5a9:d003:6d42:bcee:db80]) by smtp.gmail.com with ESMTPSA id d184sm38633246pfc.56.2016.06.07.21.09.48 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Jun 2016 21:09:48 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Subject: Re: BUG #14150: Attempted to delete invisible tuple Mime-Version: 1.0 (1.0) X-Mailer: iPhone Mail (13F69) From: Peter Tripp In-Reply-To: Date: Tue, 7 Jun 2016 21:09:47 -0700 Content-Transfer-Encoding: quoted-printable Received: from [100.88.67.245] (229.sub-70-213-7.myvzw.com. [70.213.7.229]) by smtp.gmail.com with ESMTPSA id m65sm17428504pfm.91.2016.06.07.20.40.00 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Jun 2016 20:40:00 -0700 (PDT) Message-Id: References: To: pgsql-bugs@postgresql.org X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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=3D -Pete >> On Jun 7, 2016, at 7:00 PM, Peter Geoghegan wrote: >>=20 >> On Tue, Jun 7, 2016 at 6:41 PM, Peter Geoghegan wrote: >> Does your test case also use foreign keys? >=20 > 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.) >=20 > 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. >=20 > --=20 > Peter Geoghegan --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs