Re: 8.1 index corruption woes - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: 8.1 index corruption woes
Date
Msg-id 20080708011717.GG4681@alvh.no-ip.org
Whole thread Raw
In response to Re: 8.1 index corruption woes  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 8.1 index corruption woes  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: 8.1 index corruption woes  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > We've detected what I think is some sort of index corruption in 8.1.
> > The server is running 8.1.11, so AFAICT the problem with truncated pages
> > in vacuum is already patched and accounted for (i.e. we reindexed, and a
> > bit later the problem presented itself again).  There haven't been any
> > relevant fixes after that AFAICT.
> 
> > What we see is that after a bit of updating the index, it starts having
> > tuples that poing to heap entries which are marked unused.
> 
> Do you actually see any observed problem, or is this conclusion based
> entirely on your pg_filedump analysis?

Well, yeah, this all started because the guys started getting weird
results in queries, and found out that disabling index scans returned
different results.

> I suspect a problem with your analysis script, although a quick scan
> of the code didn't find an issue.

Well, that's why I posted the corresponding pg_filedump output -- manual
examination shows of that shows that the script is drawing the correct
conclusions.

> Another point to keep in mind, if you are trying to analyze files
> belonging to a live database, is that what you can see in the filesystem
> may not be the "current" contents of every page.  For typical access
> patterns it'd be unsurprising for the visible index pages to lag behind
> those of the heap, since they'd be "hotter" and tend to stay in shared
> buffers longer.

Hmm, I think the files come from a PITR slave that's not online.  I'll
ask to be sure.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: PATCH: CITEXT 2.0 v3
Next
From: Tom Lane
Date:
Subject: Re: 8.1 index corruption woes