Re: APC/socket fix (final?)

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: APC/socket fix (final?)
Date: 2004-03-26 23:04:32
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE171627@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

>> Hopeless, or cute, work-around?
>
>It's possibly workable in the limited context of the postmaster, but
>I've got doubts about doing it in libpq where we can't assume we know
>what the surrounding application will do.

No need to touch the frontend parts at all. Our APCs are server side
only, so it's not a problem there.

It should be just as with the kill defrine in win32.h - "#ifndef
FRONTEND".

To the other point - yes, it's a cute workaround. I'm a bit afraid that
we'll end up with another surprise down the road though, since the
behaviour of the select() function is known to be undefined in this
situation (or at leas tthe return value of it is). I'm not sure we can
rely on the pattern we're seeing now. We also don't know for sure about
send() and recv() (though I'm working on that).

I'm almost done with the "our own select()/recv()/send() functions"
attempt. I feel that's a more correct solution (not just a workaround),
*if* I can get the code good enough that we feel comfortable with it. If
not, then a workaround seems the way to go, and then Claudios one looks
good (except we might need to go with a global variable instead - but
the general way, and the localization of it looks good)

//Magnus

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-03-26 23:06:16 Re: APC/socket fix (final?)
Previous Message Tom Lane 2004-03-26 22:57:09 Re: APC/socket fix (final?)