Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSZUt-0000U5-Ic for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Jul 2016 00:48:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bSZUs-0004Cf-K3 for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Jul 2016 00:48:22 +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 1bSZUF-0003Ue-HL for pgsql-bugs@postgresql.org; Thu, 28 Jul 2016 00:47:43 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bSZUC-0002Vz-Uo for pgsql-bugs@postgresql.org; Thu, 28 Jul 2016 00:47:43 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0BFD120592; Wed, 27 Jul 2016 20:47:39 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Wed, 27 Jul 2016 20:47:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=M8Kb+myIr9GsHTPM5XK+d3H466U=; b=l/Yim p2Zyd81rJDK40F6FHxbNHIYbbt1xysYTGqwfMlkNG20MmdD2qplyWvZ6fe6kzMYd Ns2pxpfKrxn0APoOjaB24wXDYQlCFM66xqMilk0LRb8Htj3ArstnQq3tGgEJM2/S /EDXTeVbyhmhg0pPxyfNMnXnqMJhXa+RCIJUbs= X-Sasl-enc: Ww3RNvhdMO5n58qfWiJXjjsifQplHINuaImCmlFTXgFS 1469666858 Received: from intern.anarazel.de (somacentral1.static.monkeybrains.net [162.217.75.74]) by mail.messagingengine.com (Postfix) with ESMTPA id A2E7DCC021; Wed, 27 Jul 2016 20:47:38 -0400 (EDT) Date: Wed, 27 Jul 2016 17:47:37 -0700 From: Andres Freund To: Oskari Saarenmaa Cc: Peter Geoghegan , Michael Paquier , Peter Tripp , Virendra Negi , pgsql-bugs Subject: Re: BUG #14150: Attempted to delete invisible tuple Message-ID: <20160728004737.5x5pakboh24234j6@alap3.anarazel.de> References: <88248a24-47d1-d575-a63f-2b56a09f82e2@aiven.io> <62f3793f-13d6-567c-e512-f29d1fd76d00@aiven.io> <20160706214024.4bl2q3skcio4eoqk@alap3.anarazel.de> <6e259534-eb94-0319-dace-ee83d9535a86@aiven.io> <20160727235347.odtjfrsrjdrlolfv@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160727235347.odtjfrsrjdrlolfv@alap3.anarazel.de> X-Pg-Spam-Score: -2.6 (--) 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 On 2016-07-27 16:53:47 -0700, Andres Freund wrote: > On 2016-07-07 22:43:59 +0300, Oskari Saarenmaa wrote: > > 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. > > Maybe I'm missing something, but toasted columns aren't actually marked > as speculative right now, no? Cf. > > HeapTuple > toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup, > int options) > .. > /* > * Ignore the INSERT_SPECULATIVE option. Speculative insertions/super > * deletions just normally insert/delete the toast values. It seems > * easiest to deal with that here, instead on, potentially, multiple > * callers. > */ > options &= ~HEAP_INSERT_SPECULATIVE; > > so going through heap_abort_speculative()/heap_delete_speculative() > doesn't look right to me. We could change thing so toasted rows also > get inserted speculatively - but I don't see much of a point. > > > +void > > +heap_delete_speculative(Relation relation, ItemPointer tid, bool is_toast) > > +{ > > If we go this way, it seems easier to get is_toast from > IsToastRelation(relation), rather than hand it through painstakingly. Oh, and this desperately needs a minimal test. Shouldn't be hard to do with isolationtester. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs