简体   繁体   中英

Postgres 9.4: Replicate only one database from one instance to another

I have postgresql 9.4 running in 5432 port with 2 databases. Now I want to create another instance in 5433 port (passive) and replicate only one database from 5432 instance (active). All table and data changes in database in 5432 instance (active) should replicate to the database in 5433 instance (passive).

I also have to create another database in 5433 instance (passive) and do CRUD operation in new database

Do we have a way to do this in postgres?

Streaming replication cannot do that, and logical replication (which could do that) was introduced in v10.

So your best option would be to upgrade.

Apart from that, you'd have to resort to legacy trigger-based replication solutions like Slony.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM