简体   繁体   English

数据库复制播放.1.2.4

[英]Database Replication Play .1.2.4

I want to create a database replication, like a Master/Slave Databases for my play 1.2.4 framework app. 我想创建一个数据库复制,就像我的play 1.2.4框架应用程序的主/从数据库一样。 I'm using PostgreSQL. 我正在使用PostgreSQL。 Any guidance in this regard would be highly appreciated 任何有关这方面的指导都将受到高度赞赏

You could use the native replication from PostgreSQL (available as of version 9.0), works fine. 你可以使用PostgreSQL的本机复制(从版本9.0开始提供),工作正常。 repmgr makes things easier to setup and maintain, also for automatic failover. repmgr使设置和维护更容易,也用于自动故障转移。

PostgreSQL supports asynchronous replication (as of 9.0) and synchronous replication ( as of 9.1 ). PostgreSQL支持异步复制(从9.0开始)和同步复制( 从9.1开始 )。

Since you mention Play 1.2, you may be using the default in-memory H2 database that comes with it and want to replicate data to PostgreSQL. 由于您提到Play 1.2,您可能正在使用它附带的默认内存H2数据库,并希望将数据复制到PostgreSQL。 In any case, take a look at SymmetricDS an open-source database replication engine that supports most databases, including H2 and PostgreSQL. 无论如何,请看一下SymmetricDS是一个支持大多数数据库的开源数据库复制引擎,包括H2和PostgreSQL。 It supports master/slave and also multi-master with conflict management. 它支持主/从和多主机与冲突管理。 It is asynchronous replication that can work across a WAN, so it won't slow down your application if the network is slow or intermittent. 它是可以在WAN上工作的异步复制,因此如果网络运行缓慢或间歇性,它不会减慢您的应用程序速度。 Since it supports replication between different database systems, you can change your platform in the future if needed. 由于它支持不同数据库系统之间的复制,因此如果需要,您可以在将来更改您的平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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