Where do I set idle_in_transaction_session_timeout in postgresql?

I want to close idle connection in postgresql and want to set idle_in_transaction_session_timeout. I log into postgresql and when entering show idle_in_transaction_session_timeout at prompt get the following error message:

[database]=> show idle_in_transaction_session_timeout;

and get the following error message:

ERROR: unrecognized configuration parameter "idle_in_transaction_session_timeout"

If i enter [database]=> SET SESSION idle_in_transaction_session_timeout = 3000; get the following error message:

ERROR: unrecognized configuration parameter "idle_in_transaction_session_timeout"

Where do consult and set this variable in posrgresql? Thank you.

1 Answer

From my install of Postgresql on a BSD server. The option you're looking for is declared in postgresql.conf in the folder: var/db/postgresql/data96

as:

#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled

Its location on your install is dependent upon the OS, and version of Postgresql you're using. In my case 9.6.

Short, and direct answer: postgresql.conf. :)

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like