Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY
Date
Msg-id 30991.1487353551@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Index corruption with CREATE INDEX CONCURRENTLY  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
I wrote:
> However, you might be able to find it without so much random I/O.
> I'm envisioning a seqscan over the table, in which you simply look for
> HOT chains in which the indexed columns aren't all the same.  When you
> find one, you'd have to do a pretty expensive index lookup to confirm
> whether things are OK or not, but hopefully that'd be rare enough to not
> be a big performance sink.

Ah, nah, scratch that.  If any post-index-build pruning had occurred on a
page, the evidence would be gone --- the non-matching older tuples would
be removed and what remained would look consistent.  But it wouldn't
match the index.  You might be able to find problems if you were willing
to do the expensive check on *every* HOT chain, but that seems none too
practical.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: [HACKERS] removing tsearch2
Next
From: David Christensen
Date:
Subject: Re: [HACKERS] [PATCH] Add pg_disable_checksums() and supportinginfrastructure