pg_easy_replicate icon indicating copy to clipboard operation
pg_easy_replicate copied to clipboard

Add support for Azure

Open AlicjaKucharczyk opened this issue 1 year ago • 1 comments

Hi, I was wondering if support for azure postgres (Flexible Server) could also be added?

AlicjaKucharczyk avatar Jan 03 '24 05:01 AlicjaKucharczyk

Interesting. Thanks for the issue. Have you been able to try pg_easy_replicate already and run into any errors? If so would love to see them. I am not much familiar with Azure's flexible server, pg_easy_replicate should work with almost all major postgres setups that supports the PG wire protocol.

shayonj avatar Jan 04 '24 15:01 shayonj

I'm currently doing a replication between two Azure Postgres Flexible servers, and it appears to be working OK - 93 tables currently replicating and another 53 still having data copied. In this instance, just like with AWS and GCP, you have to use the --special-user flag, and ensure that the user accounts specified in the connection strings are members of the azure_pg_admin role on each server. Additionally, you will need to whitelist the server IP addresses on both boxes (so, source IP on target's whitelist, and vice versa). Make sure to increase the max_replication_slots parameter to some number greater than the number of tables you are replicating as well.

joetynan avatar Nov 06 '24 18:11 joetynan

just FYI, this is also generally validated for migrations between AWS and Azure based PostgreSQL servers.

joetynan avatar Jan 02 '25 18:01 joetynan