Re: Debugging deadlocks - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Debugging deadlocks
Date
Msg-id 20050402032139.GA10496@dcc.uchile.cl
Whole thread Raw
In response to Re: Debugging deadlocks  (Paul Tillotson <pntil@shentel.net>)
Responses Re: Debugging deadlocks
List pgsql-general
On Fri, Apr 01, 2005 at 10:14:07PM -0500, Paul Tillotson wrote:

> Would it work for an updater, who finds that the locks list (currently
> located in the middle of the empty space) is "in the way" of a new tuple
> that he wants to insert, to take some kind of lock, move the whole list
> up or down (spilling some of these locks to the disk if no more space is
> available), and release it again?

Well, at that point you need to take a lock in order to be able to
manage locks.  Managing not to step on your own feet in that scenario
is complex, to say the least, if not downright impossible.

Another problem with this approach is that it would be practically
impossible for a process to release all its locks when it finishes.

No, we have to build this infrastructure purely using LWLocks, which
means, no normal relations involved.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"The Postgresql hackers have what I call a "NASA space shot" mentality.
 Quite refreshing in a world of "weekend drag racer" developers."
(Scott Marlowe)

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] plPHP in core?
Next
From: Alvaro Herrera
Date:
Subject: Re: plPHP in core?