Re: Is this the expected behaviour for DDL-query execution?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is this the expected behaviour for DDL-query execution?
Дата
Msg-id 2684.1242058486@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is this the expected behaviour for DDL-query execution?  (Thomas Johansson <thomas.johansson@agama.tv>)
Ответы Re: Is this the expected behaviour for DDL-query execution?
Список pgsql-bugs
Thomas Johansson <thomas.johansson@agama.tv> writes:
> When performing an DROP TABLE query on a partition when one or more
> other threads are at the same time performing updates on the very same
> partitioned table (UPDATES which does not reference the partition key
> column!, i.e. all available partitions has to be checked for the row to
> be updated) which the partition are being dropped from I get the
> following errors:

> pg_log:
> 2009-05-10 00:00:41.451 CEST> ERROR:  could not open relation with OID 24223

Yeah, this is possible because DROP TABLE does not attempt to acquire
exclusive lock on the victim table's parent(s).  So if a concurrent
query operating on the parent had already obtained the victim table's
OID from pg_inherit, it would get this failure.

It's somewhat annoying but I'm not sure the cure wouldn't be worse than
the disease.  In particular, a straight attempt to lock the parent would
result in deadlock failures in exactly the cases where you get this
error now.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Thomas Johansson
Дата:
Сообщение: Is this the expected behaviour for DDL-query execution?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4721: All sub-tables incorrectly included in search plan for partitioned table