Re: LISTEN/NOTIFY race condition? - Mailing list pgsql-bugs

From Laurent Birtz
Subject Re: LISTEN/NOTIFY race condition?
Date
Msg-id 47D5C443.1010907@kryptiva.com
Whole thread Raw
In response to Re: LISTEN/NOTIFY race condition?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: LISTEN/NOTIFY race condition?
Next
From: "Matt Magoffin"
Date:
Subject: BUG #4024: xpath() results lose namespace mappings