fix(infra): cap pgsql_servers max_connections to 50 per HG

ProxySQL was configured with pgsql_servers.max_connections=500 on BOTH
hostgroups (0 and 1) pointing at the same backend, implying a pool cap of
1000 connections against a PostgreSQL container that only allows 120
(117 non-super). Under test workload the non-super slots would fill up
and PostgreSQL rejected new Monitor connects with:

  FATAL: remaining connection slots are reserved for roles with the
         SUPERUSER attribute

This caused pgsql-monitor_ssl_connections_test-t (PHASE 1) and
pgsql-servers_ssl_params-t (test 33) to fail — the SSL Monitor counter
couldn't advance because the Monitor couldn't connect.

PostgreSQL doesn't scale well with connection count, so lower the
per-hostgroup cap to 50 (total 100 across the two HGs), leaving ample
headroom under PG's max_connections=120 for monitor + superuser slots.

The 500 value was templated from the MySQL/MariaDB infras during
unify-PR-5433-5442, where each backend's server-side max_connections=500
matches ProxySQL's cap. PostgreSQL here is a different beast and the
copy-paste didn't fit.
v3.0-dbdeployer-mysql84-gr
Rene Cannao 1 month ago
parent 1320e7dbe6
commit 5c3bc7dee2

@ -1,6 +1,6 @@
DELETE FROM pgsql_servers;
INSERT INTO pgsql_servers (hostgroup_id,hostname,port,max_replication_lag,max_connections,comment) VALUES (0,'127.0.0.1',15432,0,500,'pgsql1');
INSERT INTO pgsql_servers (hostgroup_id,hostname,port,max_replication_lag,max_connections,comment) VALUES (1,'127.0.0.1',15432,0,500,'pgsql1');
INSERT INTO pgsql_servers (hostgroup_id,hostname,port,max_replication_lag,max_connections,comment) VALUES (0,'127.0.0.1',15432,0,50,'pgsql1');
INSERT INTO pgsql_servers (hostgroup_id,hostname,port,max_replication_lag,max_connections,comment) VALUES (1,'127.0.0.1',15432,0,50,'pgsql1');
LOAD PGSQL SERVERS TO RUNTIME;
SAVE PGSQL SERVERS TO DISK;

Loading…
Cancel
Save