Re: [bug] Table not have typarray when created by single user mode
shawn wang <shawn.wang.pg@gmail.com>
From: shawn wang <shawn.wang.pg@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: wenjing <wjzeng2012@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-bugs@lists.postgresql.org, tushar <tushar.ahuja@enterprisedb.com>
Date: 2020-05-19T09:40:38Z
Lists: pgsql-bugs, pgsql-hackers
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
Commits
-
Don't create pg_type entries for sequences or toast tables.
- f3faf35f370f 14.0 landed
-
Create composite array types for initdb-created relations.
- f7f70d5e22aa 14.0 landed