Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why so many "postgres.exe" are created when I run my application?

Tags:

postgresql

I have a J2EE application, deployed in JBoss6 application server in Windows (Vista 32 bit) platform. My database is "PostgreSQL 9.0.4" and I am using JDBC driver: "postgresql-9.0-801.jdbc4.jar".

In my ds.xml file, I have defined max-pool-size = 75 and min-pool-size = 40. i am using JPA/Hibernate as well as using javax.sql.DataSource.

In windows "Task Manager", I find that when PostgreSQL server starts up it creates 6 "postgres.exe" processes. Now when I deploy/start my J2EE application in JBoss, I find a total of 66 "postgres.exe" processes. So that means another 60 postgres processes were spawned (or launched) because of my application started.

If I change the max-pool-size to be 40 then I notice that I have a total of 46 postgres.exe processes. In both cases the no. of postgres processes comes down to 6 when I stop my J2EE application.

So my question, is this normal? Are those extra processes spawned/launched because of 'connection pooling' (used by Hibernate)?

like image 535
javauser71 Avatar asked Jul 27 '11 18:07

javauser71


People also ask

Is postgres exe a virus?

postgres.exe is a legitimate file that is also known by the name of PostgreSQL Server. It is a software component for PostgreSQL. By default, it is located in C:\Program Files. Malware programmers create virus files and name them after postgres.exe to spread virus on the internet.

What is PostgreSQL and why is it on my computer?

PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads.

What is PostgreSQL exe?

PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.


Video Answer


1 Answers

Yes, this is normal. From the manual:

The PostgreSQL server can handle multiple concurrent connections from clients. To achieve this it starts ("forks") a new process for each connection. From that point on, the client and the new server process communicate without intervention by the original postgres process. Thus, the master server process is always running, waiting for client connections, whereas client and associated server processes come and go.

like image 99
Frank Heikens Avatar answered Sep 19 '22 15:09

Frank Heikens