EntepriseDB 复制软件目前支持多种数据库到postgre的复制,其基本结构由发布者(Publication)与订阅者(Subscriptions)组成,Replication软件可针对来自不同类型数据库的多个发布者,将其数据复制到多个订阅者(Subscriptions)数据库中。 其可能的几种拓扑结构,如以下图:
同Oracle中普通的物化视图一样,不支持对订阅者(Subscriptions)数据的修改--
Changes must not be made to the data or the definitions of the subscription tables. EnterpriseDB Replication软件的具体工作模式分成2种:即快照模式(snapshot)与同步模式(synchronization);在第一次启用同步前,需要进行一次快照操作,之后便可以进行较为轻量级同步操作了。若要使用同步模式(synchronization)则要求发布者所包含的表必须具有主键,而在仅使用快照模式的情景中则不需要。(Each table used in a publication must have a primary key with the exception of tables in snapshot-only publications, which do not require a primary key.) 以上模式均支持过滤器(fliter),即可以指定需要复制的具体数据子集。 EnterpriseDB Replication软件其同步(synchronization)模式复制的基本原理是基于trigger的,而非如Quest公司的shareplex或golden gate般抽取重做日志生成SQL的方式。trigger方式会在数据库源端产生一定的性能影响,若在mission critical的生产数据库中实施EDB replication 复制则需要考虑到这一点(这种情况下推荐使用Snapshot模式)。这可能是EDB复制软件比较不成熟的一点,就目前仅对Oracle日志文件的研究认识,挖掘重做日志进而实现数据复制的途径已经没有技术上的难点了。 以下发布者所包含的数据对象或表属性,将在订阅者成功建立时被复制到订阅者所在的数据库:
![Postgres_Plus_Advanced_Server_Replication_Server_Users_Guide-1](https://i-blog.csdnimg.cn/blog_migrate/aeca1289c938ad807ba4e21f52dcd712.png)
![Postgres_Plus_Advanced_Server_Replication_Server_Users_Guide-2](https://i-blog.csdnimg.cn/blog_migrate/9ef035feb92981864c36bdf3de7c5d70.png)
![Postgres_Plus_Advanced_Server_Replication_Server_Users_Guide-3](https://i-blog.csdnimg.cn/blog_migrate/b2c1c6d682f8bc191cdc785d6391f32e.png)
![Postgres_Plus_Advanced_Server_Replication_Server_Users_Guide-4](https://i-blog.csdnimg.cn/blog_migrate/62ac7f2fb6ca982cf87c638f1c895430.png)
- Tables
- Views (for snapshot-only publications) – created as a table in the subscription database
- Primary keys
- Not null constraints
- Unique constraints
- Check constraints
- Indexes
- BFILE
- BINARY_DOUBLE
- BINARY_FLOAT
- MLSLABEL
- XMLTYPE
- BLOB
- CLOB
- LONG
- LONG RAW
- NCLOB
- RAW
- 表相对而言较小
- 在复制间隔中绝大多数数据行会被修改
- 数据表非常巨大
- 在复制间隔中仅少数数据会被修改
转载于:https://blog.51cto.com/maclean/1277093