summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas2018-02-09 20:48:18 +0000
committerRobert Haas2018-02-09 20:48:18 +0000
commitbe42015fcc7f91574775a53df9923a36fabddc60 (patch)
tree9a3530848aa1b086c04d88fb2617e83ba2d7e9be /src
parent958e20e42d6c346ab89f6c72e4262230161d1663 (diff)
Clear stmt_timeout_active if we disable_all_timeouts.
Otherwise, we can end up with the flag set when the timeout is actually disabled, leading to misbehavior. Commit f8e5f156b30efee5d0038b03e38735773abcb7ed introduced this bug. Reported by Peter Eisentraut. Analysis and fix by Thomas Munro, tweaked by me. Discussion: http://postgr.es/m/6a909374-2602-7136-8c70-397330a418f3@2ndquadrant.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/tcop/postgres.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index ddc3ec860a..6dc2095b9a 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -3912,6 +3912,7 @@ PostgresMain(int argc, char *argv[],
*/
disable_all_timeouts(false);
QueryCancelPending = false; /* second to avoid race condition */
+ stmt_timeout_active = false;
/* Not reading from the client anymore. */
DoingCommandRead = false;