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