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 1k8OM9-0007Zj-RV for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2020 13:42:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k8OM8-0000Yk-Pz for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Aug 2020 13:42:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k8OIy-0004RU-O6 for pgsql-hackers@lists.postgresql.org; Wed, 19 Aug 2020 13:39:05 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k8OIu-0005lA-0l for pgsql-hackers@lists.postgresql.org; Wed, 19 Aug 2020 13:39:03 +0000 Received: by mail-qt1-x841.google.com with SMTP id t23so17764965qto.3 for ; Wed, 19 Aug 2020 06:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=9VGE/Ie/ruVW2hzgROXMt/2mgZdzcmTij701KE/zfSo=; b=jy3VkppfL9hWb6dUnL+d3betTzNKxn6m3FW3ccr3kWpxyTpv++BN6CTu0P+B4f3BwL L9nC6W174+u14WJt26BAWr372JrexbkfBowRipUmeGJp2q+7gNEH55ieDoXU7rnKXLmf Rrw1kwpeWsqJBlYFBBfeuvhOfke96JqBfshPkxyYnxji8jUhjydncHs0LMmEak2hxiyD U1tWNg9rmAGht2GwkH3vvj4I3hhMiVpz9ktd7AEKc/XLZtqJ5sDtfboe+lSaMwLO9Rlo L2ewCssS+N3Ht+Q0PU1yZXWkc2rWteAEN5Vc98FbjwGr/nbNOkup+yC8iRhBuyZpjCV6 pYow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=9VGE/Ie/ruVW2hzgROXMt/2mgZdzcmTij701KE/zfSo=; b=GzpjgYXXuL2/02fliK+YhpUrcfdnUobO+XedtGxiEjO7ijM77FwyFPPHiYwr6C18Cp bW1KTyG9ntRunzvP1mLdv4+bhCDbo+ttc3XCd8LOlXgz8DIdi0yl8KZx0cdn9KSvTjCu u3G6aXrfBSey86FO/BiIwiQQ0+K6fayn+0kkQMfFTVb5sik/hCE6W5KMYy5ZNnNlzL3e 1d7aw6BGQnQUi5CNDEhf5i/cT5txoEoGK3xI2P0GTPdKVF/vhxRMtpMLvKqZKXrdU3Hu xYsvJTVXq1UuT8ILUI7Jr7A9nep6cOlXoWT2ZnxDHgHWoYh9a7LGxFXWZUGgECnewXCE K6wA== X-Gm-Message-State: AOAM530HilE86+e9V+yR/ep4Jjj9B76wuzXhpagldVLe9vWQehYINyds iH/xiyuYHk/ZHfJMuGQ72LCr3Hn67S7rOuSCOBFZE90I5w5Rw58PZAtxE3E9tI70Z93YWk/S488 feWOHjSHWc7i5k3EbWim+RmIL0c37ndJhTP3Zbuc8zotE80ln0fmWpgUiZ76nIKARexUQG64W37 /w5vvxQV86zZH23zzJFab+HS+tYw== X-Google-Smtp-Source: ABdhPJyeusvF28BQuHh7tDKbddR+poYJbRkK0NMB8X/VT9AebSzViJcMAIEvKr4U+APPacIZ6rG2oA== X-Received: by 2002:aed:21da:: with SMTP id m26mr22641838qtc.197.1597844338370; Wed, 19 Aug 2020 06:38:58 -0700 (PDT) Received: from ?IPv6:2600:1700:722:4630::43? ([2600:1700:722:4630::43]) by smtp.gmail.com with ESMTPSA id k11sm23387339qkk.93.2020.08.19.06.38.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Aug 2020 06:38:56 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: prepared transaction isolation tests To: Andres Freund , Tom Lane Cc: Michael Paquier , pgsql-hackers@lists.postgresql.org References: <20200818045246.GC3813@paquier.xyz> <20200818051832.r2lixs4qi5whkqco@alap3.anarazel.de> <1175198.1597728077@sss.pgh.pa.us> <20200818202805.5f7rbfh2zyfkzqqq@alap3.anarazel.de> <20200818234532.uiafo5br5lo6zhya@alap3.anarazel.de> <20200819012257.q2okduaaelpinafb@alap3.anarazel.de> Autocrypt: addr=andrew.dunstan@2ndQuadrant.com; prefer-encrypt=mutual; keydata= mQENBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAG0L0FuZHJldyBEdW5zdGFuIDxhbmRyZXcuZHVuc3RhbkAybmRRdWFkcmFudC5jb20+iQFY BBMBAgBCAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgBYhBOQ+WEYd/Hy/RGkVpZn6f8tZ /DuBAhkBBQJd1pSYBQkSzqMsAAoJEJn6f8tZ/DuBJmEIAIVFBIC3qGqh+YTPVTkfowwxpHz0 tZSPjZ6GS/5y62kgo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19 Aug 2020 09:38:55 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200819012257.q2okduaaelpinafb@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 8/18/20 9:22 PM, Andres Freund wrote: > Hi, > > This thread started on committers, at > https://www.postgresql.org/message-id/20200818234532.uiafo5br5lo6zhya%40alap3.anarazel.de > > In it I wanted to add a isolation test around prepared transactions: > > On 2020-08-18 16:45:32 -0700, Andres Freund wrote: >> I think it's worth adding an isolation test. But it doesn't seem like >> extending prepared-transactions.spec makes too much sense, it doesn't >> fit in well. It's a lot easier to reproduce the issue without >> SERIALIZABLE, for example. Generally the file seems more about >> serializable than 2PC... >> >> So unless somebody disagrees I'm gonna add a new >> prepared-transactions-2.spec. > > But I noticed that the already existing prepared transactions test > wasn't in the normal schedule, since: > > commit ae55d9fbe3871a5e6309d9b91629f1b0ff2b8cba > Author: Andrew Dunstan > Date: 2012-07-20 15:51:40 -0400 > > Remove prepared transactions from main isolation test schedule. > > There is no point in running this test when prepared transactions are disabled, > which is the default. New make targets that include the test are provided. This > will save some useless waste of cycles on buildfarm machines. > > Backpatch to 9.1 where these tests were introduced. > > diff --git a/src/test/isolation/isolation_schedule b/src/test/isolation/isolation_schedule > index 669c0f220c4..2184975dcb1 100644 > --- a/src/test/isolation/isolation_schedule > +++ b/src/test/isolation/isolation_schedule > @@ -9,7 +9,6 @@ test: ri-trigger > test: partial-index > test: two-ids > test: multiple-row-versions > -test: prepared-transactions > test: fk-contention > test: fk-deadlock > test: fk-deadlock2 > > > The commit confuses me, cause I thought we explicitly enabled prepared > transactions during tests well before that? See > > commit 8d4f2ecd41312e57422901952cbad234d293060b > Author: Tom Lane > Date: 2009-04-23 00:23:46 +0000 > > Change the default value of max_prepared_transactions to zero, and add > documentation warnings against setting it nonzero unless active use of > prepared transactions is intended and a suitable transaction manager has been > installed. This should help to prevent the type of scenario we've seen > several times now where a prepared transaction is forgotten and eventually > causes severe maintenance problems (or even anti-wraparound shutdown). > > The only real reason we had the default be nonzero in the first place was to > support regression testing of the feature. To still be able to do that, > tweak pg_regress to force a nonzero value during "make check". Since we > cannot force a nonzero value in "make installcheck", add a variant regression > test "expected" file that shows the results that will be obtained when > max_prepared_transactions is zero. > > Also, extend the HINT messages for transaction wraparound warnings to mention > the possibility that old prepared transactions are causing the problem. > > All per today's discussion. > > > And indeed, including the test in the schedule works for make check, not > just an installcheck with explicitly enabled prepared xacts. > > > ISTM we should just add an alternative output for disabled prepared > xacts, and re-add the test? here's the context for the 2012 commit. https://www.postgresql.org/message-id/flat/50099220.2060005%40dunslane.net#8b189efc4920e1996ffa4d6a0ef81b9c So I hope any changes that are made will not result in a major slowdown of buildfarm animals. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services