idle_session_timeout doc

Started by PG Bug reporting formover 4 years ago4 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/runtime-config-client.html
Description:

Is there a way to alter users idle_session_timeout setting? My
understanding is that it's a global setting. The last sentence indicates
you can apply an idle session timeout to particular users:

idle_session_timeout (integer)
Terminate any session that has been idle (that is, waiting for a client
query), but not within an open transaction, for longer than the specified
amount of time. If this value is specified without units, it is taken as
milliseconds. A value of zero (the default) disables the timeout.

Unlike the case with an open transaction, an idle session without a
transaction imposes no large costs on the server, so there is less need to
enable this timeout than idle_in_transaction_session_timeout.

Be wary of enforcing this timeout on connections made through
connection-pooling software or other middleware, as such a layer may not
react well to unexpected connection closure. It may be helpful to enable
this timeout only for interactive sessions, perhaps by applying it only to
particular users.

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: PG Bug reporting form (#1)
Re: idle_session_timeout doc

On Wed, Jan 19, 2022 at 2:18 PM PG Doc comments form <noreply@postgresql.org>
wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/runtime-config-client.html
Description:

Is there a way to alter users idle_session_timeout setting? My
understanding is that it's a global setting. The last sentence indicates
you can apply an idle session timeout to particular users:

https://www.postgresql.org/docs/current/runtime-config.html

Note in particular the ways of doing this via SQL.

Settings are best considered session-local with the initial value for a
setting in a session determined as described in the docs.

David J.

#3Capobianco, Tony
Tony.Capobianco@bcbsma.com
In reply to: David G. Johnston (#2)
RE: idle_session_timeout doc

I have yet to find any instances where idle_session_timeout can be set at the session level or applied to a single user.

From: David G. Johnston <david.g.johnston@gmail.com>
Sent: Wednesday, January 19, 2022 4:26 PM
To: Capobianco, Tony <Tony.Capobianco@bcbsma.com>; Pg Docs <pgsql-docs@lists.postgresql.org>
Subject: Re: idle_session_timeout doc

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Wed, Jan 19, 2022 at 2:18 PM PG Doc comments form <noreply@postgresql.org<mailto:noreply@postgresql.org>> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/runtime-config-client.html&lt;https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2F14%2Fruntime-config-client.html&amp;data=04%7C01%7Ctony.capobianco%40bcbsma.com%7C0b31a25f295c4f8c524408d9db926143%7C7f6a7d1e1213434b981c95c72d65f665%7C0%7C0%7C637782244009710738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=fp6dCoKy7OlzKjigp9NAVFysmd1maUxjuSmm8wp5k1k%3D&amp;reserved=0&gt;
Description:

Is there a way to alter users idle_session_timeout setting? My
understanding is that it's a global setting. The last sentence indicates
you can apply an idle session timeout to particular users:

https://www.postgresql.org/docs/current/runtime-config.html&lt;https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurrent%2Fruntime-config.html&amp;data=04%7C01%7Ctony.capobianco%40bcbsma.com%7C0b31a25f295c4f8c524408d9db926143%7C7f6a7d1e1213434b981c95c72d65f665%7C0%7C0%7C637782244009710738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=TTraQJtCJ29P%2FmaD7OCLkrV6JN7t0ElF6urEi2W61i8%3D&amp;reserved=0&gt;

Note in particular the ways of doing this via SQL.

Settings are best considered session-local with the initial value for a setting in a session determined as described in the docs.

David J.

#4David G. Johnston
david.g.johnston@gmail.com
In reply to: Capobianco, Tony (#3)
Re: idle_session_timeout doc

On Wed, Jan 19, 2022 at 3:27 PM Capobianco, Tony <Tony.Capobianco@bcbsma.com>
wrote:

I have yet to find any instances where idle_session_timeout can be set at
the session level or applied to a single user.

https://www.postgresql.org/docs/current/sql-alterrole.html
https://www.postgresql.org/docs/current/sql-set.html

idle_session_timeout is one of many "configuration_parameter"

David J.