Couldn't you use inotify (and/or some cross-platform wrapper) to watch for WAL changes without polling?