Re: Advisory locks seem rather broken

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, 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 21:01:22
Message-ID: CA+TgmoaL5MbKSgXvMb_huQ_YznBtq1NhLw3w1q5XGzMYPsEL3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 3, 2012 at 3:52 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I'm inclined to say that you can PREPARE if your session holds a given
> advisory lock at either session or transaction level, but not both.
> This is a bit annoying but doesn't seem likely to be a real problem in
> practice, so thinking of a hack to support the case seems like more
> work than is justified.

I'd be more inclined to say that if you have a session-level lock, you
can't prepare, period. Doesn't a rollback release session-level
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 Daniel Farina 2012-05-03 21:04:03 Re: CLOG extension
Previous Message Robert Haas 2012-05-03 20:56:34 Re: CLOG extension