From: Andres Freund <andres@anarazel.de>
To: Oskari Saarenmaa <os@aiven.io>
Cc: Peter Geoghegan <pg@heroku.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Peter Tripp <peter@chartio.com>
Cc: Virendra Negi <virendra@idyllic-software.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14150: Attempted to delete invisible tuple
Date: Wed, 27 Jul 2016 17:47:37 -0700
Message-ID: <20160728004737.5x5pakboh24234j6@alap3.anarazel.de> (raw)
In-Reply-To: <20160727235347.odtjfrsrjdrlolfv@alap3.anarazel.de>
References: <CAM3SWZT0-XQv5R1vR+Ji5V6F-GOjJbUXKV2owCaPTGhJujY0HA@mail.gmail.com>
<CAB7nPqQSZVh==94uv8YS_WhNuaW+F1LFeA0vG+zSfxoBt5L88w@mail.gmail.com>
<CAM3SWZRE3eYZyrJz78mTNB5nG0sB47=z+S-T8HSq3h-_2PzcYQ@mail.gmail.com>
<CAB7nPqT4BSnyT+jK9Ys=yuHOe_v5KQ6e-yD7mzrsLC7=A2nfQA@mail.gmail.com>
<88248a24-47d1-d575-a63f-2b56a09f82e2@aiven.io>
<62f3793f-13d6-567c-e512-f29d1fd76d00@aiven.io>
<20160706214024.4bl2q3skcio4eoqk@alap3.anarazel.de>
<CAM3SWZQ_8aPcxRKm9Bsy5m46WqVoirmf7PMOw6-APe-k9MfSrw@mail.gmail.com>
<6e259534-eb94-0319-dace-ee83d9535a86@aiven.io>
<20160727235347.odtjfrsrjdrlolfv@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
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: andres@anarazel.de, os@aiven.io, pg@heroku.com, michael.paquier@gmail.com, peter@chartio.com, virendra@idyllic-software.com
Subject: Re: BUG #14150: Attempted to delete invisible tuple
In-Reply-To: <20160728004737.5x5pakboh24234j6@alap3.anarazel.de>
References: <CAM3SWZT0-XQv5R1vR+Ji5V6F-GOjJbUXKV2owCaPTGhJujY0HA@mail.gmail.com> <CAB7nPqQSZVh==94uv8YS_WhNuaW+F1LFeA0vG+zSfxoBt5L88w@mail.gmail.com> <CAM3SWZRE3eYZyrJz78mTNB5nG0sB47=z+S-T8HSq3h-_2PzcYQ@mail.gmail.com> <CAB7nPqT4BSnyT+jK9Ys=yuHOe_v5KQ6e-yD7mzrsLC7=A2nfQA@mail.gmail.com> <88248a24-47d1-d575-a63f-2b56a09f82e2@aiven.io> <62f3793f-13d6-567c-e512-f29d1fd76d00@aiven.io> <20160706214024.4bl2q3skcio4eoqk@alap3.anarazel.de> <CAM3SWZQ_8aPcxRKm9Bsy5m46WqVoirmf7PMOw6-APe-k9MfSrw@mail.gmail.com> <6e259534-eb94-0319-dace-ee83d9535a86@aiven.io> <20160727235347.odtjfrsrjdrlolfv@alap3.anarazel.de> <20160728004737.5x5pakboh24234j6@alap3.anarazel.de>
* 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