Search Postgresql Archives

Re: DeadLocks...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux