Rich Shepard <rshepard@xxxxxxxxxxxxxxx> writes: > On Mon, 7 Jun 2021, Tom Lane wrote: >> What you've got there is that Unix-socket connections work, but TCP >> connections do not. Check the server's listen_addresses setting. If that >> says to allow connections on these IP addresses, next check your kernel >> firewall. > What I read on <https://www.postgresql.org/docs/13/auth-pg-hba-conf.html> is pg_hba.conf is exactly not what I told you to check. The "connection refused" failure implies that you're not getting as far as where it would look at pg_hba.conf. If you were, and the contents of that file were wrong, you'd get a more on-point message. Hence, you need to look at what is stopping TCP connections from going through at all. (Whether this is really the cause of your original problem remains doubtful to me, but we'll see.) regards, tom lane