Kuien Liu created HAWQ-1557:
-------------------------------

             Summary: DROP TABLE IF EXISTS issues ERROR report
                 Key: HAWQ-1557
                 URL: https://issues.apache.org/jira/browse/HAWQ-1557
             Project: Apache HAWQ
          Issue Type: Bug
          Components: DDL
            Reporter: Kuien Liu
            Assignee: Radar Lei


We may re-produce it with following scripts. Open three PSQL consoles and 
submit them concurrently, then we may find DROP TABLE IF EXISTS issues an ERROR 
report, it defiles the common sense.


Session 1:

postgres=# DROP TABLE IF EXISTS  tbl;
NOTICE:  table "tbl" does not exist, skipping
DROP TABLE
postgres=# CREATE TABLE tbl (id serial, date text, time text, status bool, 
sample1 float, sample2 float, volume int) DISTRIBUTED BY (id);
NOTICE:  CREATE TABLE will create implicit sequence "tbl_id_seq" for serial 
column "tbl.id"
CREATE TABLE
postgres=# INSERT INTO tbl (date, time, status, sample1, sample2, volume) 
SELECT current_date, localtime, (random() > 0.5)::bool, 
trunc(random()::numeric, 8), trunc(random()::numeric, 8), v FROM 
generate_series(1, 1202200) as v;
INSERT 0 1202200

Session 2:

postgres=# DROP TABLE IF EXISTS  tbl;
DROP TABLE

Session 3:

postgres=# DROP TABLE IF EXISTS  tbl;
ERROR:  relation "tbl" does not exist (tablecmds.c:1534)




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to