Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSYeo-0006Oy-0R for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Jul 2016 23:54:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bSYen-0008JF-IO for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Jul 2016 23:54:33 +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 1bSYe9-0007Zz-LY for pgsql-bugs@postgresql.org; Wed, 27 Jul 2016 23:53:53 +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 1bSYe7-0001cL-1G for pgsql-bugs@postgresql.org; Wed, 27 Jul 2016 23:53:53 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id AC6F620463; Wed, 27 Jul 2016 19:53:49 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Wed, 27 Jul 2016 19:53:49 -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=nsA3PUamWBZICVqBl7lHUKykj50=; b=qgXyr kzzrXaYKKuqH5HyjklojqaLCHAtF1B+VTsIQs4Vt9NRdfARmsIast/xeffwFNi/C s41CaV7QrS2BW4eX81WZyW8d4DG/rARGsLTMEINqMRkQO/YM2WoJfgER37BCe4aS Sc1qqRG7ahK/ei3JEAWhWpl0JMlW0uTrj3ICHY= X-Sasl-enc: wjEP3XFxYq+iEkc6QEFTnHT621PtaCt+460Kk4Q4Xb1w 1469663629 Received: from intern.anarazel.de (somacentral1.static.monkeybrains.net [162.217.75.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 1249AF29FC; Wed, 27 Jul 2016 19:53:49 -0400 (EDT) Date: Wed, 27 Jul 2016 16:53:47 -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: <20160727235347.odtjfrsrjdrlolfv@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e259534-eb94-0319-dace-ee83d9535a86@aiven.io> 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-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. Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs