idle-in-transaction timeout error does not give a hint
От | Tatsuo Ishii |
---|---|
Тема | idle-in-transaction timeout error does not give a hint |
Дата | |
Msg-id | 20181128.121737.1400726037698116085.t-ishii@sraoss.co.jp обсуждение исходный текст |
Ответы |
RE: idle-in-transaction timeout error does not give a hint
Re: idle-in-transaction timeout error does not give a hint |
Список | pgsql-hackers |
idle-in-transaction timeout error closed the session. I think in this case the error message should give a hint something like other errors (for example ERRCODE_CRASH_SHUTDOWN or ERRCODE_T_R_SERIALIZATION_FAILURE) to ask users to reconnect. Attached patch does that. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index a3b9757565..c3e4380603 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -3138,7 +3138,9 @@ ProcessInterrupts(void) if (IdleInTransactionSessionTimeout > 0) ereport(FATAL, (errcode(ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT), - errmsg("terminating connection due to idle-in-transaction timeout"))); + errmsg("terminating connection due to idle-in-transaction timeout"), + errhint("In a moment you should be able to reconnect to the" + " database and repeat your command."))); else IdleInTransactionSessionTimeoutPending = false;
В списке pgsql-hackers по дате отправления: