Commit be42015f authored by Robert Haas's avatar Robert Haas

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
f8e5f156 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
parent 958e20e4
...@@ -3912,6 +3912,7 @@ PostgresMain(int argc, char *argv[], ...@@ -3912,6 +3912,7 @@ PostgresMain(int argc, char *argv[],
*/ */
disable_all_timeouts(false); disable_all_timeouts(false);
QueryCancelPending = false; /* second to avoid race condition */ QueryCancelPending = false; /* second to avoid race condition */
stmt_timeout_active = false;
/* Not reading from the client anymore. */ /* Not reading from the client anymore. */
DoingCommandRead = false; DoingCommandRead = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment