![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have tried to correct that by adding a "SET CONSTRAINTS ALL DEFERRED" in every trigger and function, hoping it would solve my problem. Maybe it helped, but it did not solve anything. |
|
I don't know if anyone has a better idea, but I would like to try taking away some FKs in my schema. My problem is that I really don't know which one to delete. There are over 40 tables. Are there rules to do that? Or maybe can I simply wait on the next deadlock, and try understanding who got locked by who? OK, but how can I do that? |
#3
| |||
| |||
|
|
On Fri, 22 Oct 2004, Philippe Lang wrote: I don't know if anyone has a better idea, but I would like to try taking away some FKs in my schema. My problem is that I really don't know which one to delete. There are over 40 tables. Are there rules to do that? Or maybe can I simply wait on the next deadlock, and try understanding who got locked by who? OK, but how can I do that? I think you may be able to do this if you turn on statement locking and try to resurrect the state from the logs. |
#4
| |||
| |||
|
|
I have tried to correct that by adding a "SET CONSTRAINTS ALL DEFERRED" in every trigger and function, hoping it would solve my problem. Maybe it helped, but it did not solve anything. |
|
I don't know if anyone has a better idea, but I would like to try taking away some FKs in my schema. My problem is that I really don't know which one to delete. There are over 40 tables. Are there rules to do that? Or maybe can I simply wait on the next deadlock, and try understanding who got locked by who? OK, but how can I do that? |
#5
| |||
| |||
|
|
I got a deadlock in my database this morning. |
|
11346 ?? R 236:43.23 postmaster: jlroubaty groupefpdb 172.17.10.14 UPDATE (postgres) |
#6
| |||
| |||
|
|
I got a deadlock in my database this morning. |
|
11346 ?? R 236:43.23 postmaster: jlroubaty groupefpdb 172.17.10.14 UPDATE (postgres) |
#7
| |||
| |||
|
|
One more question: i'm surprised there are so many ExclusiveLocks when displaying pg_lock: 33044 32920 11439 RowExclusiveLock t 6514392 14385 ExclusiveLock t 6495858 11439 ExclusiveLock t ...etc... I found in the documentation "EXCLUSIVE: This lock mode is not automatically acquired by any PostgreSQL command." I'm not using any TABLE LOCK or SET TRANSACTION ISOLATION call in the whole database, so where do they come from? I'm accessing the database through ODBC, is that maybe the reason? |
#8
| |||
| |||
|
|
One more question: i'm surprised there are so many ExclusiveLocks when displaying pg_lock: 6514392 14385 ExclusiveLock t 6495858 11439 ExclusiveLock t ...etc... |
|
I found in the documentation "EXCLUSIVE: This lock mode is not automatically acquired by any PostgreSQL command." |
![]() |
| Thread Tools | |
| Display Modes | |
| |