pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oskari Saarenmaa <os@aiven.io>
To: Andres Freund <andres@anarazel.de>
To: 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@postgresql.org
Subject: Re: BUG #14150: Attempted to delete invisible tuple
Date: Sat, 6 Aug 2016 00:37:08 +0300
Message-ID: <6e11604c-d8a1-93d3-63f2-a02c3048afce@aiven.io> (raw)
In-Reply-To: <20160731223146.52zykyros7wx57t2@alap3.anarazel.de>
References: <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>
	<CAM3SWZQZb=6FDyhGCf9oyNfCAC+6RC+D3fEm9z6hcMHbrR3XsQ@mail.gmail.com>
	<20160728010423.aepl2nk5e2ecmcfy@alap3.anarazel.de>
	<CAM3SWZSVHocX3GtR2i_9mHjsYk5zCOE494TRTmJPwHhvVoUA-g@mail.gmail.com>
	<CAM3SWZS0u0LcoYbeUp0TQFcR--p8LdDrMmySqXP7i_pYbnP9=w@mail.gmail.com>
	<20160731223146.52zykyros7wx57t2@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

01.08.2016, 01:31, Andres Freund kirjoitti:
> On 2016-07-29 17:37:21 -0700, Peter Geoghegan wrote:
>> On Wed, Jul 27, 2016 at 6:12 PM, Peter Geoghegan <pg@heroku.com> wrote:
>>> On Wed, Jul 27, 2016 at 6:04 PM, Andres Freund <andres@anarazel.de> wrote:
>>>> That it needs a test, or that it's easy to do?
>>>
>>> That it's easy to write one.
>>
>> I'll be more concrete: I don't see what choke point is available to
>> make control yield after the pre-check determines there is no
>> conflict, but before index tuple insertion determines that there is in
>> fact a conflict (to reliably trigger a failed specualtive
>> insertion/super deletion).
>
> An expression index over a function acquiring a lock looks like it
> should do the trick.
>
> Are you looking in writing an updated patch? It seems we're on one page
> of the rough direction.

Thanks for the review and the locking index idea for a test case. 
Attached a further simplified patch to fix the issue plus an isolation 
test case for it.

Cheers,
Oskari

Attachments:

  0001-Fix-deletion-of-speculatively-inserted-TOAST-on-conf.patch (text/x-patch, 0B) download

view thread (58+ messages)  latest in thread

Message-ID: <6e11604c-d8a1-93d3-63f2-a02c3048afce@aiven.io>
Permalink:  ../6e11604c-d8a1-93d3-63f2-a02c3048afce@aiven.io/
Also on:    postgresql.org/message-id/6e11604c-d8a1-93d3-63f2-a02c3048afce@aiven.io

 ·  · 

reply

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: os@aiven.io, andres@anarazel.de, 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: <6e11604c-d8a1-93d3-63f2-a02c3048afce@aiven.io>
  References: <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> <CAM3SWZQZb=6FDyhGCf9oyNfCAC+6RC+D3fEm9z6hcMHbrR3XsQ@mail.gmail.com> <20160728010423.aepl2nk5e2ecmcfy@alap3.anarazel.de> <CAM3SWZSVHocX3GtR2i_9mHjsYk5zCOE494TRTmJPwHhvVoUA-g@mail.gmail.com> <CAM3SWZS0u0LcoYbeUp0TQFcR--p8LdDrMmySqXP7i_pYbnP9=w@mail.gmail.com> <20160731223146.52zykyros7wx57t2@alap3.anarazel.de> <6e11604c-d8a1-93d3-63f2-a02c3048afce@aiven.io>

* 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