Re: Fix overflow of bgwriter's request queue

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: Fix overflow of bgwriter's request queue
Дата
Msg-id dq7m4q$5nk$1@news.hub.org
обсуждение исходный текст
Ответ на Fix overflow of bgwriter's request queue  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Ответы Re: Fix overflow of bgwriter's request queue
Список pgsql-patches
"ITAGAKI Takahiro" <itagaki.takahiro@lab.ntt.co.jp> wrote
>
> AbsorbFsyncRequests will be called during the fsync loop in my patch,
> so new files might be added to pendingOpsTable and they will be removed
> from the table *before* writing the pages belonging to them.
> So I changed it to copy the contents of pendingOpsTable to a local
> variables and iterate on the vars later.
>

I see - it is the AbsorbFsyncRequests() added in mdsync() loop and you want
to avoid unecessary fsyncs. But the remove-recover method you use has a
caveat: if any hash_search(HASH_ENTER) failed when you try to reinsert them
into the pendingOpsTable, you have to raise the error to PANIC since we
can't get back the missing fds any more.

Regards,
Qingqing



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

Предыдущее
От: ITAGAKI Takahiro
Дата:
Сообщение: Re: Fix overflow of bgwriter's request queue
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Index padding optimization