I have installed PostgreSQL on two different Windows 10 systems and am having the same problem. The server work great when I first connect to it but if I disconnect client and come back a few hours or a day later I am unable to connect to the service with a timeout error. I have used both pgAdmin and DBeaver as clients.
If I do a restart on the window service everything works fine again until I disconnect the client for a extended period. Can't find anywhere else this issue is discussed.
Have used both the latest 11.2 release and an older 10.x release and both operate the same. Is this a known issue? Is there a solution?