814d403c

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Stop waiting for a spread checkpoint when taking a base backup

pg_basebackup waits for a checkpoint, and by default that checkpoint is
spread over the checkpoint interval rather than taken at once. The wait is
proportional to how busy the server is, and a server a standby is taken
from is busy by definition: a suite is running against it.

Asking for the checkpoint immediately is what --checkpoint=fast is for.
This package's own suite goes from 78 seconds to a little over one, and
starting a standby from about 13.5 seconds to about 0.17.
GitHub
Time to Start Worker time Duration Time to finish Idle
Config 6m28s 1s 1s 6m30s 6m28s
Eval 8m06s 18s 18s 8m25s 1m36s
Build 8m24s 0s - - 0s
Suite 6m28s 19s - - 43m24s