Re: Synchronized Scan update

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Synchronized Scan update
Дата
Msg-id 1173807071.4903.7.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Synchronized Scan update  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Ühel kenal päeval, T, 2007-03-13 kell 12:53, kirjutas Tom Lane:
> Jeff Davis <pgsql@j-davis.com> writes:
> > I agree that ss_report_loc() doesn't need to report on every call. If
> > there's any significant overhead I agree that it should report less
> > often. Do you think that the overhead is significant on such a simple
> > function?
> 
> One extra LWLock cycle per page processed definitely *is* a significant
> overhead ... can you say "context swap storm"?  I'd think about doing it
> once every 100 or so pages.

Can't we do it in some lock-free way ? writing page numbers (4-byte
ints) into a predetermined location isn shared mem should be atomic on
all platforms we support (still may cause some cache ping-pong in
multiprocessor systems, but this should be much cheaper), and even an
occasional error in establishing the "scan head" should not be
catastrophic.

-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: 8.1.x (tested 8.1.8) timezone bugs
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: 8.1.x (tested 8.1.8) timezone bugs