Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eiulT-0004a6-FR for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Feb 2018 04:21:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eiulS-0007Kk-FC for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Feb 2018 04:21:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eiulR-0007Ka-Ss for pgsql-hackers@lists.postgresql.org; Tue, 06 Feb 2018 04:21:50 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eiulO-0000KA-WC for pgsql-hackers@postgresql.org; Tue, 06 Feb 2018 04:21:48 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E91C420D0C; Mon, 5 Feb 2018 23:21:45 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Mon, 05 Feb 2018 23:21:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=sGMUYm 5gBhPHHiNQo67kf/iGqK2vabxYXoYfSlA+9UI=; b=Th0S7YQs8e3rRcn+jOwjpn F0XlzC6efbUa3L5Vvz6WRjrRixlsrfjumnySBu/D27vX+dXm7YKev76xV3iTv26y UEt9S2GiFSIRUmrztZ6rQxTwrsS30JU71wad+tnFF1Cn/oiNXj5IFh4+ZJePHzTp p9u9w7tFuRGm71eNZRI5xsDvnGMVOxi9Z4u2wnTf1JRTMe6yA0JRcgPjza6BD7bH vUWW7wwhBwY6nuNcAxODgLw61r2bmN1quCwkhJFQy/FTGHV+OmLX5FBguXQ0oOFb pf/3fbrh1cIZg/LNUUkzLPa+hqH4/WdXfITc/NYQTGtcbA/h0Qjc95AETRX6DVEQ == X-ME-Sender: Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 9E09D7E070; Mon, 5 Feb 2018 23:21:45 -0500 (EST) Subject: Re: [COMMITTERS] pgsql: Rearm statement_timeout after each executed query. To: Andres Freund , pgsql-hackers References: From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <6a909374-2602-7136-8c70-397330a418f3@2ndquadrant.com> Date: Mon, 5 Feb 2018 23:21:44 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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