Concurrent execution of pg_relation_size and DROP TABLE

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Concurrent execution of pg_relation_size and DROP TABLE
Date: 2009-09-03 09:59:55
Message-ID: 20090903184308.336A.52131E4D@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I received a trouble-report that a query using pg_relation_size()
ends with an error, "could not open relation". It came from
DROP TABLE was executed concurrently; relation_open() used in
pg_relation_size() raised an error.

Is it reasonable to replace relation_open() calls to try_relation_open() ?
If failed, pg_relation_size() will just return NULLs.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Konoplev 2009-09-03 10:11:02 Re: Feature request: DEFAULT as input value of function argument
Previous Message Ľubomír Varga 2009-09-03 08:35:11 suggestion to improve planer