Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNuP5-0006lh-33 for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Apr 2020 08:25:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jNuP3-0004y7-U0 for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Apr 2020 08:25:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNuP3-0004xy-Kz for pgsql-bugs@lists.postgresql.org; Mon, 13 Apr 2020 08:25:13 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jNuP1-0003KA-3k for pgsql-bugs@lists.postgresql.org; Mon, 13 Apr 2020 08:25:13 +0000 Received: by mail-pg1-x544.google.com with SMTP id p8so4169781pgi.5 for ; Mon, 13 Apr 2020 01:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:cc:to; bh=QELEiVhftUlAbqEvsFAaNROFppIHu/wgwQyR+vPAa/M=; b=fcarbbDWJXkV3e8F/AcP9+jon0MqOIecStjvmBL/XEwTOmU9lljM7n/a0CJDP5Dz1n 8Qkn3iQ3AnLs71xZJewBVoQnPYTzc27/dBvHw9Dx2N60HwwKkYppy6+ztCudk0OtH8oU yyRiLuIoB/vg4pkHxEUi51r+AGmwgGr5jO03Sd3Jyu4V1D4kzt+rMfgtAEkNI8J+b105 cKsQ5yFRoelN3MgxxPq8pwSNK3SOLLleOCZQuVa+/Nk6IOYSD6BLYWn2tN6WgmkMyUxr XF/clI7Eazkb4WGjRGx5FgNxKPheNHkKAzipdFfQjIjI/fAuSjnjf2UT3mI6jYaZqBJS Cd/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:cc:to; bh=QELEiVhftUlAbqEvsFAaNROFppIHu/wgwQyR+vPAa/M=; b=bweNDg1omzedfmHydsGSNsJ6OhSaFp4GWhNXd0BUWZLHMl5djDhMbhQe78/RgVLBdc D0Vc7NGdWnkf5nPHdDsJ5iLJJZK1Y/nAZxl/FOiXqiE2kOV2i7UomkENDfFXF7g4xFEp LAN4LNDYxfJnuVjS8cvRo7Lan2Chwlp3tb7SI8W4RQuxJ35qScM78qj61uWfmYT5E8YI 1zjbb+/CAaVUFE19cUdOvehOwmqw+wb/PxMVtmW+gmipQGWGbhCKVL7YYBEsMYxCTQmj iodEFy1ZysTO5mo8b04Qi4pJDJNDSi9NEoOhral0pRc/G+BIItUX6ryRXa0bqkoojfMU +9EA== X-Gm-Message-State: AGi0PualIg79xmhl+mGa3bUxidhke8ThyciGPLWLoGCqKmcD+VJZlmUb a5GoKZr6UzxU9Mq7qg/DRwLEx40IwEz9PQ== X-Google-Smtp-Source: APiQypI08mxW4IAGIW648hXq2R3b/jTSJ9q8p0rZzwsMH/ZsFOa2FgSCKW/1i4AvkSfHrQQKQ9oW2Q== X-Received: by 2002:a62:e803:: with SMTP id c3mr1445507pfi.228.1586766308748; Mon, 13 Apr 2020 01:25:08 -0700 (PDT) Received: from [127.0.0.1] ([47.251.4.198]) by smtp.gmail.com with ESMTPSA id q198sm8075592pfc.187.2020.04.13.01.25.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Apr 2020 01:25:08 -0700 (PDT) From: wenjing Content-Type: multipart/alternative; boundary="Apple-Mail=_317CCB43-B905-4578-91EA-FD485743E4E7" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: [bug] Table not have typarray when created by single user mode Message-Id: <761F1389-C6A8-4C15-80CE-950C961F5341@gmail.com> Date: Mon, 13 Apr 2020 16:25:02 +0800 Cc: tushar To: pgsql-bugs@lists.postgresql.org X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_317CCB43-B905-4578-91EA-FD485743E4E7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi=20 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=3D# select oid,relname,reltype from pg_class where relname like = 't_create%'; oid | relname | reltype=20 -------+------------------------+--------- 13581 | t_create_by_standalone | 13582 16384 | t_create_by_psql | 16386 (2 rows) postgres=3D# SELECT oid,typname, typarray FROM pg_catalog.pg_type WHERE = oid in (13582,16386); oid | typname | typarray=20 -------+------------------------+---------- 13582 | t_create_by_standalone | 0 16386 | t_create_by_psql | 16385 (2 rows) Use single user mode (t_create_by_standalone) typarray =3D 0, but use = psql t_create_by_psql typarray has oid. Is there something wrong to have different catalog information with the = same sql? --Apple-Mail=_317CCB43-B905-4578-91EA-FD485743E4E7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
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=3D# 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=3D# 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 =3D 0, but use psql t_create_by_psql typarray has = oid.

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

= --Apple-Mail=_317CCB43-B905-4578-91EA-FD485743E4E7--