Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfZCQ-00008O-LT for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Oct 2021 03:01:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mfZCO-0005gP-IL for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Oct 2021 03:01:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mfZCO-0005gG-3L for pgsql-bugs@lists.postgresql.org; Wed, 27 Oct 2021 03:01:56 +0000 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mfZCL-0005xx-Br for pgsql-bugs@lists.postgresql.org; Wed, 27 Oct 2021 03:01:55 +0000 Received: by mail-qv1-xf36.google.com with SMTP id h11so848519qvk.4 for ; Tue, 26 Oct 2021 20:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ayza/IVaeEgcEb1Ngo4aha7X8cm5Qv66XJZiP2lP9Ks=; b=YeJh/1DsJ+r7+WqAiifI3+CwIxIWTuH6luRm8q4jHqqaOieBciL/ABomtpXzvvO0LI A9mkilJtgWe2C+xlWRNs/CDK9GP9AZg/LLXKULtRH7N2iZHzNh43LDhTwWIAbuhu369f YXHJeyMpD4Dc67+CgbKPQFMe144FzswrANBMA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ayza/IVaeEgcEb1Ngo4aha7X8cm5Qv66XJZiP2lP9Ks=; b=m1wHOYrxevs9d53VInrSJ9eOV/QBoMxquOvKwnmb7WlQBeKVMeCIoqEA84surVywZk qyOEMp6K98xQ/UaHZKsewKBSdCm2Nbi0GD+1fDgcYiwWtZqo5Eq8aaVpy74iDz9peorD iore730UWBj/fgi4HLlG4t+dosBvpET7ztuoB2OZuIMNkfRiogXN0wuw8/lOFFrpNMf3 NgQiMT5I/jD1gziToQWFHxzGibTU86U0agq3BXnS7QBorD2rX7jw+NDX0TH4EGcV9ykQ gLTYtibJqNsQlv14EzZBbe21EEzmpdIYVpTeKDNEhp+Cte/cGhMRQLKYOdOZYGwuqIwF EmOA== X-Gm-Message-State: AOAM533wpw5ou8KqCL8F4o2vKca228S/eIPnV4ilZlE2TuAJwjl34G2H d/G5p/lfBr3VzFq3pex/7WTR+g== X-Google-Smtp-Source: ABdhPJwnJmczylw3EiLMSfkSyEpvPcYbERYNPKB3EQci+8XputaQSt9JSoCG4YEHrIL780JeCxWJcg== X-Received: by 2002:ad4:5188:: with SMTP id b8mr6976845qvp.24.1635303711239; Tue, 26 Oct 2021 20:01:51 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::46]) by smtp.gmail.com with ESMTPSA id br20sm6932426qkb.104.2021.10.26.20.01.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Oct 2021 20:01:48 -0700 (PDT) Date: Tue, 26 Oct 2021 20:01:44 -0700 From: Noah Misch To: Tom Lane Cc: Andrey Borodin , PostgreSQL mailing lists , Michael Paquier , Peter Geoghegan , Andres Freund Subject: Re: conchuela timeouts since 2021-10-09 system upgrade Message-ID: <20211027030144.GA152505@rfd.leadboat.com> References: <64835CF9-D9AA-49BF-A685-01C23B1023C1@yandex-team.ru> <20211024161942.GB3945842@rfd.leadboat.com> <640FA6DC-A998-4499-B3B4-2773685B8C56@yandex-team.ru> <3792312.1635119599@sss.pgh.pa.us> <4170532.1635195582@sss.pgh.pa.us> <20211026015157.GA113335@rfd.leadboat.com> <52098.1635228234@sss.pgh.pa.us> <20211026134500.GA128912@rfd.leadboat.com> <139687.1635277318@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <139687.1635277318@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Oct 26, 2021 at 03:41:58PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Tue, Oct 26, 2021 at 02:03:54AM -0400, Tom Lane wrote: > >> Or more > >> practically, use advisory locks in that script to enforce that only one > >> runs at once. > > > The author did try that. > > Ah, I see: if the other pgbench thread is waiting in pg_advisory_lock, > then it is inside a transaction, so it blocks CIC from completing. > We can get around that though, by using pg_try_advisory_lock and not > proceeding if it fails. Good thought. > The attached POC does this for the 002 test; > it looks like the same thing could be done to 003. > > Now the problem with this is it will only work back to v12, because > pgbench lacks the necessary features before that. However, I think > it's worth doing it like this in versions where we can do so, because > of the load-balancing aspect: this won't waste cycles running CICs > after the inserts have stopped, nor vice versa. > > Thoughts? I tried it out with the fix removed (git checkout fdd965d; git checkout HEAD^ src/include src/backend; git apply CIC-test-with-one-pgbench.patch). Sensitivity (~25%) and runtime (~900ms) were in the same ballpark. Still, even if it doesn't buy back notable cycles, the test code seems easier to read and understand with your change.