Re: libpq-events windows gotcha - Mailing list pgsql-hackers

From Andrew Chernow
Subject Re: libpq-events windows gotcha
Date
Msg-id 491C78C8.8000908@esilo.com
Whole thread Raw
In response to Re: libpq-events windows gotcha  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> 
> And it's not even
> clear to me that it fixes the problem: wouldn't you get two different
> handles if you supplied the internal and external addresses of an
> eventproc?
> 

Both #1 and #4 suffer from this issue, internal & external register 
methods.  They also require the same WARNING in the docs.  But, #1 
solves the instancedata lookup issue.  I am not trying to make a case 
for #1 but it does appear to have a narrower failure window.
> libpq has to deal with generating the handles
Well lock; if(not_in_map) handle = ++counter; unlock surely won't be to 
difficult ;-)
> (threading issues here)
There is no unregister, so the idea won't lock/unlock in high traffic 
routines.

> On the whole I vote for #4 out of these. 
> 

Okay.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: SQL5 budget
Next
From: Tom Lane
Date:
Subject: Re: Simple postgresql.conf wizard