Questions tagged [pgbouncer]

For questions about PgBouncer, a connection pooler for PostgreSQL.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

PgBouncer default_pool_size for single database server

I have a single Postgres server with a single database and a single user. In such a case should PgBouncer default_pool_size not equal max_connections in the Postgres config? And then ...
0
votes
1answer
67 views

Get the last ID after INSERT the PostgreSQL database with PgBouncer

Previously we used PostgreSQL 9 with PgBouncer in session mode, and with that was able to easily create a new record and get the last ID with pg_get_serial_sequence and CURRVAL. INSERT INTO "...
0
votes
0answers
21 views

Getting Transient connection Error while connecting applications to postgresql using pgbouncer

We are connecting PostgreSQL using pgbouncer from application. However, it is not working. it is giving transient error while connecting. I can provide other parameter details An exception has been ...
0
votes
1answer
33 views

pgBouncer - multiple servers with same username but different password

I have an active pgBouncer setup with one PostgreSQL server. We are planning to add one more PostgreSQL server to the same pgBouncer. But the problem is that both databases servers have the same ...
1
vote
1answer
32 views

Reusing the same connection to read uncommited transaction

My question is similar to: how to spy on a transaction that is not yet committed in postgres for debugging What I tried: I start a pgbouncer instance, and set the max-db-connection to 1 From my node ...
1
vote
2answers
69 views

Prepared statements with pgBouncer

I have a PostgreSQL server with pgBouncer as connection pooler. My application is running on Elixir. This is my config file for pgBouncer: * = host=X.X.X.X port=5432 logfile = /var/log/postgresql/...
1
vote
2answers
22 views

Understanding “server”

pgBouncer docs note: pool_mode Specifies when a server connection can be reused by other clients. session: Server is released back to pool after client disconnects. Default. transaction: ...
0
votes
1answer
1k views

PgBouncer logging details for `query_wait_timeout` error

Regarding this type of error in PgBouncer log: 2020-03-10 03:46:01.730 EDT [25305] LOG C-0xa5cf00: testdb/testdb_user@127.0.0.1:49214 closing because: query_wait_timeout (age=120s) 2020-03-10 03:46:...
0
votes
1answer
143 views

Can't accept pgbouncer 6432 port on PostgreSQL server

pgbouncer server (440a:90a0:302:4525:lda0:1:2:3) pgbouncer.ini [databases] app_db = host=pg_server port=5432 dbname=app_db [pgbouncer] listen_port = 6432 listen_addr = 127.0.0.1 auth_type = md5 ...
0
votes
2answers
54 views

Is it possible to make a high availability PostgreSQL database cluster by open source softwares?

If use these tools can make a great modern database cluster with full features: pgbouncer (with HAProxy for HA) repmgr barman The main database will run on the repmgr servers. It has primary and ...
0
votes
0answers
124 views

How to promote a PostgreSQL standby server by repmgr automatically with pgbouncer and barman?

Now using these servers: Node1: pgbouncer1 Node2: pgbouncer2 Node3: repmgr primary Node4: repmgr standby Node5: repgmr standby Node6: repmgr standby Node7: barman primary Node8: barman passive ...
0
votes
1answer
25 views

Why can't start pgbouncer process when setting logfile to /var/log/ path?

This pgbouncer.ini setting can't start pgbouncer: [databases] mydb = host=127.0.0.1 port=5432 dbname=mydb [pgbouncer] listen_port = 6432 listen_addr = 127.0.0.1 auth_type = md5 auth_file = userlist....
0
votes
1answer
57 views

Why Jira can't connect database with pgBouncer?

pgbouncer.ini [databases] jiradb = host=127.0.0.1 port=5432 dbname=jiradb [pgbouncer] listen_port = 6432 listen_addr = 127.0.0.1 auth_type = md5 auth_file = userlist.txt logfile = pgbouncer.log ...
0
votes
0answers
41 views

Is it possible to create 2 pgBouncer servers and automaticly notify changed repmgr master to Barman?

