Slony-I的限制

简介:

限制如下:

http://slony.info/documentation/limitations.html

复制代码
Slony-I does not automatically replicate 

•Changes to large objects (BLOBS)

•Changes made by DDL commands

•Changes to users and roles

•Changes made by the TRUNCATE command, though this might change in a future version of Slony-I
复制代码

其原因是:因为trigger自身所限

The main reason for these limitations is that Slony-I collects updates using triggers, and neither schema changes nor large object operations are captured by triggers

对于上面提到的DDL引起的变化,有另外的一种办法:

There is a capability for Slony-I to propagate notably DDL changes if you submit them as scripts via the slonik SLONIK EXECUTE SCRIPT operation. That is not handled "automatically;" you, as a database administrator, will have to construct an SQL DDL script and submit it, via SLONIK EXECUTE SCRIPT.

另外,在构建slony-I环境的时候,需要满足:

复制代码
The following are recommended for running Slony-I 



•A method of keeping the clocks on your replicas reasonably in sync such as NTP

Also, it is preferable to use an consistent, stable time zone such as UTC or GMT.

Users have run into problems with slon functioning properly when their system uses a time zone that PostgreSQL was unable to recognize such as CUT0 or WST. It is necessary that you use a timezone that PostgreSQL can recognize correctly. It is furthermore preferable to use a time zone where times do not have discontinuities due to Daylight Savings Time. 

•A reliable network between nodes

slon processes should run in the same "network context" as the node that each is responsible for managing so that the connection to that node is a "local" one. Do not run such links across a WAN. Thus, if you have nodes in London and nodes in New York, the slons managing London nodes should run in London, and the slons managing New York nodes should run in New York.

A WAN outage (or flakiness of the WAN in general) can leave database connections "zombied", and typical TCP/IP behaviour will allow those connections to persist, preventing a slon restart for around two hours. 

It is not difficult to remedy this; you need only kill SIGINT the offending backend connection. But by running the slon locally, you will generally not be vulnerable to this condition. 

•All of your databases should be using the same database encoding. (ie LATIN1 or UTF8). Replicating from a database in one encoding to a database with a different encoding might lead to replication errors
复制代码

另外:

Table中如果没有主key或者没有unique key,是无法进行复制的。

在主数据库和从数据库之间,如果table中使用了oid,那么也是在主table和从table之间,也是难以保持OID一致的。

此外,如果涉及到transactionID,在主库和从库之间,即便从空库开始,也很难保持最新的transactionID一直。







本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/p/3195718.html,如需转载请自行联系原作者



目录
相关文章
|
安全 关系型数据库 数据库
Postgresql 数据库用户权限授权(用户角色分配模式)
为了更方面和安全地管理数据库用户账号权限安全,实现通过用户角色代理的模式,实现用户账号功能授权的模式
15040 2
Postgresql 数据库用户权限授权(用户角色分配模式)
|
存储 弹性计算 关系型数据库
5 分钟玩转 OceanBase 社区版 Docker 部署
## 简介 本文是个人把 OceanBase 社区版 3.1 做了一个 Docker 镜像,仅用于学习研究。只要你有一个 4C10G的笔记本可以联公网,你就可以在5分钟内将 OceanBase 社区版跑起来。 OceanBase 社区版是今年 6月1日开源的,只兼容 MySQL,可以理解为分布式的MySQL。其核心功能跟内部业务在用的OceanBase 企业版基本一致。核心功能包含:**多副
3013 0
5 分钟玩转 OceanBase 社区版 Docker 部署
|
关系型数据库 数据库 PostgreSQL
【docker-compose】一键安装PostgreSQL数据库
【docker-compose】一键安装PostgreSQL数据库
2022 0
【docker-compose】一键安装PostgreSQL数据库
|
10月前
|
关系型数据库 MySQL 数据库
Docker安装部署PostgreSQL数据库
Docker安装部署PostgreSQL数据库
3638 0
|
存储 负载均衡 监控
【数据库架构】使用pgpool II的PostgreSQL高可用性
在本文中,我们讨论了使用pgpool II(PostgreSQL开源扩展之一)的高可用性系统设置。它是我们的解决方案之一,可以满足这两个要求:高可用性和可扩展性。
|
SQL 存储 Oracle
OceanBase更高兼容性
OceanBase更高兼容性
415 0
|
负载均衡 安全 Linux
Docker快速部署项目,极速搭建分布式
Docker快速部署项目,极速搭建分布式
796 0
Docker快速部署项目,极速搭建分布式
|
负载均衡 关系型数据库 Java
基于Patroni的PostgreSQL高可用环境部署
在部署PostgreSQL到生产环境中时,选择适合的高可用方案是一项必不可少的工作。本文介绍基于Patroni的PostgreSQL高可用的部署方法,供大家参考。
5782 1
|
存储 NoSQL Oracle
入门GreenPlum
一文了解GreenPlum
1097 0