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 1kJnGW-0000fX-PV for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Sep 2020 00:31:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kJnGT-0004ca-RU for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Sep 2020 00:31:37 +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 1kJnGT-0004cS-Fi for pgsql-hackers@lists.postgresql.org; Sun, 20 Sep 2020 00:31:37 +0000 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kJnGL-0001jh-W3 for pgsql-hackers@lists.postgresql.org; Sun, 20 Sep 2020 00:31:36 +0000 Received: by mail-ot1-x342.google.com with SMTP id 60so9075192otw.3 for ; Sat, 19 Sep 2020 17:31:29 -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-language; bh=5AN7vhnG1ie9F/V5Ut4+koJ39pW2mMXXGASAUtjFdS4=; b=D/xTdkVCeMXeDdvgux3orVRZAT0Dh6xhl4pitMT5RjrVOQM0yAbTJm1jOurFbyZYg7 Vms5tRU+EIVAoNho+SHzJ5clNuTqQJCVvG7tyVkMLPO6A0vr8IiqxzLQrcTtllL3i7r/ 5FQ3tOWQe3Kddqbk/yvAAZmt4rSrnd8s+cJ9yWcmvGmJ3TMa4AFjoLY40As3jEaNAv3Q 8ACuN+v2cVO9GCD1lK+93kZ5SZf81GvZMqIcNeCRQ/KtzuqTRBbb+cZA1vf2d5ypMGaX GqTbiXXE8AjS/Im7SAsvlSfvOKOCzXJuY0Y78SyJQ+upDwp/tGuU9sdcbIceb8xIK+Oe ef5g== 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-language; bh=5AN7vhnG1ie9F/V5Ut4+koJ39pW2mMXXGASAUtjFdS4=; b=ImhQ5ZcuuWoBW0E4V6SH0qXcdRJU4i6yH+vwZp8+XZnQ/H/5mVCpHH1JlwkKaSngeT QkHRs5NYoGkzG4bXn9wLxLVp/QkY3ur+qVMDSQqeHCE6Vm5Vfc5nON02IpuffwJcU/QS 8LxFqLcK5S8yBR9fgIsO03ifZDWRiA3isj1Ts+UN6pkRwVs+bcR07lQEla6irTO7oy4j R+2o4oOktCRGm5R8hWZw/robvT7mlXosmopMZsBdoUw3sWLlTgqB2IQ2qs0BeU2rV9CA F50PFp00KZfazilImtfOCg3TbU/j0iSvr8CYB12gG+v4vZtzFyzJaf1vr/S9ZLhDW73s Z7ew== X-Gm-Message-State: AOAM531XLJc8JgfmALhWV7OGE89uY/OxAtLRkKsqfX387qA2kZVgHvGd wD/1h2WAsTTSJYAMiPCo+sBmuUE8uU+CpTI= X-Google-Smtp-Source: ABdhPJwLPeFzm1huUXMuoKBF6R8RgEFRz1XGT5gPtXdVOt9h6z5P30rM39cdBoSygmRA3Tn13FqF9A== X-Received: by 2002:a9d:4704:: with SMTP id a4mr28261080otf.238.1600561887479; Sat, 19 Sep 2020 17:31:27 -0700 (PDT) Received: from ?IPv6:2600:1700:722:4630::43? ([2600:1700:722:4630::43]) by smtp.gmail.com with ESMTPSA id z5sm5096929otp.16.2020.09.19.17.31.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Sep 2020 17:31:26 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: XversionUpgrade tests broken by postfix operator removal To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org, pgbf@twiska.com References: <449144.1600439950@sss.pgh.pa.us> <3f62db16-29c0-4378-02ff-15677fbec2da@2ndQuadrant.com> <540786.1600460745@sss.pgh.pa.us> <1ac0304a-c3b9-0ca1-871f-a85e161db5e3@2ndQuadrant.com> <541680.1600461869@sss.pgh.pa.us> <584630.1600466747@sss.pgh.pa.us> <16ee55f8-6a38-2f0d-a4e8-b2ab59be8146@2ndQuadrant.com> <686634.1600526634@sss.pgh.pa.us> <304d8c99-46dc-2baf-34db-23e5a52c2bc9@2ndQuadrant.com> <690698.1600532463@sss.pgh.pa.us> 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/5y62kgoZr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db-4339-498d-fd9e8e622859@2ndQuadrant.com> Date: Sat, 19 Sep 2020 20:31:25 -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: <690698.1600532463@sss.pgh.pa.us> Content-Type: multipart/mixed; boundary="------------40323C37D102E5DC6027643F" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------40323C37D102E5DC6027643F Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 9/19/20 12:21 PM, Tom Lane wrote: > Andrew Dunstan writes: >> Here's how cross version upgrade testing works. It uses a cached version of the binaries and data directory. The cache is only refreshed if there's a buildfarm run on that branch. If not, the cached version will just sit there till kingdom come. So all this should normally need for the non-live branches is a one-off adjustment in the cached version of the regression database along the lines I have indicated. My cached versions of 9.2 and 9.3 are two years old. > Hmm, okay, so patching this on gitmaster wouldn't help anyway. > >> But another alternative would be to have the buildfarm module run (on >> versions older than 9.5): >> drop operator @#@ (NONE, bigint); >> CREATE OPERATOR @#@ ( >>     PROCEDURE = factorial, >>     RIGHTARG = bigint >> ); >> On reflection I think that's probably the simplest solution. It will avoid any surprises if the cached version is rebuilt, and at the same time preserve testing the prefix operator. > Works for me. > > OK, I rolled back the changes I made in the legacy branch databases, and this fix worked. For reference, here is the complete hotfix. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --------------40323C37D102E5DC6027643F Content-Type: text/x-patch; charset=UTF-8; name="bf-xversion-operator-hotfix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bf-xversion-operator-hotfix.patch" diff --git a/PGBuild/Modules/TestUpgradeXversion.pm b/PGBuild/Modules/TestUpgradeXversion.pm index 8bc226f..bb9e560 100644 --- a/PGBuild/Modules/TestUpgradeXversion.pm +++ b/PGBuild/Modules/TestUpgradeXversion.pm @@ -434,6 +434,38 @@ sub test_upgrade ## no critic (Subroutines::ProhibitManyArgs) } } + # operators not supported from release 14 + if ( ($this_branch gt 'REL_13_STABLE' || $this_branch eq 'HEAD') + && ($oversion le 'REL_13_STABLE' && $oversion ne 'HEAD')) + { + my $prstmt = join(';', + 'drop operator if exists #@# (bigint,NONE)', + 'drop operator if exists #%# (bigint,NONE)', + 'drop operator if exists !=- (bigint,NONE)', + 'drop operator if exists #@%# (bigint,NONE)'); + + system( "$other_branch/inst/bin/psql -X -e " + . " -c '$prstmt' " + . "regression " + . ">> '$upgrade_loc/$oversion-copy.log' 2>&1"); + return if $?; + + if ($oversion le 'REL9_4_STABLE') + { + # this is fixed in 9.5 and later + $prstmt = join(';', + 'drop operator @#@ (NONE, bigint)', + 'CREATE OPERATOR @#@ (' . + 'PROCEDURE = factorial, ' . + 'RIGHTARG = bigint )'); + system( "$other_branch/inst/bin/psql -X -e " + . " -c '$prstmt' " + . "regression " + . ">> '$upgrade_loc/$oversion-copy.log' 2>&1"); + return if $?; + } + } + my $extra_digits = ""; if ( $oversion ne 'HEAD' --------------40323C37D102E5DC6027643F--