Re: LISTEN/NOTIFY race condition?

From: Laurent Birtz <laurent(dot)birtz(at)kryptiva(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: LISTEN/NOTIFY race condition?
Date: 2008-03-10 23:29:07
Message-ID: 47D5C443.1010907@kryptiva.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


>> In Async_Listen(): change
>> 'heap_close(lRel, ExclusiveLock);' for 'heap_close(lRel, NoLock);'.
>>
>
> This solution is pretty ugly, though, because we allow people to
> execute LISTEN/UNLISTEN in transaction blocks, which means that the
> ExclusiveLock could be held for quite some time. Not only is that bad
> for performance but it poses significant risks of deadlocks.
>

True, I had not considered this.

> Comments? Have I missed anything?
>

As far as I can tell it seems fine.

Thanks a lot for your input!
Laurent Birtz

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Matt Magoffin 2008-03-11 01:46:24 BUG #4024: xpath() results lose namespace mappings
Previous Message Tom Lane 2008-03-10 22:49:28 Re: LISTEN/NOTIFY race condition?