问题标签 [pgpool]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
132 浏览

postgresql - pgpoolamin V3.5.2 参数检查 .pcpass 无效权限

在此处输入图像描述

路径没问题,.pcppass 文件有 www-data 权限。

有人知道谁来解决这个问题吗?

0 投票
1 回答
1415 浏览

pgpool - pgpoolAdmin - 超级用户:未知(连接错误)

登录后我收到以下消息。

在此处输入图像描述

创建 -> /var/www/.pcppass

...它不起作用:-/

0 投票
3 回答
2431 浏览

pgpool - pgpooladmin 3.5.2 错误代码 e1014 无法读取 .pcppass 文件

错误看起来像

在此处输入图像描述

在此处输入图像描述

右边的是

在此处输入图像描述

有没有人来解决问题?

0 投票
1 回答
547 浏览

postgresql - pgpool - 服务不启动:合法性错误

如果尝试启动 pgpool 我得到这个错误:

我不知道 pg_md5 在 pool_passwd 键或 pcp.conf 中设置权限是否有问题。哈希值相同,但用户和密码相同。:-/

我的配置看起来像这样。 在此处输入图像描述

或者

将相同的密钥带入“pool_passwd”

0 投票
0 回答
771 浏览

postgresql - pgppol2 向主机和从机发送写入

我对 pgpool2 有疑问,不知道为什么!!!!我的设置如下: 单 pgpool 为我做 LB 主从 postgress 问题如下,当我通过 pgpool 发送读取查询时,一切都很好,负载在主从之间分配。但是当我做一个写入数据库的查询时,pgpool 再次使用从属和主控,并且它在发送到从属的查询上产生错误。我在centos上安装了96。

---------+---------+------+--------+------------+- --------+------------

0 | pgdb1 | 5432 | 2 | 0.500000 | 初级 | 10581

1 | pgdb2 | 5432 | 2 | 0.500000 | 待机| 2351

角色 | 姓名 | 上游 | 连接字符串

----------+--------|----------|-------- -----------------

待机| pgdb2 | | 主机=pgdb2 用户=repmgr 数据库名=repmgr

  • 大师 | pgdb1 | | 主机=pgdb1 用户=repmgr 数据库名=repmgr

--

0 投票
0 回答
233 浏览

postgresql - Pgpool 将写入查询定向到备用 postgres 数据库?

我有两台 centos 6.5 服务器运行 postgres 9.4.10 和 repmgr 和 pgpool 3.4.5。在大多数情况下,它们似乎工作正常,但是通过一些测试,我在日志中遇到错误,例如

< 2017-01-24 18:47:14.588 GMT >声明:选择 obj.* 从 MYSCHEMA.clusterobjects obj INNER JOIN MYSCHEMA.objecttypes objtype ON obj.objecttypes_id = objtype.id AND objtype.objecttype = $1 WHERE obj.objectid = $2更新

< 2017-01-24 18:47:19.585 GMT >错误:无法在只读事务中执行 SELECT FOR UPDATE

这发生在第二个处于待机状态的节点上,因此不应有任何写入查询被定向到它。

它发生了不止几次,但它相当不一致,您可以在相同的环境中运行相同的测试而没有问题,到目前为止我没有运气在 vagrant 中重现该问题(但这有可能因其他原因)

我想知道这是否与白/黑功能列表有关,我们是否需要添加其他任何内容?

0 投票
0 回答
294 浏览

node.js - 如何使用 pg-pool 执行同步查询?

我正在尝试为同步查询创建一种方法。我正在使用 pg-pool 和 asyncawait,但我抛出以下错误:“错误:等待函数、yield 函数和返回值的可暂停函数只能从可暂停函数中调用。”

代码是:

0 投票
0 回答
1122 浏览

postgresql - 如何在流复制时删除大量增长的 pg_xlog?

我正在使用复制槽,用于备用服务器的流式复制。pg_xlog 文件越来越疯狂。我检查了 max_wal_size 和 wal_keep_segment 配置,它们看起来都很合理。有没有办法删除应用的日志?

当我尝试查看 checkpoint_segments 时;

备用数据库的最后一个日志可能是相关的;

0 投票
1 回答
2231 浏览

postgresql - PostgreSQL performance tuning and max connections (practically)

For the past few weeks I've been tuning and messing with PostgreSQL which I'm going to use with my next project.

My Specs are:

  • DigitalOcean 8 Cores 16GB SSD x2 (One for DB, another for Web)
  • Centos 7
  • PHP5 , Nginx

The things that I've tried:

  1. Pgtune

  2. PgBouncer & Pgpool (connection pooling & load balancing)

  3. Tuning php-fpm & nginx (worker_processes, worker_connections, pm.max_children etc)

  4. Linux file handle limits and socket tweaking.

I'm testing it by calling the webpage with ApacheBench to insert. Is it practical?

So far I can only get it to handle 1700-2000 connections concurrently without dropping any transaction (usually prematurely closed connection or resource temporarily unavailable in nginx error log or Sorry, too many clients already return by PostgreSQL).

I tried both TCP/IP and unix socket for php-fpm and TCP/IP seems to be more scalable than unix socket.

Can PHP use connection pooling? Since the way I'm calling the DB from the web server are still the same(making alot of individual connections to pgpool or pgbouncer).

My goal is to handle at least 10,000 transactions concurrently. What are the deciding factors? Is it a bottleneck between web server to db (php-fpm) or PostgreSQL itself? Usually, how do big companies (PHP web application) handle such volume?

0 投票
0 回答
366 浏览

ruby-on-rails - 使用 pgpool vs rails octopus 进行负载平衡?

最近我们考虑使用 Heroku postgres Follower/slave 数据库来处理我们的读取请求。现在我对以下两种方法感到困惑。

  1. 使用octopusrails gem 在各种从属服务器/追随者之间进行负载平衡。

  2. 使用 pgpool 进行负载平衡。基本上 pgpool 是一个位于应用服务器和数据库服务器之间的中间件。App server 连接到这个中间件,而不是直接连接到 db server,pgpool 将负责各个 slave 之间的负载均衡。

我不确定我们应该同时采用这两种方法还是选择一种方法。我对这种设置完全陌生。我可能遗漏了一些基本的关键点。

任何建议将不胜感激。