0

I added remote host info on pg_hba.conf as:

host db1 all 10.6.169.88/27 trust

and also I did

listen_addresses = ‘*’
tcpip_socket = true

on postgresql.conf.

But still the remote client can not connect to db. What is the missing part about this? Remote client and host server is in different locations but with IT policies adjusted with correct ports and routes. So remote client is normally accessible to host server.

Here is what remote client gets as error:

error on client side

7
  • What exactly is the error message you get? tcpip_socket is only for local connections to begin with, so that config option is irrelevant for the question Apr 14, 2020 at 12:26
  • Did you restart the service?
    – Philᵀᴹ
    Apr 14, 2020 at 12:29
  • I edited the question and added what is the error on clients side. Apr 14, 2020 at 12:31
  • @Philᵀᴹ yes I restarted. Apr 14, 2020 at 12:32
  • Can you connect to the server by some other means and query "pg_hba_file_rules"? Can you check the log file on the server, to make sure its error message match the client?
    – jjanes
    Apr 14, 2020 at 16:09

1 Answer 1

0

It worked after editing the correct pg-hba.conf file. Well, earlier our customer asked us to move postgresql data to other drive partition. So there are two copies of conf files. One is inside postgresql program folder and the other is in data folder. To achieve what I want I needed to edit the one inside data folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.