How to connect two Azure postgreSQL Databases on different hosts with a postgre_fdw

Vitalii Manoilo 1 Reputation point
2021-05-10T14:25:51.233+00:00

Hello, I'm trying to connect my Azure DB to another Azure DB on a different host using postgres_fdw.

I receive an error:

ERROR: could not connect to server "********"
DETAIL: could not connect to server: Network is down (0x00002742/10050)
Is the server running on host "**********.postgres.database.azure.com" (IP address *******) and accepting
TCP/IP connections on port 5432?
SQL state: 08001

I believe the firewall on the 2nd Azure DB doesn't let my 1st DB connect.
However, I'm able to connect to the 2nd Azure DB using my localhost (my public IP is in the whitelist).

Question:

How to whitelist my 1st Azure DB so the firewall on 2nd DB lets me connect? Or is there anything else I need to configure to allow this?

Thanks.

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Navtej Singh Saini 4,221 Reputation points Microsoft Employee
    2021-05-10T23:21:36.903+00:00

    @Vitalii Manoilo

    This is definitely a firewall issue. Please find this document for more information regarding this.

    Regards
    Navtej S

    1 person found this answer helpful.