PostgreSQL参数学习:max_wal_senders
磨砺技术珠矶,践行数据之道,追求卓越价值
回到上一级页面:PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页
[作者 高健@博客园 luckyjackgao@gmail.com]
参考:
http://space.itpub.net/133735/viewspace-742081
官方资料:
http://www.postgresql.org/docs/9.3/static/app-pgbasebackup.html
The backup is made over a regular PostgreSQL connection, and uses the replication protocol. The connection must be made with a superuser or a user having REPLICATION permissions (see Section 20.2), and pg_hba.conf must explicitly permit the replication connection. The server must also be configured with max_wal_senders set high enough to leave at least one session available for the backup.
具体的说明:
http://www.postgresql.org/docs/9.3/static/runtime-config-replication.html#GUC-MAX-WAL-SENDERS
max_wal_senders (integer)
Specifies the maximum number of concurrent connections from standby servers or streaming base backup clients (i.e., the maximum number of simultaneously running WAL sender processes). The default is zero, meaning replication is disabled. WAL sender processes count towards the total number of connections, so the parameter cannot be set higher than max_connections. This parameter can only be set at server start. wal_level must be set to archive or hot_standby to allow connections from standby servers.
可是对于一对一的 master --slave,设置多于一个的 max_wal_senders 是否有特别的意义,需要继续和社区进行确认。
经过请教社区的大拿们,他们的解释是这样的:
首先,有max_wal_senders参数,这个是为 master端或者说primary 端准备的。
然后,没有max_wal_receivers参数,因为在一个slave端,只有一个接收进程。
也就是说,max_wal_senders是为了让一个master端,带多个slave端用的,基本上每一对master--slave用一个链接。
但是,还需要注意,pg_basebackup也会用到一个。
pg_basebackup also counts against the total of receivers:
http://www.postgresql.org/docs/9.3/interactive/app-pgbasebackup.html
[作者 高健@博客园 luckyjackgao@gmail.com]
回到上一级页面: PostgreSQL基础知识与基本操作索引页 回到顶级页面:PostgreSQL索引页
磨砺技术珠矶,践行数据之道,追求卓越价值