On Thu, 2010-03-18 at 14:48 -0700, Jeff Davis wrote: > On Thu, 2010-03-18 at 17:17 -0400, Tom Lane wrote: > > > The VM cause wrong results if a bit is set that's not supposed to be -- > > > right? Am I missing something? How does a seq scan skip visibility > > > checks and still produce right results, if it doesn't rely on the bit? > > > > It doesn't. The only thing we currently rely on the VM for is deciding > > whether a page needs vacuuming > > Oh, my mistake. I misremembered the discussion and I thought the seq > scan optimization made it in. >
Hmm... >From heapgetpage() in heapam.c, CVS HEAD: /* * If the all-visible flag indicates that all tuples on the page are * visible to everyone, we can skip the per-tuple visibility tests. But I tested in gdb, and it calls HeapTupleSatisfiesMVCC, until I VACUUM a few times, and then it doesn't call it any more. So, apparently the seq scan optimization _is_ there. And that means it is correctness-critical. Regards, Jeff Davis -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers