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 1jAgvW-0002rt-S8 for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Mar 2020 21:24:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jAgvU-0004w8-Ry for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Mar 2020 21:24:04 +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 1jAgvU-0004vR-Ir for pgsql-hackers@lists.postgresql.org; Sat, 07 Mar 2020 21:24:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jAgvS-0001SX-2y for pgsql-hackers@postgresql.org; Sat, 07 Mar 2020 21:24:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 027LNwKl016531; Sat, 7 Mar 2020 16:23:58 -0500 From: Tom Lane To: Julien Rouhaud cc: Michael Paquier , pgsql-hackers Subject: Re: Add an optional timeout clause to isolationtester step. In-reply-to: <20200307211709.6kfpiddif4uxafg5@nol> References: <20200303092551.GB1890@paquier.xyz> <20200304051510.GE2593@paquier.xyz> <20200305035354.GQ2593@paquier.xyz> <20200306131547.GA2904@nol> <20200307014142.GC1531@paquier.xyz> <20200307061615.c47sju2bytuiaazv@nol> <8441.1583595994@sss.pgh.pa.us> <20200307205328.ffidfyo3me46qscn@nol> <15903.1583615371@sss.pgh.pa.us> <20200307211709.6kfpiddif4uxafg5@nol> Comments: In-reply-to Julien Rouhaud message dated "Sat, 07 Mar 2020 22:17:09 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16529.1583616238.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 07 Mar 2020 16:23:58 -0500 Message-ID: <16530.1583616238@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Julien Rouhaud writes: > On Sat, Mar 07, 2020 at 04:09:31PM -0500, Tom Lane wrote: >> Julien Rouhaud writes: >>> On Sat, Mar 07, 2020 at 10:46:34AM -0500, Tom Lane wrote: >>>> What's the actual need that you're trying to deal with? >>> Testing the correct behavior of non trivial commands, such as CIC/rein= dex >>> concurrently, that fails during the execution. >> Hmm ... don't see how a timeout helps with that? > For reindex concurrently, a SELECT FOR UPDATE on a different connection = can > ensure that the reindex will be stuck at some point, so canceling the co= mmand > after a long enough timeout reproduces the original faulty behavior. Hmm, seems like a pretty arbitrary (and slow) way to test that. I'd envision testing that by setting up a case with an expression index where the expression is designed to fail at some point partway through the build -- say, with a divide-by-zero triggered by one of the tuples to be indexed. regards, tom lane