Re: how to speed up query - Mailing list pgsql-general

From Tom Lane
Subject Re: how to speed up query
Date
Msg-id 18422.1181769394@sss.pgh.pa.us
Whole thread Raw
In response to Re: how to speed up query  ("Andrus" <kobruleht2@hot.ee>)
Responses Re: how to speed up query  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
"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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: changing the /tmp/ lock file?
Next
From: "Joris Dobbelsteen"
Date:
Subject: Re: pointer to feature comparisons, please