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

From Teodor Sigaev
Subject Re: GIN data corruption bug(s) in 9.6devel
Date
Msg-id 5714F3B1.2080307@sigaev.ru
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
Re: GIN data corruption bug(s) in 9.6devel
List pgsql-hackers
>> Added, see attached patch (based on v3.1)
>
> With this applied, I am getting a couple errors I have not seen before
> after extensive crash recovery testing:
> ERROR:  attempted to delete invisible tuple
> ERROR:  unexpected chunk number 1 (expected 2) for toast value
> 100338365 in pg_toast_16425
Huh, seems, it's not related to GIN at all... Indexes don't play with toast 
machinery. The single place where this error can occur is a heap_delete() - 
deleting already deleted tuple.

>
> I've restarted the test harness with intentional crashes turned off,
> to see if the problems are related to crash recovery or are more
> generic than that.
>
> I've never seen these particular problems before, so don't have much
> insight into what might be going on or how to debug it.
Check my reasoning: In version 4 I added a remebering of tail of pending list 
into blknoFinish variable. And when we read page which was a tail on cleanup 
start then we sets cleanupFinish variable and after cleaning that page we will 
stop further cleanup. Any insert caused during cleanup will be placed after 
blknoFinish (corner case: in that page), so, vacuum should not miss tuples 
marked as deleted.

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Fabrízio de Royes Mello
Date:
Subject: Re: "parallel= " information is not coming in pg_dumpall for create aggregate
Next
From: Robert Haas
Date:
Subject: Re: Refactor pg_dump as a library?