Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIZHq-0006NN-3v for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Oct 2019 14:19:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iIZHo-0000uk-JL for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Oct 2019 14:19:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIZHo-0000ud-BK for pgsql-bugs@lists.postgresql.org; Thu, 10 Oct 2019 14:19:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iIZHi-0000pN-1S for pgsql-bugs@lists.postgresql.org; Thu, 10 Oct 2019 14:19:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9AEJCgn030707; Thu, 10 Oct 2019 10:19:12 -0400 From: Tom Lane To: Tomas Vondra cc: Andres Freund , buschmann@nidsa.net, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16045: vacuum_db crash and illegal memory alloc after pg_upgrade from PG11 to PG12 In-reply-to: <20191010134303.bkwjzchjb2w66iro@development> References: <16045-673e8fa6b5ace196@postgresql.org> <20191009132436.uugh4r3be6vw6ex4@development> <20191009135907.km2b5nrzflcz6xey@development> <20191009141841.my6k44wfiaquj3ks@development> <20191009230759.ge66neof5qj627a2@development> <19314.1570663125@sss.pgh.pa.us> <20191009232836.jg77wccqwy5fgs6s@development> <20265.1570664514@sss.pgh.pa.us> <20191010014813.3b2btmkakhrskwgd@alap3.anarazel.de> <20191010134303.bkwjzchjb2w66iro@development> Comments: In-reply-to Tomas Vondra message dated "Thu, 10 Oct 2019 15:43:03 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30705.1570717152.1@sss.pgh.pa.us> Date: Thu, 10 Oct 2019 10:19:12 -0400 Message-ID: <30706.1570717152@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tomas Vondra writes: > Fair enough, attached is a patch doing that, I think. Maybe the file > should be named differently, as it contains other objects than just > tables. Seems about right, though I notice it will not detect domains over sql_identifier. How much do we care about that? To identify such domains, I think we'd need something like WHERE attypid IN (recursive-WITH-query), which makes me nervous. We did support those starting with 8.4, which is as far back as pg_upgrade will go, so in theory it should work. But I think we had bugs with such cases in old releases. Do we want to assume that the source server has been updated enough to avoid any such bugs? The expense of such a query might be daunting, too. regards, tom lane