For a database cluster design as below: In order to do high availability, prepare 2 pgBouncer servers. If the first server down, then the second server act as new connection pool, use HAProxy(Load ...
0
votes
1answer
53 views

Handle no more connections or out of shared memory

I have a golang program that does computation on data in multiple threads at once, all pulling their data from Postgres. The number of threads depends on a previous result. There can therefore be ...
0
votes
1answer
283 views

How to do automatic failover for PostgreSQL with application automatic switch?

There are two ways to try. Method 1 Use JDBC connect the PostgreSQL cluster (primary, standby 2 servers only): jdbc:postgresql://192.168.0.1:5432,192.168.0.2:5432/jiradb But failed: The ...
1
vote
1answer
581 views

Is it possible to configure pgbouncer to distribute queries among master and slave?

We have master (write-read) and slave (readonly) Postgres 10 databases. Slave is online replication from master. Now our application (c# webapi) connects to master only directly. We want to execute ...
0
votes
0answers
350 views

pgBouncer exceeds connection limit even with idle connections

I'm using pgBouncer to balance connections in PostgreSQL. Sets a limit of 2048 connections in the PostgreSQL main configuration and also in pgBouncer. It happens that there are several connections ...
1
vote
2answers
2k views

Pgbouncer getting auth failing when trying to connect using psql

I'm trying to configure the latest pgbouncer to work with postgres 9. I can connect to my db using psql with the right password but when I use psql -p 6432 I can't connect with the error message of ...
0
votes
1answer
901 views

HA PostgreSQL installation using patroni and pgbouncer

I'm not having a problem yet, just searching for advise I want to build installation of PostgreSQL on 3 nodes using patroni: master and 2 standbys (for failover only). There are PostgreSQL and ...
2
votes
0answers
199 views

Should I connect to my replica through PgBouncer?

We're using a setup of one Postgresql master server and a several replicas to be able to withstand master failure. Connection to master server is made through PgBouncer. Currently the idea is that ...
0
votes
1answer
4k views

PgBouncer “no more connections allowed (max_client_conn)”

I am using PostgreSQL with PgBouncer, and receive the following error in my application: 08P01: no more connections allowed (max_client_conn) pgbouncer.ini has the following configuration: ...
1
vote
0answers
365 views

“Unclean server” connections not being cleaned up

I have an application connecting to a PostgreSQL server via PgBouncer, all running in Kubernetes. Every couple of minutes, the PgBouncer process seems to crash, and Kubernetes restarts it. Just before ...
0
votes
1answer
648 views

pgbouncer bind(): Permission denied

I have pgbouncer running locally with config: [databases] * = host=myremoteIP port=5432 user=postgres listen_addr = * listen_port = 6432 When I connect using pgsql using: psql -h 127.0.0.1 -p 6432 -...
1
vote
0answers
5k views

org.postgresql.util.PSQLException: This connection has been closed. error for long running transactions

We are getting "org.postgresql.util.PSQLException: This connection has been closed." on one of our deployments for only long running transactions (more than a few minutes): Caused by: org.hibernate....
2
votes
1answer
1k views

Improve pgBouncer configuration

What is the best configuration for pgBouncer in my case? I have only 1 database, 1 user and the max_connections in postgresql.conf is 1024. The currently config of my pgbouncer.config is: ...
1
vote
0answers
59 views

How Can I change pgbouncer pooling Point? Please help

Good morning, I have more important questions that PGbouncer in postgreSQL module. I saw lot of many threads, but I can't solved it. so, I'm crave answer my question. The questions are: I am using ...
0
votes
1answer
1k views

Load Balancing PG Bouncer With HA Proxy

I have a server with two instances of PG Bouncer running on different ports. Both are using session mode to pool. I set up HA Proxy to load balance incoming connections between these two processes to ...
4
votes
0answers
2k views

PgBouncer cannot connect to server

I have configured PgBouncer with PostgreSQL 9.6 on windows 7 machine. Here are the pgbouncer configuration settings; [databases] test = host=127.0.0.1 port=5432 dbname=master_db user=postgres ...
1
vote
2answers
3k views

Psycopg2 - PGBouncer - Postgresql > Server does not support SSL but SSL was required

I've setup my Django application to use SSL while connecting to the Postgresql database via pgbouncer. I'm using Psycopg2 library. I've done this before successfully, so I just did the same steps ...
1
vote
1answer
952 views

Postgresql: newly created database does not exist

Recently I faced strange error. I'm running Postgresql behind pgBouncer. I created new database in pgAdmin (connected through pgBouncer). It shows up on the list, but when I try to select it I get ...
2
votes
1answer
1k views

What is the sense to use server_lifetime with PgBouncer?

I've found server_lifetime option in PgBouncer config, and I'm trying to undestand if it is really needed in our case. https://pgbouncer.github.io/config.html The pooler will try to close server ...
1
vote
1answer
3k views

PgBouncer log management

My pgbouncer.log grows endlessly. How do I enable filename rollover or limit the logfile size for pgbouncer on Ubuntu?
4
votes
2answers
1k views

Should PgBouncer be installed on web application server or database server?

I have a django website where the application and database server are different. I need to install pgbouncer to enable database pooling, however, I'm confused about where to install it: web ...
3
votes
1answer
876 views

pgBouncer does not use all available CPUs

I have a server with multiple cores that is supposed to run pgBouncer (1.7). It's working pretty well, but it utilises only one CPU core. I get pretty high latency values when I do a load test with ...
1
vote
1answer
294 views

How expensive is a connection to pgbouncer?

Is a connection to pgbouncer cheaper than a connection to PostgreSQL (assuming pgbouncer has already established a connection to PostgreSQL) ? How is the connection to pgbouncer made ? I found the ...
0
votes
1answer
348 views

Is there a way to prevent “reset role” in PostgreSQL

Is there a way to prevent a user from running "reset role" in PostgreSQL, and thus gaining permission he may not have ? I have an architecture with many databases on a single server. An API connects ...
3
votes
1answer
3k views

pgbouncer and ssl connection

I have three Servers, two of whom are running postgres 9.5.3 and the third runs pgbouncer 1.7.2. i can access one of the two postgresql instance through pgbouncer and it all works perfect. the other ...
0
votes
2answers
401 views

PgBouncer on separate server than PostgreSQL

Right now I am hosting PostgreSQLand PgBouncer on the same Linode with 48GB of RAM and 12 Cores. The server gets many short lived connections per second. The server load will increase with time and I ...
0
votes
1answer
2k views

can't connect to pgbouncer administration database

I installed pgbouncer and I setup the pgbouncer.ini and my application can connect to pgbouncer and make queries. But when I try to connect to the virtual administration database of pgbouncer by ...
6
votes
1answer
649 views

Limit connection numbers with pgbouncer

So I have this pgbouncer config: [databases] my_db = host=10.10.10.10 my_db_with_conn_limit = host=10.10.10.10 dbname=my_db pool_size=55 max_client_conn = 300 default_pool_size = 65 ...
0
votes
1answer
3k views

pgbouncer 1.7 with TLS/SSL client and server connections

With settings borrowed from a similar server running Postgres 9.4.1 & pgbouncer 1.6.1, I have multiple users connecting to the database through pgbouncer on port 6543. I also have a second server ...
1
vote
1answer
447 views

Pgbouncer server parameter

I installed and configured pgbouncer 1.5.4 on Ubuntu 14.04 LTS and I have a hard time interpreting log messages. Basically, I have seen many errors: 2015-12-10 18:09:16.835 30488 ERROR ...
4
votes
0answers
832 views

postgresql + pgbouncer, idle server and high cl_waiting

I have such a setup: OpenSUSE 13.1 64-bit Linux kernel 3.11.10 PostgreSQL 9.0 + PgBouncer 1.5.4 (libevent-2.0) 16 core AMD, 128 GB RAM PostgreSQL config: max_connections = 1500 shared_buffers = 4GB ...
1
vote
1answer
714 views

Log large queries with PGbouncer

Is there a way to ask pgbouncer to log any query that generates a result set larger than, say, 5MB?
0
votes
1answer
1k views

Working with Materialized View

I have a materialized view which takes around 57 second to be created and I'm using PostgreSQL 9.4. When I do an insert into a table, a trigger will call a trigger function which will do a REFRESH ...
1
vote
1answer
370 views

Connection pooling with 3 databases but 1 database as master for repmgr replication?

I'm using pgbouncer for connection pooling against 3 database on different servers, now I'm planning to use repmgr for replication, my question is, can I keep doing connection pooling on these 3 ...
0
votes
0answers
92 views

Cascading pgbouncer setup?

I am wondering if anyone has tried a cascading pgbouncer setup, where pgbouncer A connects to pgbouncer B and that in turn connects to postgres. From 1Km away this seems a possible setup, but I am ...
2
votes
1answer
1k views

PGBouncer Pause Waits for Remote Connection to Close

I'm testing the pgbouncer "pause" feature to minimize database downtime when a database restart is required. For this test, I have a remote psql session connected to my database through pgbouncer. ...
3
votes
2answers
5k views

starting pgbouncer on startup

I installed pgbouncer and configured it and it starts only via using this command pgbouncer /etc/pgbouncer/pgbouncer.ini however using service pgbouncer start it dose not start. I then set up ...