Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jC8Lg-0007U2-Gh for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2020 20:53:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jC8Lf-0007Ii-4A for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Mar 2020 20:53:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jC8Le-0007Ia-RG for pgsql-hackers@lists.postgresql.org; Wed, 11 Mar 2020 20:53:02 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jC8Lb-0007Ig-JM for pgsql-hackers@postgresql.org; Wed, 11 Mar 2020 20:53:02 +0000 Received: by mail-qt1-x842.google.com with SMTP id f17so1399457qtq.6 for ; Wed, 11 Mar 2020 13:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=9M1Z6IrxztntUvP9tIUN3+WTU/2ccdGcKy3mZd+qF2g=; b=MZjIDmKo3FfmoTKTkxYWJ/UijcsvgoWj4iCXCjVkSLFJ0VZ9O4YUm1GxqS1nGQTobM aQSeIigaHSa//A2ple9GzeIqUrarErvzN2v+fvikuW3Xana3l5i40ZOh4WsjeeAgeUiJ RsrrEafFHlh8Jo9TXDvu9JhxiXV4cKXgPd2i5iHV6q6BsevPWwXQs+3qAGLpcZMvH3Zw qJ/ZMWZSCcz5THy574WJQ5paziLFEGxs2C4XrTJzg+x/ewGmE+2y2SQMDRRTkMi0gNrG uVZSMtjAa5cHbdPwUbiddIHmDIJfMF6crJL6U+fX5Nk4qRN9RPsRFtyTJyChWEMDElag aKyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=9M1Z6IrxztntUvP9tIUN3+WTU/2ccdGcKy3mZd+qF2g=; b=c6fByVYvqJMESr+WjoqMNubHWQMj8dsRy6enVCCPFdjyc3K2BkrE1M/WlE82d0vlPn +mN9KV/JPOQ3otO/dngc2pJxrGoALoN6q/WT9ot7AnzvMpnV1kxp3WshDCPnnFlh3x2x ZeigBhOMDqSgIiK2//7ZyaHuD7AWWRNRt1GpQkbb6knSS5vNQBR/WGhqXNwZyUV3vfOy PV+33YGr8rO7yKqeZX0GqBDrQ+gIPbju0TITW/LKDzmq2M5uQ81I0wBp5lEstl2Nl0SX vrpKqoapvs1bUyAP2/IIlRZwJBWUuzFrVjsZuBMYnIT/M2dOhJIjaNltSWKQ5/awrSTX 7atA== X-Gm-Message-State: ANhLgQ21tHKbYA8Eiyf7oACq5I8dn1ogXF0nkWsk8tHADW21xtiawDYT hIGYzcQVbphqxjIAQmWeUKbP5g== X-Google-Smtp-Source: ADFU+vteXVDUsbyEgsqSMXCjtUafYCLPIUufNDQRPibxXiIsSiBHPx5aMiMYwI4Tkl0s/+i86ggUQw== X-Received: by 2002:ac8:5351:: with SMTP id d17mr4464396qto.190.1583959977605; Wed, 11 Mar 2020 13:52:57 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.31.1]) by smtp.gmail.com with ESMTPSA id j13sm6305206qkl.41.2020.03.11.13.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 13:52:57 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 9F995300AB8; Wed, 11 Mar 2020 17:52:54 -0300 (-03) Date: Wed, 11 Mar 2020 17:52:54 -0300 From: Alvaro Herrera To: Tom Lane Cc: Michael Paquier , Julien Rouhaud , Andres Freund , pgsql-hackers Subject: Re: Add an optional timeout clause to isolationtester step. Message-ID: <20200311205254.GA2648@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <24078.1583958800@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Mar-11, Tom Lane wrote: > We could re-use Julien's ideas about the isolation spec syntax by > making it be, roughly, > > step "" { } [ blocked if "" "" ] > > and then those items would need to be passed as parameters of the prepared > query. I think for test readability's sake, it'd be better to put the BLOCKED IF clause ahead of the SQL, so you can write it in the same line and let the SQL flow to the next one: STEP "long_select" BLOCKED IF "lwlock" "ClogControlLock" { select foo from pg_class where ... some more long clauses ... } otherwise I think a step would require more lines to write. > I'd like to see an attempt to rewrite some of the existing > timeout-dependent test cases to use this facility instead of > long timeouts. If we could get rid of the timeouts in the > deadlock tests, that'd go a long way towards showing that this > idea is actually any good. +1. Those long timeouts are annoying enough that infrastructure to make a run shorter in normal circumstances might be sufficient justification for this patch ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services