pgsql: Further second thoughts about idle_session_timeout patch. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Further second thoughts about idle_session_timeout patch.
Date
Msg-id E1kxYPy-0002OY-VP@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Further second thoughts about idle_session_timeout patch.

On reflection, the order of operations in PostgresMain() is wrong.
These timeouts ought to be shut down before, not after, we do the
post-command-read CHECK_FOR_INTERRUPTS, to guarantee that any
timeout error will be detected there rather than at some ill-defined
later point (possibly after having wasted a lot of work).

This is really an error in the original idle_in_transaction_timeout
patch, so back-patch to 9.6 where that was introduced.

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5db4fdc22472919f97ce83d276fb34b47c794d1f

Modified Files
--------------
src/backend/tcop/postgres.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Tomas Vondra
Date:
Subject: pgsql: Minor fixes in COPY progress docs
Next
From: Tom Lane
Date:
Subject: pgsql: Further second thoughts about idle_session_timeout patch.