"Andrus" <kobruleht2@hot.ee> writes:
> 2007-06-13 03:49:10 ERROR: deadlock detected
> 2007-06-13 03:49:10 DETAIL: Process 3280 waits for AccessExclusiveLock on
> relation 233893 of database 233756; blocked by process 2508.
> Process 2508 waits for ShareUpdateExclusiveLock on relation 233988 of
> database 233756; blocked by process 3280.
> 2007-06-13 03:49:10 STATEMENT: ALTER TABLE desktop ADD FOREIGN KEY
> (alamklass) REFERENCES andmetp ON UPDATE CASCADE DEFERRABLE
> and script terminates after 5.5 hours running yesterday night.
This might be a good reason not to run the script as a single long
transaction --- it's probably accumulating locks on a lot of different
tables. Which would be fine if it was the only thing going on, but
evidently it isn't.
regards, tom lane