Re: Warning: you don't own a lock of type ExclusiveLock

From: Chris Angelico <rosuav(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Warning: you don't own a lock of type ExclusiveLock
Date: 2012-02-09 15:59:09
Message-ID: CAPTjJmoXzy_BgCrnrbmT6QRYA=SyTW04qDSTRB7M1+89GudyKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 10, 2012 at 2:35 AM, Gary Chambers <gwchamb(at)gwcmail(dot)com> wrote:
> Is it possible that
> Postgres is not receiving a meaningful response with respect to
> ExclusiveLock locking (i.e. unable to really obtain an ExclusiveLock) due to
> VM "disk" residing on an NFS mount?

pg_advisory_unlock (along with the other functions in that family)
works on a set of mythical objects with no actual meaning beyond what
the database administrator chooses to give them. You lock and unlock
these ethereal "things", just numbers off a set of tables, with no
relationship to NFS mounts, tables, records, or anything else. In (the
current iteration of) the priority-queue I wrote for work, each
queue-pumping process takes an exclusive lock on a "partition", where
a partition is one fraction of the available ID space, using modulo
arithmetic. At least, that's what I, the programmer, see; to Postgres,
it just takes an exclusive lock on (42,64) or some other pair of
numbers. That lock will succeed or fail only on the basis of other
advisory lock calls, nothing else can affect it.

Chris Angelico

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2012-02-09 16:49:17 Strategy for Primary Key Generation When Populating Table
Previous Message Tom Lane 2012-02-09 15:41:19 Re: VIEW still referring to old name of field