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 1


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


#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. :)

  • I checked postgresql.conf in the server and I don't have a line with #idle_in_transaction_session_timeout=0. I am running version 9.2.24. If I add the line idle_in_transaction_session_timeout = 5000 to postgresql.conf then Postgresql reports an error when I try to restart it.
    – M Garcia
    Jul 1, 2019 at 21:06
  • As indicated in my answer. This may well be a "version specific" option. I'm not sure which version that option was introduced. But it is at least available in 9.6. So it will at least be available in 9.6, maybe sooner. But surely later. :)
    – somebody
    Jul 1, 2019 at 21:12
  • Thank you. Will upgrade and test.
    – M Garcia
    Jul 1, 2019 at 21:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.