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 1lcXxf-0004uL-NR for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Apr 2021 18:34:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lcXxe-0005LP-BD for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Apr 2021 18:33:58 +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 1lcXxd-0005LI-NP for pgsql-hackers@lists.postgresql.org; Fri, 30 Apr 2021 18:33:58 +0000 Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lcXxZ-0006UU-C9 for pgsql-hackers@lists.postgresql.org; Fri, 30 Apr 2021 18:33:56 +0000 Received: by mail-ot1-x32a.google.com with SMTP id x54-20020a05683040b6b02902a527443e2fso14157550ott.1 for ; Fri, 30 Apr 2021 11:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Xom1oETCWSnsQkA8ZLIvYOD3fxaGkVK2BdYFFs89yww=; b=0iqOCucv4mOkfF07iQ3sm1Lerrx6h72GQGyFqjUWDT742KXV/ZFiJg+9QYUPXC5u4J fOSMyOGjcx7yb03rkexhkbQc55ps9hQJCcMGnVHPwj1BfO6cqC4TYg+MqZ2wCD9EoVfz e/IJc/ISB2SsOtnLP/6tdtJbYY5dLYE2y3pda3SDi4PLkJlPvVMRVtvdU9jygDpLn104 klPPblVvcJudtZK2PGdcb/jtSwJqYRI+8ahktwFsqwQJDENj9tZVwZPL+5vbf06bd+xM QT+IGYpirt0UAXVaonddH5Ine/7vKFWENNfPFwUGNLn6S6Fll4vkXwcIfovLCVw7xnON bNfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Xom1oETCWSnsQkA8ZLIvYOD3fxaGkVK2BdYFFs89yww=; b=OjiyUoHyMeO7PmTnL63XrJwW114L/riNc4tu/ejpcdxLjTAQBO8qT9OIQI9z9i7ILN h6po7PDS4Y3tXTVMb+Y2bP+Q/TY7rq0V4HD8LaUTb5yy8a9eZ9aG5TqW7/Z1KWIrUCgd E7MNSKoMrjipMlji+ErshJDbu2RwpItmHFrmynOKHeHkQQkQdwvK22Fz9RSyQkWg6Tyx kIJeHYdYriYdSwVHw1rcIrMbDJ5/bHRpvS9N1LdQ5QvpyUOxj/x1bgby+IyPuiD3uBdn OGrXkuVHLZtVdcfqtL65v6J0+7+7CIlY6PnNWVkpETOegpg4a0+xkl9uPryd20u/L/0K 36eQ== X-Gm-Message-State: AOAM531Oh68GWe40647nFYbqvLheWgrug3qrpcO3TAd1IuRdisAsmcyv KrVaEbjh4qSzPIvLDGrBuTdIzg== X-Google-Smtp-Source: ABdhPJwxGF8q9PT3TNLJ03O6WZbzo12wQTufiFUTjDE7GNa2wDQjsbc9rUa8yAvXAkuopmKrltrjJQ== X-Received: by 2002:a05:6830:1391:: with SMTP id d17mr4701023otq.58.1619807631780; Fri, 30 Apr 2021 11:33:51 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id p11sm796214oti.53.2021.04.30.11.33.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Apr 2021 11:33:50 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 06A7B800B42; Fri, 30 Apr 2021 13:33:48 -0500 (CDT) Date: Fri, 30 Apr 2021 13:33:48 -0500 From: Justin Pryzby To: Tom Lane Cc: Andrew Dunstan , Bruce Momjian , Peter Eisentraut , Tomas Vondra , Andres Freund , buschmann@nidsa.net, pgsql-hackers@lists.postgresql.org, Noah Misch Subject: Re: pg_upgrade test for binary compatibility of core data types Message-ID: <20210430183348.GQ27406@telsasoft.com> References: <20201216172222.GS30237@telsasoft.com> <20201227190729.GB26311@telsasoft.com> <20210112041352.GY1849@telsasoft.com> <20210112171559.GO4320@momjian.us> <20210112172753.GC1849@telsasoft.com> <20210112175356.GP4320@momjian.us> <66753439-83ae-7be5-6e41-9537a6041a39@dunslane.net> <1575064.1615060903@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: <1575064.1615060903@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Mar 06, 2021 at 03:01:43PM -0500, Tom Lane wrote: > Peter Eisentraut writes: > > On 2021-01-12 22:44, Andrew Dunstan wrote: > >> Cross version pg_upgrade is tested regularly in the buildfarm, but not > >> using test.sh. Instead it uses the saved data repository from a previous > >> run of the buildfarm client for the source branch, and tries to upgrade > >> that to the target branch. > > > Does it maintain a set of fixups similar to what is in test.sh? Are > > those two sets the same? > > Responding to Peter: the first answer is yes, the second is I didn't > check, but certainly Justin's patch makes them closer. Right - I had meant to send this. https://github.com/PGBuildFarm/client-code/blob/master/PGBuild/Modules/TestUpgradeXversion.pm $opsql = 'drop operator if exists public.=> (bigint, NONE)'; .. my $missing_funcs = q{drop function if exists public.boxarea(box); drop function if exists public.funny_dup17(); .. my $prstmt = join(';', 'drop operator if exists #@# (bigint,NONE)', 'drop operator if exists #%# (bigint,NONE)', 'drop operator if exists !=- (bigint,NONE)', .. $prstmt = join(';', 'drop operator @#@ (NONE, bigint)', .. 'drop aggregate if exists public.array_cat_accum(anyarray)', > I spent some time poking through this set of patches. I agree that > there's problem(s) here that we need to solve, but it feels like this > isn't a great way to solve them. What I see in the patchset is: For starters, is there a "release beta checklist" ? Testing test.sh should be on it. So should fuzz testing. > v4-0001 mostly teaches test.sh about specific changes that have to be > made to historic versions of the regression database to allow them > to be reloaded into current servers. As already discussed, this is > really duplicative of knowledge that's been embedded into the buildfarm > client over time. It'd be better if we could refactor that so that > the buildfarm shares a common database of these actions with test.sh. > And said database ought to be in our git tree, so committers could > fix problems without having to get Andrew involved every time. > I think this could be represented as a psql script, at least in > versions that have psql \if (but that came in in v10, so maybe > we're there already). I started this. I don't know if it's compatible with the buildfarm client, but I think any issues maybe can be avoided by using "IF EXISTS". > v4-0002 is a bunch of random changes that mostly seem to revert hacky > adjustments previously made to improve test coverage. I don't really > agree with any of these, nor see why they're necessary. If they > are necessary then we need to restore the coverage somewhere else. > Admittedly, the previous changes were a bit hacky, but deleting them > (without even bothering to adjust the relevant comments) isn't the > answer. It was necessary to avoid --wal-segsize and -g to allow testing upgrades from versions which don't support those options. I think test.sh should be portable back to all supported versions. When those options were added, it broke test.sh upgrading from old versions. I changed this to a shell conditional for the "new" features: | "$1" -N -A trust ${oldsrc:+--wal-segsize 1 -g} Ideally it would check the version. > v4-0003 is really the heart of the matter: it adds a table with some > previously-not-covered datatypes plus a query that purports to make sure > that we are covering all types of interest. Actually the 'manytypes' table intends to include *all* core datatypes itself, not just those that aren't included somewhere else. I think "included somewhere else" depends on the order of the regression these, and type_sanity runs early, so the table might need to include many types that are created later, to avoid "false positives" in the associated test. > But I'm not sure I believe > that query. It's got hard-wired assumptions about which typtype values > need to be covered. Why is it okay to exclude range and multirange? > Are we sure that all composites are okay to exclude? Likewise, the > restriction to pg_catalog and information_schema schemas seems likely to > bite us someday. There are some very random exclusions based on name > patterns, which seem unsafe (let's list the specific type OIDs), and > again the nearby comments don't match the code. But the biggest issue > is that this can only cover core datatypes, not any contrib stuff. I changed to use regtype/OIDs, included range/multirange and stopped including only pg_catalog/information_schema. But didn't yet handle composites. > I don't know what we could do about contrib types. Maybe we should > figure that covering core types is already a step forward, and be > happy with getting that done. Right .. this is meant to at least handle the lowest hanging fruit. -- Justin --EuxKj2iCbKjpUGkD Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v5-0001-WIP-pg_upgrade-test.sh-changes-needed-to-allow-te.patch"