Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers

Поиск
Список
Период
Сортировка
От Nikhil Sontakke
Тема Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers
Дата
Msg-id CANgU5Zcyvt_Zx_MHt9V4va3JMqciBa6yQGE_R4JffdyBWBp1LQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers  (Nikhil Sontakke <nikhil.sontakke@enterprisedb.com>)
Ответы Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,
 
Ok, understood.


PFA, a patch against git head. We take the AccessShareLock lock on the schema in DefineRelation now. Note that we do not want to interlock with other concurrent creations in the schema. We only want to interlock with deletion activity. So even performance wise this should not be much of an overhead in case of concurrent DDL operations to the same schema.

Adding this in DefineRelation handles creation of tables/views/types/sequences. I do not think we need to do stuff in ALTER commands, because the objects pre-exist and this issue appears to be with new objects only.

Comments?

Regards,
Nikhils
Вложения

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

Предыдущее
От: Jan Kundrát
Дата:
Сообщение: Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Re: [patch] Include detailed information about a row failing a CHECK constraint into the error message