PostgreSQL BDR isn’t a supported database for Discourse, and it’s a deprecated project (the open source version of it).
What you are asking about is named “High Availability” and there are a couple of topics about it: