Re: GIN data corruption bug(s) in 9.6devel

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GIN data corruption bug(s) in 9.6devel
Date: 2016-04-18 14:48:17
Message-ID: 5714F3B1.2080307@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-04-18 14:48:24 Re: pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Previous Message Fabrízio de Royes Mello 2016-04-18 14:47:04 Re: "parallel= " information is not coming in pg_dumpall for create aggregate