5a72ec6b

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

Wait for the write position that a commit is actually in

A server started for tests usually runs with synchronous_commit off,
where a commit is acknowledged before its write-ahead log record has
been written out.  pg_current_wal_lsn reports the write position, so
it can be behind a transaction that has already committed, and waiting
for the standby to reach it was waiting for something that had already
happened.

pg_current_wal_insert_lsn counts the records still in the buffers,
which is what "everything committed so far" means.

The standby spec was passing at half a second of lag, where the gap
this leaves is too small to land in.  At twenty milliseconds, which is
what a replica that is keeping up looks like, it fails without this.

Total

4m11s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 1s 15s 15s 16s 0s
Build 15s 14m56s 3m55s 4m11s 0s
Suite 0s 15m12s 4m11s 4m11s 0s

Timeline

Config Eval Build
0s20s40s1m1m20s1m40s2m2m20s2m40s3m3m20s3m40s4m