Re: how to speed up query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <kobruleht2(at)hot(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to speed up query
Date: 2007-06-13 21:16:34
Message-ID: 18422.1181769394@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <kobruleht2(at)hot(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message guillermo arias 2007-06-13 21:54:48 inner join problem with temporary tables
Previous Message Tom Lane 2007-06-13 21:06:07 Re: changing the /tmp/ lock file?