Re: [GENERAL] Error that shouldn't happen?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] Error that shouldn't happen?
Дата
Msg-id CAKFQuwbDnNxzK59FcL=nvt45vfLsOzOiVLeqka-RHig2Rn1s7w@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Error that shouldn't happen?  (Rob Brucks <rob.brucks@rackspace.com>)
Ответы Re: [GENERAL] Error that shouldn't happen?  (Rob Brucks <rob.brucks@rackspace.com>)
Список pgsql-general
On Thu, May 18, 2017 at 12:48 PM, Rob Brucks <rob.brucks@rackspace.com> wrote:

I am unable to figure out how the trigger was able to successfully create the table, but then fail creating the index.  I would have expected one thread to "win" and create both the table and index, but other threads would fail when creating the table… but NOT when creating the index.


​I don't fully comprehend the locking involved here but if you want a failure while creating the table you shouldn't use "IF NOT EXISTS".  ​On the other side adding "IF NOT EXISTS" to the CREATE INDEX will supposedly prevent the error you are seeing.

The trigger that failed to create the index also failed to create the table - it just didn't care because of the IF NOT EXISTS.  At least this is what I am observing from your description.

David J.

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

Предыдущее
От: Rob Brucks
Дата:
Сообщение: [GENERAL] Error that shouldn't happen?
Следующее
От: Rob Brucks
Дата:
Сообщение: Re: [GENERAL] Error that shouldn't happen?