Skip site navigation (1) Skip section navigation (2)

Re: Updates, ShareLocks, RowExclusiveLocks, and deadlocks

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Updates, ShareLocks, RowExclusiveLocks, and deadlocks
Date: 2012-04-25 19:43:35
Message-ID: 34867911-3DC4-48F9-BD73-975AE9748CCD@silentmedia.com (view raw or flat)
Thread:
Lists: pgsql-general
On Apr 25, 2012, at 1:31 PM, Tom Lane wrote:

> I don't have all the details in my head, but if you deliberately provoke
> a deadlock by making two transactions update the same two rows in
> opposite orders, you'll soon find out what it looks like in the log.

Heh, duh. Looks like your first guess was correct, as usual. Conflicting updates in two transactions show up in the logs as a ShareLock deadlock.

Thanks!

In response to

pgsql-general by date

Next:From: Tom LaneDate: 2012-04-25 19:45:06
Subject: Re: Updates, ShareLocks, RowExclusiveLocks, and deadlocks
Previous:From: Martijn van OosterhoutDate: 2012-04-25 19:33:49
Subject: Re: Updates, ShareLocks, RowExclusiveLocks, and deadlocks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group