Re: BufFreelistLock

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BufFreelistLock
Дата
Msg-id 25070.1291999780@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BufFreelistLock  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: BufFreelistLock  (Jim Nasby <jim@nasby.net>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Jeff Janes's message of vie dic 10 12:24:34 -0300 2010:
>> As far as I can tell, bgwriter never adds things to the freelist.
>> That is only done at start up, and when a relation or a database is
>> dropped.  The clock sweep does the vast majority of the work.

> AFAIU bgwriter runs the clock sweep most of the time (BgBufferSync).

I think bgwriter just tries to write out dirty buffers so they'll be
clean when the clock sweep reaches them.  It doesn't try to move them to
the freelist.  There might be some advantage in having it move buffers
to a freelist that's just protected by a simple spinlock (or at least,
a lock different from the one that protects the clock sweep).  The
idea would be that most of the time, backends just need to lock the
freelist for long enough to take a buffer off it, and don't run clock
sweep at all.
        regards, tom lane


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

Предыдущее
От: Dmitriy Igrishin
Дата:
Сообщение: Re: Fwd: Extended query protocol and exact types matches.
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Fwd: Extended query protocol and exact types matches.