Re: [bug] Table not have typarray when created by single user mode - Mailing list pgsql-bugs

From shawn wang
Subject Re: [bug] Table not have typarray when created by single user mode
Date
Msg-id CA+T=_GVJ_GHyJ5Y_8WH9X0vyeM=cgZNHiZqTcCDJksc6SHuM1Q@mail.gmail.com
Whole thread Raw
In response to Re: [bug] Table not have typarray when created by single user mode  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [bug] Table not have typarray when created by single user mode
List pgsql-bugs
Alvaro Herrera <alvherre@2ndquadrant.com> 于2020年5月19日周二 下午5:18写道:
On 2020-Apr-14, wenjing wrote:

> However, if such a table exists, an error with pg_upgrade is further raised
>
> ./initdb -k -D datanew
> ./pg_upgrade -d data -d datanew - b. -b.
>
> Restoring database schemas in the new cluster
>   postgres                                                 
> *failure*
>
> Consult the last few lines of "pg_upgrade_dump_13580.log" for
> the probable cause of the failure.
> Failure, exiting
>
> pg_restore: from TOC entry 200; 1259 13581 TABLE t_create_by_standalone wenjing
> pg_restore: error: could not execute query: ERROR:  pg_type array OID value not set when in binary upgrade mode

Maybe the solution is to drop the table before pg_upgrade.

Hi, I don't understand about dropping the table.
Although single-user mode is used for bootstrapping by initdb. Sometimes it is used for debugging or disaster recovery.
However, it is still possible for users to process data in this mode. If only the table is deleted,
I worry that it will cause inconvenience to the user.
I don't understand why we must be IsUnderPostmaster to create an array type too. 
If we could create an array type in single-user mode, there is not this issue.

Regards,

--
Shawn Wang
 

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16452: pgp_sym_encrypt_bytea with compress-level=6 : Wrong key or corrupt data
Next
From: PG Bug reporting form
Date:
Subject: BUG #16453: Not able to load a 10gb file.