Thread: Difference between child_life_time and connection_life_time in pgPool
Hi,
Can someone explain me the difference between child_life_time and connection_life_time parameters in pgpool-II version 3.3.10 (tokakiboshi)
I found below on web:
child_life_time: Life of a idle child process in seconds. This will prevent unwanted memory leaks or other problems.
connection_life_time: Life time for each idle connection in seconds. 0 means the life time is forever.
but I'm unable to understand the difference between idle child process and idle connection.
Any help would be highly appreciated.
Thanks & Regards,
Sumeet Shukla
Ph. No. 860 000 6512
> From: Sumeet Shukla <sumeet.k.shukla@gmail.com> >To: pgsql-admin <pgsql-admin@postgresql.org> >Cc: Rahul Saha <rahul.blooming@gmail.com> >Sent: Monday, 21 November 2016, 21:47 >Subject: [ADMIN] Difference between child_life_time and connection_life_time in pgPool > > > >Hi, > > >Can someone explain me the difference between child_life_time and connection_life_time parameters in pgpool-II version 3.3.10(tokakiboshi) > > >I found below on web: >child_life_time: Life of a idle child process in seconds. This will prevent unwanted memory leaks or other problems. > >connection_life_time: Life time for each idle connection in seconds. 0 means the life time is forever. > > > >but I'm unable to understand the difference between idle child process and idle connection. > > You should ask your question on the "pgpool-general" list (pgpool-general@pgpool.net). My understanding was that child_life_time is the amount of time an idle pgpool child process (that is an unused backend)will live for before it is torn down and replaced with a new child porocess. In the past pgpool would from timeto time have the odd memory leak bug, and I think this setting was to try and mitigate the impact of such bugs. Youshouldn't really worry about it too much on a stable version of pgpool these days I'd have thought. The connection_life_time parameter is the amount of time an idle connection between pgpool and the postgres server will bekept open before disconnecting. A simplified explanation would be to imagine you have a single client connecting via pgpool,that connects every 10 seconds and runs a short lived query; if you set this to 5 seconds then every time your clientconnected to pgpool, pgpool would have to connect to the postgresql server, and once the client had disconnected frompgpool, pgpool would disconnect from postgresql 5 seconds later. If you were to instead set it to 15 seconds, pgpoolwould keep the connection to postgresql connection open between your clients connections to pgpool its self as thelifetime would not elapse. The latter being the kind of behaviour people usually want from a connection pooler. You should ask your questions on pgpool-general if you want better quality answers though.
On Mon, Nov 21, 2016 at 3:47 PM, Sumeet Shukla <sumeet.k.shukla@gmail.com> wrote: > Can someone explain me the difference between child_life_time and > connection_life_time parameters in pgpool-II version 3.3.10 "child_life_time" limits the duration of a connection from your application code to pgpool. "connection_life_time" limits the duration of a connection from pgpool to the database. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company