Hi,
While working on WaitEventSet-ifying various codepaths, I found itstrange that walreceiver wakes up 10 times per second while idle.Here's a draft patch to compute the correct sleep time.