I've been looking into the wait event set interface added in 9.6 with an eye to using it in an extension that maintains a set of non-blocking libpq connections to other PostgreSQL instances.
In the process I've been surprised to find that there does not appear to be any interface to remove a socket once added to the wait event set, or replace it with a new socket.
ModifyWaitEvent(...) doesn't take a pgsocket. There doesn't seem to be a way to remove an event from the set either.
I'd like to add such interfaces at some point, but for now can work around it by destroying and re-creating the wait event set when the fd-set changes. So I'm posting mostly to confirm that it's not supposed to work, and ask if anyone thinks I should submit a comment patch to latch.c documenting it.