Re: [bug] Table not have typarray when created by single user mode

From: shawn wang <shawn(dot)wang(dot)pg(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: wenjing <wjzeng2012(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)lists(dot)postgresql(dot)org, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Subject: Re: [bug] Table not have typarray when created by single user mode
Date: 2020-05-19 09:40:38
Message-ID: CA+T=_GVJ_GHyJ5Y_8WH9X0vyeM=cgZNHiZqTcCDJksc6SHuM1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-bugs by date

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2020-05-19 10:00:55 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Amit Kapila 2020-05-19 09:04:33 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions