Many postgresql processes running on Red Hat Satellite in idle state
Environment
- Red Hat Satellite 5.6 or later
- PostgreSQL
Issue
- Lots of postgres processes running on Satellite system:
1 S postgres 12384 1485 0 80 0 - 150968 sk_wai Aug04 ? 00:00:00 postgres: rhnuser rhnschema 127.0.0.1(38767) idle
1 S postgres 12385 1485 0 80 0 - 151759 sk_wai Aug04 ? 00:00:01 postgres: rhnuser rhnschema 127.0.0.1(38768) idle
1 S postgres 12386 1485 0 80 0 - 151817 sk_wai Aug04 ? 00:00:00 postgres: rhnuser rhnschema 127.0.0.1(38769) idle
1 S postgres 12387 1485 0 80 0 - 151790 sk_wai Aug04 ? 00:00:00 postgres: rhnuser rhnschema 127.0.0.1(38770) idle
1 S postgres 31247 1485 0 80 0 - 150965 unix_s 03:14 ? 00:00:00 postgres: rhnuser rhnschema [local] idle
1 S postgres 31249 1485 0 80 0 - 150965 unix_s 03:14 ? 00:00:00 postgres: rhnuser rhnschema [local] idle
1 S postgres 31250 1485 0 80 0 - 150965 unix_s 03:14 ? 00:00:00 postgres: rhnuser rhnschema [local] idle
1 S postgres 31251 1485 0 80 0 - 150965 unix_s 03:14 ? 00:00:00 postgres: rhnuser rhnschema [local] idle
# ps -ef | grep postgres | grep idle | wc -l
45
Resolution
- Idle means that the process is not currently executing any queries.
Root Cause
- PostgreSQL is process based, so it starts one postgres instance per connection. The database starts a process for each connection, both from clients and from other server processes (Taskomatic, Tomcat, etc.)
- Despite the number of processes, they actually use very little in the way of real resources.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.