![]() ![]() It depends on the execution order of operations. The problem does NOT depend on configuration. The most important thing to know is: There is NO MAGIC CONFIGURATION PARAMETER to fix this problem. The default value here is 1 second, which is high enough to avoid pointless deadlock detection attempts, but is still short enough to fix the problem in a useful and timely manner. Why does PostgreSQL wait for some time before it steps in and fixes things? The reason is that deadlock detection is quite expensive, and therefore not immediately triggering it makes sense. ![]() If two transactions are in a conflict, PostgreSQL will not resolve the problem immediately, rather it will wait for deadlock_timeout and then trigger the deadlock detection algorithm to resolve the problem. The reason is that transactions have to wait for one another. Process 70713 waits for ShareLock on transaction 891718 blocked by process 70725.ĬONTEXT: while updating tuple (0,1) in relation "t_data" PostgreSQL waits (deadlock_timeout) and triggers deadlock detection after this timeout (not immediately)ĭETAIL: Process 70725 waits for ShareLock on transaction 891717 blocked by process 70713. Wants to lock the row locked by transaction id: now both are supposed to wait Has to wait until transaction 2 releases the lock on the row containing id = 2
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |