Re: [COMMITTERS] pgsql: Rearm statement_timeout after each executed query.

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2018-02-06T04:21:44Z
Lists: pgsql-hackers
On 9/18/17 22:41, Andres Freund wrote:
> Rearm statement_timeout after each executed query.

This appears to have broken statement_timeout behavior in master such
that only every second query is affected by it.  For example:

create table t1 as select * from generate_series(0, 100000000) as _(a);
set statement_timeout = '1s';
explain analyze select from t1 where a = 55;  -- gets canceled
explain analyze select from t1 where a = 55;  -- completes (>1s)
explain analyze select from t1 where a = 55;  -- gets canceled
explain analyze select from t1 where a = 55;  -- completes (>1s)
etc.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Clear stmt_timeout_active if we disable_all_timeouts.

  2. Rearm statement_timeout after each executed query.