pgpool 之三 pgpool的几种模式

news/2024/7/3 6:01:29

pgpool:3.7.3

文档
http://www.pgpool.net/docs/latest/en/html/configuring-pgpool.html

4.3.2. Running mode of Pgpool-II

There are four different running modes in Pgpool-II: streaming replication mode, logical replication mode, master slave mode (slony mode), native replication mode and raw mode.
In any mode, Pgpool-II provides connection pooling, automatic fail over and online recovery. The sample configuration files for each mode are provied. They are located under $prefix/etc. You can copy one of them to $prefix/etc/pgpool.conf.

Those modes are exclusive each other and cannot be changed after starting the server. You should make a decision which to use in the early stage of designing the system. If you are not sure, it is recommended to use the streaming replication mode.

The streaming replication mode can be used with PostgreSQL servers operating streaming replication. In this mode, PostgreSQL is responsible for synchronizing databases. This mode is widely used and most recommended way to use Pgpool-II. Load balancing is possible in the mode. The sample configuration file is $prefix/etc/pgpool.conf.sample-stream.

The logical replication mode can be used with PostgreSQL servers operating logical replication. In this mode, PostgreSQL is responsible for synchronizing tables. Load balancing is possible in the mode. Since logical replication does not replicate all tables, it’s user’s responsibility to replicate the table which could be load balanced. Pgpool-II load balaces all tables. This means that if a table is not replicated, Pgpool-II may lookup outdated tables in the subscriber side. The sample configuration file is $prefix/etc/pgpool.conf.sample-logical.

The master slave mode mode (slony mode) can be used with PostgreSQL servers operating Slony. In this mode, Slony/PostgreSQL is responsible for synchronizing databases. Since Slony-I is being obsoleted by streaming replication, we do not recommend to use this mode unless you have specific reason to use Slony. Load balancing is possible in the mode. The sample configuration file is $prefix/etc/pgpool.conf.sample-master-slave.

In the native replication mode, Pgpool-II is responsible for synchronizing databases. The advantage for the mode is the synchronization is done in synchronous way: writing to the database does not return until all of PostgreSQL servers finish the write operation. However, you could get a similar effect using PostgreSQL 9.6 or later with synchronous_commit = remote_apply being set in streaming replication. If you could use the setting, we strongly recommend to use it instead of native replication mode because you can avoid some restrictions in the native replication mode. Since PostgreSQL does not provide cross node snapshot control, it is possible that session X can see data on node A committed by session Y before session Y commits data on node B. If session X tries to update data on node B based on the data seen on node A, then data consistency between node A and B might be lost. To avoid the problem, user need to issue an explict lock on the data. This is another reason why we recommend to use streaming replication mode with synchronous_commit = remote_apply.

Load balancing is possible in the mode. The sample configuration file $prefix/etc/pgpool.conf.sample-replication.

In the raw mode, Pgpool-II does not care about the database synchronization. It’s user’s responsibility to make the whole system does a meaningfull thing. Load balancing is not possible in the mode. The sample configuration file $prefix/etc/pgpool.conf.sample.

这里写图片描述


http://www.niftyadmin.cn/n/2124316.html

相关文章

linux上安装oracle11.2.0

软件环境 RedHat5.3,linux_11gR2_database_1of2.zip,linux_11gR2_database_2of2.zip oracle11.2.0的安装界面不同于oracle10g界面。 安装的前提是安装必须的软件包和内核参数: 加载光驱: 跟oracle10g的方式是一样的。这里就不说…

redis cluster 4.0.9 之一: make make install

os: centos7.4 redis:4.0.9 ruby:2.3.4 ip 规划 redis1 192.168.56.101 redis2 192.168.56.102用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口&#xff0c; 192.168.56.102 的 9001、9002、9003 端口。 os安装 参考<<centos …

毕业感想

时间总是在我们不知不觉得时候从我们的身边溜走&#xff0c;让我们猝不及防。还记得自己还在小学打架&#xff0c;在初中玩耍&#xff0c;在高中奋斗着呢。转眼间培训结束的时间也到啦。 回想自己在培训的这一年中&#xff0c;感慨很多。还记得哪天为了来学校冒着大雪做了不到两…

oracle ebs r12 打补丁的步骤

os: linux 5.8 ebs:12.1.3 patch:14332598 这里以 p14332598 为例&#xff0c;列出打补丁的过程。 查看补丁 SELECT * FROM ad_applied_patches where 11and patch_name in (14332598) ; SELECT *FROM ad_bugs where 11and bug_number in (14332598) ; 下载patch h…

爱在时就努力去爱

爱在时就努力去爱 很多人都说过&#xff0c;爱情是一种化学反应&#xff0c;是一时的激情与冲动&#xff0c;时间久了&#xff0c;爱情就淡了&#xff0c;淡了之后或者分手&#xff0c;或者步入婚姻&#xff0c;于是爱情慢慢转变成一种亲情和一份责任了。于是爱情的魅力与风采也…

redis cluster 4.0.9 之二: failover

os: centos7.4 redis:4.0.9 ruby:2.3.4 ip 规划 redis1 192.168.56.101 redis2 192.168.56.102用两台虚拟机模拟6个redis节点。 分别为 192.168.56.101 的 9001、9002、9003 端口&#xff0c; 192.168.56.102 的 9001、9002、9003 端口。 连接redis # redis-cli -h 1…

为什么要坚持写blog

&#xff08;一&#xff09;为什么你应该&#xff08;从现在开始就&#xff09;写博客 用一句话来说就是&#xff0c;写一个博客有很多好处&#xff0c;却没有任何明显的坏处。&#xff08;阿灵顿的情况属于例外&#xff0c;而非常态&#xff0c;就像不能拿抽烟活到一百岁的英…

RMAN备份全集

1、切换服务器归档模式&#xff0c;如果已经是归档模式可跳过此步&#xff1a; %sqlplus /nolog &#xff08;启动sqlplus&#xff09; SQL> conn / as sysdba &#xff08;以DBA身份连接数据库&#xff09; SQL> shutdown immediate&#xff1b; &#xff08;立即关闭数…