Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA01271 for ; Sun, 16 May 1999 22:41:55 -0400 (EDT) (envelope-from Inoue@tpf.co.jp) Received: from cadzone ([126.0.1.40] (may be forged)) by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id LAA01146 for ; Mon, 17 May 1999 11:26:19 +0900 From: "Hiroshi Inoue" To: "pgsql-hackers" Subject: DROP TABLE does not drop a table completely Date: Mon, 17 May 1999 11:30:45 +0900 Message-ID: <000a01bea00d$443b2b60$2801007e@cadzone.tpf.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4 In-Reply-To: <000301be9d2b$638ea580$2801007e@cadzone.tpf.co.jp> Importance: Normal Hi all, This mail is about the original cause of [HACKERS] spinlock freeze ?(Re: INSERT/UPDATE waiting (another example)). > -----Original Message----- > From: owner-pgsql-hackers@postgreSQL.org > [mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Hiroshi Inoue > Sent: Thursday, May 13, 1999 7:29 PM > To: Tom Lane; Wayne Piekarski > Cc: pgsql-hackers@postgreSQL.org > Subject: [HACKERS] spinlock freeze ?(Re: INSERT/UPDATE waiting (another > example)) > > [snip] > > > > Then another one after restarting everything: > > > > ERROR: cannot open segment 1 of relation sessions_done_id_index > > > > I got the same error in my test cases. > I don't understand the cause of this error. > I got this error message by dropping a table while concurrent transactions inserting rows to the same table. I think other transactions should abort with message "Table does not exist". But in most cases the result is not so. It seems that other transactions could proceed before DROP TABLE command is completed. AFAIC heap_destroy_with_catalog() acquires AccessExclusiveLock and releases the lock inside the function. I think that heap_destroy_with_catalog() (or upper level function) should not release the lock. Comments ? Hiroshi Inoue Inoue@tpf.co.jp