Re: Dead Lock problem with 8.1.3

From: Alban Hertroys <alban(at)magproductions(dot)nl>
To: Kai Hessing <kai(dot)hessing(at)hobsons(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dead Lock problem with 8.1.3
Date: 2006-09-26 14:19:32
Message-ID: 451936F4.6060007@magproductions.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kai Hessing wrote:
> No one any idea? *sigh*
>
> Kai Hessing wrote:
>> Hi Folks,
>>
>> I have a strange Problem (to be honest there are more than one, but this
>> is one of it) after Upgrading to Postgres 8.1.3. The following SQL seems
>> to produce a deadlock while doing an endless reading of a temp table:
>>
>> SELECT s.sid FROM stud s, stud_vera v WHERE s.sid = v.sid AND v.veraid =
>> 34 AND s.sid NOT IN ( SELECT sid FROM stud_vera WHERE veraid = 2 );

I'm pretty sure it's not a deadlock. It probably takes very long for
some reason; maybe an explain of that query will give some insight. You
probably lack some indices.

Alternatively, have you tried an EXCEPT query? I think this is what you
try to query:

SELECT s.sid FROM stud s, stud_vera v WHERE s.sid = v.sid AND v.veraid = 34
EXCEPT
SELECT s.sid FROM stud s, stud_vera v WHERE s.sid = v.sid AND v.veraid = 2

--
Alban Hertroys
alban(at)magproductions(dot)nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede

// Integrate Your World //

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2006-09-26 14:21:49 Re: Dead Lock problem with 8.1.3
Previous Message Tom Lane 2006-09-26 14:19:29 Re: change the order of FROM selection to make query work