I will ask again: where in the code is the asynchronous replication code? The docs are not detailed/exact enough.
Nevermind. Thomas Munro answered my question in the General list. Quoting:
> Look for WalSndWakeupRequest() in xlog.c, which expands to a call to > WalSndWakeup in walsender.c which sets latches (= a mechanism for > waking processes) on all walsenders, and see the WaitLatchOrSocket > calls in walsender.c which wait for that to happen.