Re: Transaction-scope advisory locks

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction-scope advisory locks
Date: 2011-01-21 17:18:33
Message-ID: 4D39BFE9.7030508@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/20/2011 7:35 AM, Tom Lane wrote:
> Marko Tiikkaja<marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> writes:
>> This seems useful, since the xact lock would be automatically released
>> if an error happens during "-- do something here" so you wouldn't need
>> to worry about releasing the lock elsewhere. But I'm not sure this is
>> safe. Can anyone see a problem with it?
>
> I think the POLA dictates that the behavior of that should be that you
> now have both a transactional and a nontransactional hold on the lock;
> and only the transactional hold goes away at commit.

Yes, I believe that's what happens now. But I guess you answered my
question too by not pointing out a huge flaw in that thinking.

Regards,
Marko Tiikkaja

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aidan Van Dyk 2011-01-21 17:23:31 Re: Sync Rep for 2011CF1
Previous Message Simon Riggs 2011-01-21 17:16:23 Re: ALTER TABLE ... REPLACE WITH