Uploaded image for project: 'Apache HAWQ'
  1. Apache HAWQ
  2. HAWQ-1557

DROP TABLE IF EXISTS issues ERROR report

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: backlog
    • Component/s: DDL
    • Labels:
      None

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rlei Radar Da Lei
                Reporter:
                kuien Kuien Liu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: