Z
Z
Zunga2019-09-20 15:21:12
PostgreSQL
Zunga, 2019-09-20 15:21:12

PostgreSQL not running idle_in_transaction_session_timeout?

Hello everyone, I ask for help.
I'm trying to set up the removal of hung sessions using Postgres, but nothing happens. That is, sessions crash but ~ once an hour, but not after
3 seconds PosgresSQL 11.04
Did:
1) by editing the conf file
2) SET SESSION idle_in_transaction_session_timeout = '5min';
3) idle_in_transaction_session_timeout
4) SET idle_in_transaction_session_timeout TO '3000'
5) ALTER USER postgres SET idle_in_transaction_session_timeout TO 3000;
6) ALTER system set idle_in_transaction_session_timeout to 3000;
Don't forget about SELECT pg_reload_conf();
But the sessions are in the idle status, I'm not deleted (
Maybe something else needs to be done? Could this be because I am connecting as postgres user?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2019-09-20
@melkij

But the sessions are in the idle status, I'm not deleted (

idle != idle in transaction
The setting is also valid for the superuser. Do begin; and wait. After the specified timeout, the session will be killed (however, the client application may notice this only when trying to send a request)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question