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 1jb4oF-0005fL-6J for pgsql-bugs@arkaria.postgresql.org; Tue, 19 May 2020 16:09:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jb4oC-0001Te-Hk for pgsql-bugs@arkaria.postgresql.org; Tue, 19 May 2020 16:09:36 +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 1jb4oC-0001TW-Bl for pgsql-bugs@lists.postgresql.org; Tue, 19 May 2020 16:09:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jb4oA-0000HL-CM for pgsql-bugs@lists.postgresql.org; Tue, 19 May 2020 16:09:35 +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 04JG9SdK000984; Tue, 19 May 2020 12:09:28 -0400 From: Tom Lane To: Alvaro Herrera cc: shawn wang , wenjing , pgsql-bugs@lists.postgresql.org, tushar Subject: Re: [bug] Table not have typarray when created by single user mode In-reply-to: <20200519153239.GA17266@alvherre.pgsql> References: <20200519153239.GA17266@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 19 May 2020 11:32:39 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <982.1589904568.1@sss.pgh.pa.us> Date: Tue, 19 May 2020 12:09:28 -0400 Message-ID: <983.1589904568@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > I think the argument to have that error check there, is that it's a > cross-check to avoid pg_upgrade bugs for cases where > binary_upgrade_next_array_type_oid is not set when it should have been > set. But I think we've hammered the pg_upgrade code sufficiently now, > that we don't need that check anymore. Any bugs that result in that > behavior will be very evident by lack of consistency on some upgrade > anyway. I don't buy that argument at all; that's a pretty critical cross-check IMO, because it's quite important that pg_upgrade control all type OIDs assigned in the new cluster. And I think it's probably easier to break than you're hoping :-( I think a safer fix is to replace the IsUnderPostmaster check in heap_create_with_catalog with !IsBootstrapProcessingMode() or the like. That would have the result that we'd create array types for the information_schema views, as well as the system views made in system_views.sql, which is slightly annoying but probably no real harm in the big scheme of things. (I wonder if we ought to reverse the sense of the adjacent relkind check, turning it into a blacklist, while at it.) I remain however of the opinion that doing this sort of thing in single-user mode, or really much of anything beyond emergency vacuuming, is unwise. regards, tom lane