Re: Advisory locks seem rather broken

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Subject: Re: Advisory locks seem rather broken
Date: 2012-05-03 17:22:24
Message-ID: CA+TgmobRwWPC1nLxz13wgDO4r=o5JMPH9hNubfd_rGhVVChicA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 3, 2012 at 12:12 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> AFAICS you'd either use transactional or session level, but to use
> both seems bizarre.

I'm a bit confused by all this, because we use both transaction and
session level locks internally - on the same lock tags - so I don't
know why we think it wouldn't be useful for user code to do the same.

In fact I'm a bit confused by the original complaint for the same
reason - if LockRelationOid and LockRelationIdForSession can coexist,
why doesn't the same thing work for advisory locks?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-05-03 17:27:44 Re: CLOG extension
Previous Message Simon Riggs 2012-05-03 17:22:08 Re: Future In-Core Replication