pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Cc: pgbf@twiska.com
Subject: Re: XversionUpgrade tests broken by postfix operator removal
Date: Sat, 19 Sep 2020 20:31:25 -0400
Message-ID: <8f55c45d-cbdb-4339-498d-fd9e8e622859@2ndQuadrant.com> (raw)
In-Reply-To: <690698.1600532463@sss.pgh.pa.us>
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>


On 9/19/20 12:21 PM, Tom Lane wrote:
> Andrew Dunstan <andrew.dunstan@2ndquadrant.com> 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

Attachments:

bf-xversion-operator-hotfix.patch (text/x-patch, 1.4K) download 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'

view thread (12+ messages)  latest in thread

Message-ID: <8f55c45d-cbdb-4339-498d-fd9e8e622859@2ndQuadrant.com>
Permalink:  ../8f55c45d-cbdb-4339-498d-fd9e8e622859@2ndQuadrant.com/
Also on:    postgresql.org/message-id/8f55c45d-cbdb-4339-498d-fd9e8e622859@2ndQuadrant.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: andrew.dunstan@2ndquadrant.com, tgl@sss.pgh.pa.us, pgbf@twiska.com
  Subject: Re: XversionUpgrade tests broken by postfix operator removal
  In-Reply-To: <8f55c45d-cbdb-4339-498d-fd9e8e622859@2ndQuadrant.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> <8f55c45d-cbdb-4339-498d-fd9e8e622859@2ndQuadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox