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
0001-Use-condition-variables-to-wait-for-checkpoints.patch
Description: Binary data