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

From Tomas Vondra
Subject Re: GIN data corruption bug(s) in 9.6devel
Date
Msg-id 563BEB38.4090502@2ndquadrant.com
Whole thread Raw
In response to Re: GIN data corruption bug(s) in 9.6devel  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: GIN data corruption bug(s) in 9.6devel  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers

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
(TeodorSigaev)
 

Should I test all of them? Or is (1) obsoleted by (2) for example?

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Brain fade in gin_extract_jsonb_path()
Next
From: Jeff Janes
Date:
Subject: Re: GIN data corruption bug(s) in 9.6devel