pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: shawn wang <shawn.wang.pg@gmail.com>
Cc: wenjing <wjzeng2012@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>
Subject: Re: [bug] Table not have typarray when created by single user mode
Date: Tue, 19 May 2020 12:09:28 -0400
Message-ID: <983.1589904568@sss.pgh.pa.us> (raw)
In-Reply-To: <20200519153239.GA17266@alvherre.pgsql>
References: <20200519153239.GA17266@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> 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





view thread (14+ messages)  latest in thread

Message-ID: <983.1589904568@sss.pgh.pa.us>
Permalink:  ../983.1589904568@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/983.1589904568@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, shawn.wang.pg@gmail.com, wjzeng2012@gmail.com, tushar.ahuja@enterprisedb.com
  Subject: Re: [bug] Table not have typarray when created by single user mode
  In-Reply-To: <983.1589904568@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox