PGpool

How do I get pcp to automatically attach nodes to postgres pgpool?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 13:39:19
问题 I'm using postgres 9.4.9, pgpool 3.5.4 on centos 6.8. I'm having a major hard time getting pgpool to automatically detect when nodes are up (it often detects the first node but rarely detects the secondary) but if I use pcp_attach_node to tell it what nodes are up, then everything is hunky dory. So I figured until I could properly sort the issue out, I would write a little script to check the status of the nodes and attach them as appropriate, but I'm having trouble with the password prompt.

pgpooladmin 3.5.2 Error code e1014 could not read .pcppass file

做~自己de王妃 提交于 2019-12-05 15:18:23
That the error looks like The right's are Anyone there to solve the problem? The page in the link ( http://www.pgpool.net/docs/latest/pgpool-en.html#pcp_comand_password ) in the posted solution is no longer present. I was able to resolve this by copying the .pcppass file from the postgres user's directory to /var/www/ and changing it's owner to the apache system user. sudo cp /home/postgres/.pcppass /var/www/ sudo chown apache /var/www/.pcppass sudo chmod 600 /var/www/.pcppass .pcppass file is missing from the specified directory. To solve the Problem you have todo this: http://www.pgpool.net

Java queries against PGPool II cause “unnamed prepared statement does not exist” errors

不打扰是莪最后的温柔 提交于 2019-12-05 00:15:24
I have a Java app that uses a Postgres database and I'm trying to introduce PGPool in order to scale up my database. I'm running into a problem where Postgres throws the following error: unnamed prepared statement does not exist . After cranking up the logging on Postgres I see the following stuff happening for every select statement my app executes: EDTLOG: 00000: duration: 7.585 ms parse <unnamed>: "my select statement here" EDTLOG: 00000: duration: 0.088 ms bind <unnamed>: "my select statement here" EDTLOG: 00000: duration: 79.014 ms execute <unnamed>: "my select statement here" But

How do I get pcp to automatically attach nodes to postgres pgpool?

冷暖自知 提交于 2019-12-04 19:22:05
I'm using postgres 9.4.9, pgpool 3.5.4 on centos 6.8. I'm having a major hard time getting pgpool to automatically detect when nodes are up (it often detects the first node but rarely detects the secondary) but if I use pcp_attach_node to tell it what nodes are up, then everything is hunky dory. So I figured until I could properly sort the issue out, I would write a little script to check the status of the nodes and attach them as appropriate, but I'm having trouble with the password prompt. According to the documentation, I should be able to issue commands like pcp_attach_node 10 localhost

django 1.7 and connection pooling to PostgreSQL?

爷,独闯天下 提交于 2019-11-30 08:37:29
What are the differences between the django apps (Django-PostgresPool, djorm-ext-pool, django-db-pool) and PG Bouncer or PG Pool? Do the apps use one of the last two packages? In this article , the author says that there is a patch starting with django 1.6. Does that mean we do not have to use any of these solutions anymore, neither the apps, nor the PG Bouncer or PG Pool package? Postgres database connections are expensive (resources) compared to MySQL connections. Django pooling apps will open many connections and keep the open. PG Bouncer and PG Pool will open fewer connections to Postgres,

django 1.7 and connection pooling to PostgreSQL?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 12:16:59
问题 What are the differences between the django apps (Django-PostgresPool, djorm-ext-pool, django-db-pool) and PG Bouncer or PG Pool? Do the apps use one of the last two packages? In this article, the author says that there is a patch starting with django 1.6. Does that mean we do not have to use any of these solutions anymore, neither the apps, nor the PG Bouncer or PG Pool package? 回答1: Postgres database connections are expensive (resources) compared to MySQL connections. Django pooling apps

java postgresql csv文件数据导入

…衆ロ難τιáo~ 提交于 2019-11-27 07:03:17
1.使用jar驱动自带的CopyManager(我这里使用的是postgresql-9.4.1212.jre7.jar) public class PGPool { PGPoolingDataSource source = new PGPoolingDataSource(); public PGPool(){ //PG database server name source.setServerName("数据库ip"); //PG db port number source.setPortNumber(端口); //PG database name source.setDatabaseName("数据库"); source.setUser("账号"); source.setPassword("密码"); source.setMaxConnections(3); } public Connection getConn(){ try{ return source.getConnection(); }catch (Exception e){ e.printStackTrace(); } return null; } } @Test public void testCopy() { String fileUploadSavePath="C:\\Users\\Administrator