"Mason Hale" <masonhale(at)gmail(dot)com> writes:
> However running the same query on the original 8.2.4 database returns zero
> rows:
> prod_1=> select page_id, count(*) from topic_version_page where
> topic_version_id = 263 group by 1 having count(*) > 1;
> page_id | count
> ---------+-------
> (0 rows)
Is that still true if you do the query with enable_indexscan = off
and enable_bitmapscan = off? If you see matching rows then, I'd
suspect a corrupt index in the 8.2.4 installation --- does REINDEXing
it succeed?
For that matter, do you still see dups if you prevent use of the index
in the 8.2.5 query? Maybe it's that index that is corrupt.
regards, tom lane