Hi ^^
I have two DB clusters. One is in South Korea, and the other is in US.Specifically, I succeeded to replicate one DB cluster to the other.
But when I set logical replication in both cluster, only the former which I set first works.
Can I use logical replication to synchronize two master DB clusters?
The following is what I did.
- postgresql.conf
wal_level = logical
- pg_hba.conf
# IPv4 local connections:
host <KR DB name> postgres <US server IP>/32 md5
# IPv4 local connections:
host <KR DB name> postgres <US server IP>/32 md5
CREATE PUBLICATION mypubKR FOR ALL TABLES;
CREATE SUBSCRIPTION mysubKR CONNECTION 'host=<US server IP> port=5432 user=postgres dbname=<US DB name> password=<password>' PUBLICATION mypubUS;
- postgresql.conf
wal_level = logical
- pg_hba.conf# IPv4 local connections:
host <US DB name> postgres <KR server IP>/32 md5
host <US DB name> postgres <KR server IP>/32 md5
CREATE PUBLICATION mypubUS FOR ALL TABLES;
CREATE SUBSCRIPTION mysubUS CONNECTION 'host=<KR server IP> port=5432 user=postgres dbname=<KR DB name> password=<password>' PUBLICATION mypubKR;
---------------------------------------------------------------------------------------------------------------------
I hope both direction work well.
How can I solve this problem?