[Azure flexible Postgres] Setup up hot standby outside azure

Ayush P Gupta (O) 0 Reputation points
2023-10-23T04:46:09.0633333+00:00

Hi, I have a azure postgres flexible server which is running successfully and has all PUBLIC user access with All IP whitelisted.

I am trying to setup a standby on AKS using postgres bitnami helm image.
I have added a replicaiton user named 'dbreplica' on primary (azure).

Now when i start my standby it fails saying

FATAL: no pg_hba.conf entry for replication connection from host "<omitted IP>", user "dbreplica", SSL encryption

connection to server at "<omitted>.database.azure.com" (<omitted>), port 5432 failed: FATAL: no pg_hba.conf entry for replication connection from host "<omitted", user "dbreplica", no encryption

how can I edit pg_hba.conf on azure postgres and add an entry?
I tried to allow all IP, it didnt work.
I also tried adding firewall rule abc_replrule but it was didnt work. (ref: https://learn.microsoft.com/en-us/answers/questions/740680/azure-postgresql-replication-outside-the-cloud)

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,017 Reputation points Microsoft Employee
    2023-10-24T11:00:46.85+00:00

    Hi,@Ayush P Gupta (O) Welcome to Microsoft Q&A thanks for posting your question

    Modifying the pg_hba.conf file on Azure Database for PostgreSQL - Flexible Server instance is not supported yet.

    You have to set up Logical replication for this requirement please follow the steps mentioned in the Azure documentation for replicating data using logical replication to set up the replication process.https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-logical

    Please let me know if you have any additional questions.

    Regards

    Geetha