Like latches, nice one.
The way the loop in WalSender now happens it won't send any outstanding
WAL if a shutdown is requested while it is waiting.
That probably needs to change and we'd do similarly in other procs.
-- Simon Riggs www.2ndQuadrant.comPostgreSQL Development, 24x7 Support, Training and Services