Re: about fsync in CLOG buffer write

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: about fsync in CLOG buffer write
Дата
Msg-id CAMkU=1xHY3rpovpdeu6TfdFghOr+4NTT=CGcC5Zp+34ERjSUbg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: about fsync in CLOG buffer write  (Andres Freund <andres@anarazel.de>)
Ответы Re: about fsync in CLOG buffer write  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Wed, Sep 2, 2015 at 5:32 AM, Andres Freund <andres@anarazel.de> wrote:
On 2015-09-10 19:39:59 +0800, 张广舟(明虚) wrote:
> We found there is a fsync call when CLOG buffer
> is written out in SlruPhysicalWritePage(). It is often called when a backend
> needs to check transaction status with SimpleLruReadPage().

That's when there's not enough buffers available some other, and your
case dirty, needs to be written out.

Why bother to find a place to store the page in shared memory at all?  If we just want to read it, and it isn't already in shared memory, then why not just ask the kernel for the specific byte we need?  The byte we want to read can't differ between shared memory and kernel, because it doesn't exist in shared memory.

Cheers,

Jeff

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: typo in create policy doc
Следующее
От: Andres Freund
Дата:
Сообщение: Re: about fsync in CLOG buffer write