Re: GIN data corruption bug(s) in 9.6devel - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: GIN data corruption bug(s) in 9.6devel
Date
Msg-id CAMkU=1xvjcxUp1t2uGO8aNLG3XSOikBtq6BuYdboqhsNqbdrsw@mail.gmail.com
Whole thread Raw
In response to Re: GIN data corruption bug(s) in 9.6devel  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: GIN data corruption bug(s) in 9.6devel
List pgsql-hackers
On Thu, Nov 5, 2015 at 3:50 PM, Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
>
>
> On 11/05/2015 11:44 PM, Jeff Janes wrote:
>>
>>
>> This looks like it is probably the same bug discussed here:
>>
>>
>> http://www.postgresql.org/message-id/CAMkU=1xALfLhUUohFP5v33RzedLVb5aknNUjcEuM9KNBKrB6-Q@mail.gmail.com
>>
>> And here:
>>
>> http://www.postgresql.org/message-id/56041B26.2040902@sigaev.ru
>>
>> The bug theoretically exists in 9.5, but it wasn't until 9.6 (commit
>> e95680832854cf300e64c) that free pages were recycled aggressively
>> enough that it actually becomes likely to be hit.
>
>
> I have only quickly skimmed the discussions, but my impression was that it's
> mostly about removing stuff that shouldn't be removed and such. But maybe
> there are race conditions that cause data corruption. I don't really want to
> dive too deeply into this, I've already spent too much time trying to
> reproduce it.
>
>>
>> There are some proposed patches in those threads, but discussion on
>> them seems to have stalled out. Can you try one and see if it fixes
>> the problems you are seeing?
>
>
> I can do that - I see there are three patches in the two threads:
>
>   1) gin_pending_lwlock.patch (Jeff Janes)
>   2) gin_pending_pagelock.patch (Jeff Janes)
>   3) gin_alone_cleanup-2.patch (Teodor Sigaev)
>
> Should I test all of them? Or is (1) obsoleted by (2) for example?

1 is obsolete.  Either 2 or 3 should fix the bug, provided this is the
bug you are seeing.  They have different performance side effects, but
as far as fixing the bug they should be equivalent.

Cheers,

Jeff



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: GIN data corruption bug(s) in 9.6devel
Next
From: Peter Geoghegan
Date:
Subject: Re: SortSupport for UUID type