Re: DeadLocks...

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: DeadLocks...
Дата
Msg-id AFCCBB403D7E7A4581E48F20AF3E5DB20363F4DF@EXADV1.host.magwien.gv.at
обсуждение исходный текст
Ответ на DeadLocks...  (<tom@tacocat.net>)
Список pgsql-general
tom wrote:
> I found a problem with my application which only occurs under
> high loads (isn't that always the case?).
>
> insert into tokens (token)
> select [...]
>
> This works 99% of the time.
>
> But everyone once in a long while it seems that I hit simultaneaous
> execute() statements that deadlock on the insertion.

The SELECT statement will not request a row lock and consequently
very likely has nothing to do with the deadlock.

That leaves only the INSERT itself.

What is the table definition of "tokens" (with indexes and constraints)?
Is there concurrent database activity of any kind?
What is the scope of the transaction that contains the INSERT
statement - does it contain multiple INSERT statements? Other
statements as well?

Yours,
Laurenz Albe

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

Предыдущее
От: Erwin Brandstetter
Дата:
Сообщение: Re: how to speed up query
Следующее
От: Adrian von Bidder
Дата:
Сообщение: Q: Tree traversal with SQL query?