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 1klyNB-00026U-To for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Dec 2020 18:03:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1klyNA-0007AO-O6 for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Dec 2020 18:03:00 +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 1klyNA-0007AG-B5 for pgsql-hackers@lists.postgresql.org; Sun, 06 Dec 2020 18:03:00 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1klyN2-0004KJ-Tm for pgsql-hackers@lists.postgresql.org; Sun, 06 Dec 2020 18:02:59 +0000 Received: by mail-il1-x129.google.com with SMTP id r17so10063130ilo.11 for ; Sun, 06 Dec 2020 10:02:52 -0800 (PST) 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=D18OUg28RjoUj3/uIDFp7FrMhVyKfGoZ9MRmVQItGwE=; b=2JLpVcdZFGW+5mHpSIneP8qL+y4lYd/C7x2/KI3UNn61WT32jLfaPeNPZoVLWOsDmu bLqEKgPVxmRkRDcZSvUOsetS2yHo2/mDkT/til4aHlwtPT2mNEMPf8HFi7ejJ4I6buCo Faz/cbg8LA+9K3sVFynDYgl/QhiNtbAOo7p6nVrUxWYKt84PzZ6PG+BujsgGSzYODgGT pPiKkX5/2z+AII1X19l1UGekGNNIQdvYoMI5p7FPxRp/c8h/Zi54moiG/2sekusTVak2 R4JNVJmBUSLm77PuwlIWocr8/OOVgR7PBpAdL2evq9pOZ25WxC0uO4K8mQncWNPYXYbO AvIA== 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=D18OUg28RjoUj3/uIDFp7FrMhVyKfGoZ9MRmVQItGwE=; b=h4D3XApC53ie7r0Pgy1e3fR2oQo7weFDDZ3w19CL55kHtoukQOKJ2QzBiJ8Je+oNBJ /bFZnV0pGtL9x+V23Aa3Yg7e18U0QIwkiyzGS/gZV7mdt0a0/L5e7aheLQ+b5gtsZ7eV QSOzmTjKK0EoU/aPuKOofFoPxZ0y4Gt1zjikKkNtHT3mr00+sRnV8bTD43YzT6rBxJaV /66ZLjsvLF587rIWC3pC5cPDLGud10QXIOuW7+zoauzSJwNGkGHur1GTdp8fjQCKClLj HGacDQ4KgBuMivv9zJ0PSCB/As9WTAruX1SJfP/tHdiX5ijRkZxMT4vAGNEdOispINbQ M/8w== X-Gm-Message-State: AOAM531uRw+egdXZmaL2MAMGRVnf+xNzlTkZMTY4g19wT7i76++01e2h /Y2IMsaipn4MFp1Sc4pGczT71A== X-Google-Smtp-Source: ABdhPJzTH1+gZYoMlvmx0uqOOo0Y1TR6hdBZ6nJH9w+wlyYOHdcNN78dclXFj+ENVpfm65DA5fRX9A== X-Received: by 2002:a92:358e:: with SMTP id c14mr15857811ilf.69.1607277770636; Sun, 06 Dec 2020 10:02:50 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 67sm2981066ilc.40.2020.12.06.10.02.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Dec 2020 10:02:49 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 3EBF48008C1; Sun, 6 Dec 2020 12:02:48 -0600 (CST) Date: Sun, 6 Dec 2020 12:02:48 -0600 From: Justin Pryzby To: Tomas Vondra Cc: Tom Lane , Andres Freund , buschmann@nidsa.net, pgsql-hackers@lists.postgresql.org Subject: pg_upgrade test for binary compatibility of core data types Message-ID: <20201206180248.GI24052@telsasoft.com> References: <1542.1570738460@sss.pgh.pa.us> <20191010204022.6hiiubm2cueu3ghk@development> <20191013001032.lqrn4kqaovhrf77l@development> <17717.1570991208@sss.pgh.pa.us> <20191013203848.2eksimmpux3546wr@development> <27596.1571062600@sss.pgh.pa.us> <20191014163538.cqn6j4cl7s2mk2yz@development> <20191015001817.zei45apgpu5dzngr@development> <20191015044118.GO3599@telsasoft.com> <20191015070725.csmdmdvrlb6klwkg@development> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="WQS/f3aCdEH+xDC1" Content-Disposition: inline In-Reply-To: <20191015070725.csmdmdvrlb6klwkg@development> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --WQS/f3aCdEH+xDC1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I'm finally returning to this 14 month old thread: (was: Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12) On Tue, Oct 15, 2019 at 09:07:25AM +0200, Tomas Vondra wrote: > On Mon, Oct 14, 2019 at 11:41:18PM -0500, Justin Pryzby wrote: > > > > Perhaps it'd be worth creating a test for on-disk format ? > > > > Like a table with a column for each core type, which is either SELECTed from > > after pg_upgrade, or pg_dump output compared before and after. > > IMO that would be useful - we now have a couple of these checks for > different data types (line, unknown, sql_identifier), with a couple of > combinations each. And I've been looking if we do similar pg_upgrade > tests, but I haven't found anything. I mean, we do pg_upgrade the > cluster used for regression tests, but here we need to test a number of > cases that are meant to abort the pg_upgrade. So we'd need a number of > pg_upgrade runs, to test that. I meant to notice if the binary format is accidentally changed again, which was what happened here: 7c15cef86 Base information_schema.sql_identifier domain on name, not varchar. I added a table to the regression tests so it's processed by pg_upgrade tests, run like: | time make -C src/bin/pg_upgrade check oldsrc=`pwd`/11 oldbindir=`pwd`/11/tmp_install/usr/local/pgsql/bin I checked that if I cherry-pick 0002 to v11, and comment out old_11_check_for_sql_identifier_data_type_usage(), then pg_upgrade/test.sh detects the original problem: pg_dump: error: Error message from server: ERROR: invalid memory alloc request size 18446744073709551613 I understand the buildfarm has its own cross-version-upgrade test, which I think would catch this on its own. These all seem to complicate use of pg_upgrade/test.sh, so 0001 is needed to allow testing upgrade from older releases. e78900afd217fa3eaa77c51e23a94c1466af421c Create by default sql/ and expected/ for output directory in pg_regress 40b132c1afbb4b1494aa8e48cc35ec98d2b90777 In the pg_upgrade test suite, don't write to src/test/regress. fc49e24fa69a15efacd5b8958115ed9c43c48f9a Make WAL segment size configurable at initdb time. c37b3d08ca6873f9d4eaf24c72a90a550970cbb8 Allow group access on PGDATA da9b580d89903fee871cf54845ffa2b26bda2e11 Refactor dir/file permissions -- Justin --WQS/f3aCdEH+xDC1 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-WIP-pg_upgrade-test.sh-changes-needed-to-allow-testi.patch"