Using condition variables to wait for checkpoints

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Using condition variables to wait for checkpoints
Дата
Msg-id CA+hUKGLY7sDe+bg1K=bnEzOofGoo4bJHYh9+cDCXJepb6DQmLw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Using condition variables to wait for checkpoints
Список pgsql-hackers
Hello hackers,

A user complained about CREATE DATABASE taking > 200ms even with fsync
set to off.  Andres pointed out that that'd be the clunky poll/sleep
loops in checkpointer.c.

Here's a draft patch to use condition variables instead.

Unpatched:

postgres=# checkpoint;
CHECKPOINT
Time: 101.848 ms

Patched:

postgres=# checkpoint;
CHECKPOINT
Time: 1.851 ms

-- 
Thomas Munro
https://enterprisedb.com

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: performance issue in remove_from_unowned_list()
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Using condition variables to wait for checkpoints