Timeout connecting to PostgreSQL from remote address

I’m going nuts here.

We had a production server running PostgreSQL 9.6; it took a dump on Thursday, we thought we had it up and running, but discovered an issue this morning with a materialized view. Any attempt to drop, alter, index or analyze the view locked up without throwing an error.

First step was to reinstall 9.6. On doing so, we were able to restore the data with no errors, and everything looked fine from the local machine.

However, we were not able to connect to the database from any remote IP address on the server’s network.

The system sits on a private network, and I connect to it through VPN. Two production web servers connect to it via the private network.

We’re running Windows Server 2016, and have tried the following to absolutely no effect:

  • Edited postgresql.conf ‘listen_addresses’ to ‘*’, ‘’, ”, and a comma deliminted list of these.

  • Changed the port in postgresql.conf

  • Edited pg_hba.conf file to: ‘’, ‘X.Y.Z.0/24’, ‘samenet’

  • Deleted and recreated the Windows firewall policy

  • Loosened up the incoming IP address restrictions in Windows firewall until there were no IP restrictions.

  • Turned off Windows firewall.

  • Deleted PostgreSQL 9.6, scrubbed every reference to it from the registry, except for benign entries like ‘recent items’, deleted every file from the HD.

  • Installed PGSQL 13

Same issue.

Tried these additional steps in 13, again, with no effect.

  • Changed the port in postgresql.conf

  • Changed the ‘listen_addresses’ in posgresql.conf to variations used above.

  • Used ‘all’ in ADDRESS field of the PGSQL 13 pg_hba.conf file as well as the other options (, X.Y.0.0/16)

As far as I know, I’ve tried all the obvious fixes: pg_hba.conf, postgresql.conf, Windows firewall, with absolutely no change.

Short of torching the whole d*mn thing and starting over, I don’t know what else to try.