Thanks for the reply,yeah i know about FreeWaitEventSet() but that is being used in few places but not for handling backends.
i got it that FDs like FeBeWaitSet->epoll_fd will be free'd when connection is terminated but as i mentioned wouldn't it be an issue if the connection is long living lets take idle which can be running queries for long time,what if we have multiple connections like this running queries using multiple system FDs and reach the limit,cause they are using FDs ,so they may not be free'd.