Re: Deadlock detected

From: Maurice Balick <balm(at)smiley(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Brian J(dot) France" <postgresql(at)firehawksystems(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Deadlock detected
Date: 2001-04-14 05:06:46
Message-ID: 3AD7DAE6.9000706@smiley.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<html><head></head><body>Hi Tom,<br>
<br>
<br>
<blockquote type="cite" cite="mid:4501(dot)987180015(at)sss(dot)pgh(dot)pa(dot)us"><pre wrap="">"Brian J. France" <a class="moz-txt-link-rfc2396E" href="mailto:postgresql(at)firehawksystems(dot)com">&lt;postgresql(at)firehawksystems(dot)com&gt;</a> writes:<br></pre>
<blockquote type="cite"><pre wrap=""> I am getting a few of these errors in my web logs and didn't know what I could do to stop it.<br></pre></blockquote>
<blockquote type="cite"><pre wrap="">NOTICE: Deadlock detected -- See the lock(l) manual page for a possible cause.<br></pre></blockquote>
<blockquote type="cite"><pre wrap="">Error in query "UPDATE &lt;table&gt; SET &lt;field&gt; = &lt;value&gt; WHERE &lt;field2&gt; = &lt;value2&gt;" : ERROR: WaitOnLock: error on wakeup - Aborting this transaction<br></pre></blockquote>
<blockquote type="cite"><pre wrap="">Is this due to the hash index on field2 or due to the has index in general?<br></pre></blockquote>
<pre wrap=""><!----><br>Don't use hash indexes for concurrent applications. I don't really know<br>of any reason for preferring a hash index over a btree index in any case.<br><br> regards, tom lane<br></pre>
</blockquote>
Could you expand a little on the subject of Hash Vs BTree indexes? And in
particular "Don't use hash indexes for concurrent applications".<br>

I posted a question about deadlocks a week or two ago and I was advised to upgrade to 7.0.3 (from 7.0.2).
I did, but I still get a few deadlocks (i.e. all the backends eventually remain locked in requests).
<br>
I am using a lot of Hash indexes because they usually provide faster access
to a specific record than binary trees (O Vs OlogN). Most of my requests
simply lookup a record based on some specific account or transaction ID.
<br>
If using BTree instead of Hash indexes does not affect performance and solves my deadlock problem,&nbsp; please let me know!<br>
<br>
Thanks.<br>
<br>
--Maurice<br>
</body></html>

Attachment Content-Type Size
unknown_filename text/html 2.0 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2001-04-14 05:30:55 FOR IMMEDIATE RELEASE: PostgreSQL v7.1 Release Announcement
Previous Message Steve Jorgensen 2001-04-14 04:33:42 How to get libpq.dll for 7.1 RCs