Re: Warning: you don't own a lock of type ExclusiveLock - Mailing list pgsql-general

From Chris Angelico
Subject Re: Warning: you don't own a lock of type ExclusiveLock
Date
Msg-id CAPTjJmoXzy_BgCrnrbmT6QRYA=SyTW04qDSTRB7M1+89GudyKA@mail.gmail.com
Whole thread Raw
In response to Re: Warning: you don't own a lock of type ExclusiveLock  (Gary Chambers <gwchamb@gwcmail.com>)
Responses Re: Warning: you don't own a lock of type ExclusiveLock
List pgsql-general
On Fri, Feb 10, 2012 at 2:35 AM, Gary Chambers <gwchamb@gwcmail.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: VIEW still referring to old name of field
Next
From: Rich Shepard
Date:
Subject: Strategy for Primary Key Generation When Populating Table