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

From: wenjing <wjzeng2012(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Subject: [bug] Table not have typarray when created by single user mode
Date: 2020-04-13 08:25:02
Message-ID: 761F1389-C6A8-4C15-80CE-950C961F5341@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hi

I found an exception using the latest master branch of PGSQL and wanted to check if it was a bug

Please refer this below scenario
1)initdb ./initdb -k -D data
2)Connect to server using single user mode ( ./postgres --single -D data postgres) and create a table
./postgres --single -D data Postgres

PostgreSQL stand-alone backend 13devel
backend>create table t_create_by_standalone(n int);

--Press Ctl+D to exit

3) use pg_ctl start database
pg_ctl -D data -c start

4) use psql connect database, and create a table
create table t_create_by_psql(n int);

5) check the pg_type info
postgres=# select oid,relname,reltype from pg_class where relname like 't_create%';
oid | relname | reltype
-------+------------------------+---------
13581 | t_create_by_standalone | 13582
16384 | t_create_by_psql | 16386
(2 rows)

postgres=# SELECT oid,typname, typarray FROM pg_catalog.pg_type WHERE oid in (13582,16386);
oid | typname | typarray
-------+------------------------+----------
13582 | t_create_by_standalone | 0
16386 | t_create_by_psql | 16385
(2 rows)

Use single user mode (t_create_by_standalone) typarray = 0, but use psql t_create_by_psql typarray has oid.

Is there something wrong to have different catalog information with the same sql?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-04-13 08:36:10 Re: BUG #16337: Finnish Ispell dictionary cannot be created
Previous Message Kamil Jońca 2020-04-13 07:25:35 backend crash

Browse pgsql-hackers by date

  From Date Subject
Next Message 曾文旌 2020-04-13 08:27:59 Re: [Proposal] Global temporary tables
Previous Message Masahiko Sawada 2020-04-13 08:12:22 Re: Issues with replication slots(which created manually) against logical replication