[Azure flexible Postgres] Setup up hot standby outside azure

Ayush P Gupta (O) 0 Reputation points

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 27,977 Reputation points Microsoft Employee

    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.