Re: Debugging deadlocks

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Paul Tillotson <pntil(at)shentel(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Debugging deadlocks
Date: 2005-04-02 03:21:39
Message-ID: 20050402032139.GA10496@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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[(at)]dcc(dot)uchile(dot)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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-04-02 03:27:24 Re: plPHP in core?
Previous Message Bruce Momjian 2005-04-02 03:16:16 Re: [HACKERS] plPHP in core?

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-04-02 03:27:24 Re: plPHP in core?
Previous Message Bruce Momjian 2005-04-02 03:16:16 Re: [HACKERS] plPHP in core?