Re: Difference between child_life_time and connection_life_time in pgPool

From: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
To: Sumeet Shukla <sumeet(dot)k(dot)shukla(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Cc: Rahul Saha <rahul(dot)blooming(at)gmail(dot)com>
Subject: Re: Difference between child_life_time and connection_life_time in pgPool
Date: 2016-11-22 09:42:58
Message-ID: 464882906.3185231.1479807778670@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> From: Sumeet Shukla <sumeet(dot)k(dot)shukla(at)gmail(dot)com>
>To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
>Cc: Rahul Saha <rahul(dot)blooming(at)gmail(dot)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(at)pgpool(dot)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 time to time have the odd memory leak bug, and I think this setting was to try and mitigate the impact of such bugs. You shouldn'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 be kept 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 client connected to pgpool, pgpool would have to connect to the postgresql server, and once the client had disconnected from pgpool, pgpool would disconnect from postgresql 5 seconds later. If you were to instead set it to 15 seconds, pgpool would keep the connection to postgresql connection open between your clients connections to pgpool its self as the lifetime 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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2016-11-22 14:11:33 Re: Difference between child_life_time and connection_life_time in pgPool
Previous Message Sumeet Shukla 2016-11-21 21:47:15 Difference between child_life_time and connection_life_time in pgPool