-
Bug
-
Resolution: Done
-
Blocker
-
None
-
6.10.0
Section Number and Name:
4.13.3. Installing PostgreSQL
Describe the issue:
Missing the tuning for PostgreSQL which causes the external PG to become unusable.
[root@ktordeur-external-postgres ~]# su - postgres
Last login: Tue Oct 5 16:11:40 CEST 2021 on pts/0
-bash-4.2$ psql
psql (12.7)
Type "help" for help.
postgres=# SELECT sum(numbackends) FROM pg_stat_database;
sum
122
(1 row)
The number of connections needed for even a small Satellite instance is > 100 which will cause the following error without tuning:
~~~
FATAL: remaining connection slots are reserved for
non-replication superuser connections
~~~
Suggestions for improvement:
Include some of the PG tuning as mentioned in '5.5 PostgreSQL Tuning' from https://access.redhat.com/sites/default/files/attachments/performance_tuning_for_red_hat_satellite_6.91.pdf
Additional information:
Some information about the default set:
- diff /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf.orig
64c64
< max_connections = 1000 # (change requires restart)
—
> max_connections = 100 # (change requires restart)
121c121
< shared_buffers = 2GB # min 128kB
—
> shared_buffers = 128MB # min 128kB
130c130
< work_mem = 8MB # min 64kB
—
> #work_mem = 4MB # min 64kB
599c599
< autovacuum_vacuum_cost_limit = 2000 # default vacuum cost limit for
—
> #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
751d750
< #
More details about the connections can be found in http://pastebin.test.redhat.com/1007541
- external trackers