Re: An idle thought

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: An idle thought
Дата
Msg-id 1268949751.4053.543.camel@monkey-cat.sm.truviso.com
обсуждение исходный текст
Ответ на Re: An idle thought  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: An idle thought  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: An idle thought
Следующее
От: Tom Lane
Дата:
Сообщение: Re: An idle thought