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 1oJezV-0006Mi-U1 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Aug 2022 17:50:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oJeyV-00062D-Ff for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Aug 2022 17:49:35 +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 1oJeyV-0005p1-6N for pgsql-hackers@lists.postgresql.org; Thu, 04 Aug 2022 17:49:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oJeyL-0006Rh-Di; Thu, 04 Aug 2022 17:49:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 274Hn6BF3573177; Thu, 4 Aug 2022 13:49:06 -0400 From: Tom Lane To: Robert Haas cc: "Jonathan S. Katz" , Peter Geoghegan , Andres Freund , Noah Misch , Andrew Dunstan , Bruce Momjian , Michael Paquier , Justin Pryzby , "pgsql-hackers@postgresql.org" , Shruthi Gowda Subject: Re: pg15b2: large objects lost on upgrade In-reply-to: References: <20220730054401.GB3644221@rfd.leadboat.com> <351616.1659192034@sss.pgh.pa.us> <635c8809-3525-7dae-a1a1-0d9069cd86bc@postgresql.org> <2657259.1659460333@sss.pgh.pa.us> <2686054.1659469199@sss.pgh.pa.us> <98286e9b-8fe6-554e-c23f-d67a3df2c30d@postgresql.org> <2687956.1659469881@sss.pgh.pa.us> <20220803202014.77m6z5m7v525p2b4@awork3.anarazel.de> <3128525.1659559617@sss.pgh.pa.us> <3260692.1659568781@sss.pgh.pa.us> <3447873.1659623176@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Thu, 04 Aug 2022 12:43:49 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3573175.1659635346.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 04 Aug 2022 13:49:06 -0400 Message-ID: <3573176.1659635346@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > IMHO it's 100% clear how to make it robust. If you want to check that > two values are the same, you can't let one of them be overwritten by > an unrelated event in the middle of the check. There are many specific > things we could do here, a few of which I proposed in my previous > email, but they all boil down to "don't let autovacuum screw up the > results". It doesn't really matter how robust a test case is, if it isn't testing the thing you need to have tested. So I remain unwilling to disable autovac in a way that won't match real-world usage. Note that the patch you proposed at [1] will not fix anything. It turns off autovac in the new node, but the buildfarm failures we've seen appear to be due to autovac running on the old node. (I believe that autovac in the new node is *also* a hazard, but it seems to be a lot less of one, presumably because of timing considerations.) To make it work, we'd have to shut off autovac in the old node before starting pg_upgrade, and that would make it unacceptably (IMHO) different from what real users will do. Conceivably, we could move all of this processing into pg_upgrade itself --- autovac disable/re-enable and capturing of the horizon data --- and that would address my complaint. I don't really want to go there though, especially when in the final analysis IT IS NOT A BUG if a rel's horizons advance a bit during pg_upgrade. It's only a bug if they become inconsistent with the rel's data, which is not what this test is testing for. regards, tom lane [1] https://www.postgresql.org/message-id/CA%2BTgmoZkBcMi%2BNikxfc54dgkWj4= 1Q%3DZ4nuyHpheTcxA-qfS5Qg%40mail.gmail.com