Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for TCP keepalives on Windows, both for backend and

2010-07-12 Thread Magnus Hagander
On Sun, Jul 11, 2010 at 00:05, Peter Eisentraut pete...@gmx.net wrote:
 On lör, 2010-07-10 at 16:23 -0400, Bruce Momjian wrote:
 Wow, how would they know if the binaries are MinGW compiled?  Does it
 show in version()?

 Yes, I think so.

It definitely does.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Re: [COMMITTERS] pgsql: Add support for TCP keepalives on Windows, both for backend and

2010-07-10 Thread Bruce Momjian
Magnus Hagander wrote:
  An easy approximation would be to make the code #ifdef SIO_KEEPALIVE_VALS.
  That would fail if the mingw guys decide to provide the #define without
  adding the struct at the same time, but that seems moderately unlikely.
 
 Seems reasonable. I'll go do something along that line and verify that
 it actually works :-)
 
 That laves the questions of docs - right now the docs just say it
 works on windows. I guess we need to add some kind of disclaimer
 around that, but the fact is that for 99+% of our windows users it
 will work - since they use the binaries, and the binaries are built
 with the full api - so we shouldn't make it *too* prominent..

Wow, how would they know if the binaries are MinGW compiled?  Does it
show in version()?

-- 
  Bruce Momjian  br...@momjian.ushttp://momjian.us
  EnterpriseDB http://enterprisedb.com

  + None of us is going to be here forever. +

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for TCP keepalives on Windows, both for backend and

2010-07-10 Thread Tom Lane
Bruce Momjian br...@momjian.us writes:
 Magnus Hagander wrote:
 That laves the questions of docs - right now the docs just say it
 works on windows. I guess we need to add some kind of disclaimer
 around that, but the fact is that for 99+% of our windows users it
 will work - since they use the binaries, and the binaries are built
 with the full api - so we shouldn't make it *too* prominent..

 Wow, how would they know if the binaries are MinGW compiled?  Does it
 show in version()?

AFAIK there is nobody distributing mingw-built binaries.  If somebody
has one, they'd have built it themselves, and they'd know.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Re: [COMMITTERS] pgsql: Add support for TCP keepalives on Windows, both for backend and

2010-07-10 Thread Peter Eisentraut
On lör, 2010-07-10 at 16:23 -0400, Bruce Momjian wrote:
 Wow, how would they know if the binaries are MinGW compiled?  Does it
 show in version()?

Yes, I think so.


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Re: [COMMITTERS] pgsql: Add support for TCP keepalives on Windows, both for backend and

2010-07-08 Thread Magnus Hagander
On Thu, Jul 8, 2010 at 17:11, Magnus Hagander mag...@hagander.net wrote:
 On Thu, Jul 8, 2010 at 17:04, Tom Lane t...@sss.pgh.pa.us wrote:
 m...@postgresql.org (Magnus Hagander) writes:
 Log Message:
 ---
 Add support for TCP keepalives on Windows, both for backend and the new
 libpq support.

 Buildfarm member narwhal doesn't like this patch.  You have about six
 or eight hours to fix or revert it before beta3 wraps.

 Gah. Seems mingw is out of date with reality again. I'll go look for a
 vm with it on and see if I can find how to do it there.

 (and yes, I even asked Dave to do a special run with that bf member
 for me, and then forgot to check the result. sorry!)

Seems pretty simple - mingw doesn't have support for this. We have two
ways to deal with that I think:
1) Disable it on mingw.
2) Include it in our custom headers.

For #2, what we need to include is the define of SIO_KEEPALIVE_VALS as
well as the definition of struct tcp_keepalive.

We've done #2 before at least once, which worked well until mingw
suddenly caught up and added it a while later. It's not like this is a
new definition in windows, but we need to be ready for them to
eventually do that.

I guess there is:
3) write an autoconf test and provide them only when mingw doesn't have it.

if we're going with #3, I'll respectfully have to ask somebod yelse to
write the autoconf test, that's beyond me I think :-)


Opinions on which way to go?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Re: [COMMITTERS] pgsql: Add support for TCP keepalives on Windows, both for backend and

2010-07-08 Thread Magnus Hagander
On Thu, Jul 8, 2010 at 17:39, Tom Lane t...@sss.pgh.pa.us wrote:
 Magnus Hagander mag...@hagander.net writes:
 Seems pretty simple - mingw doesn't have support for this. We have two
 ways to deal with that I think:
 1) Disable it on mingw.
 2) Include it in our custom headers.

 For #2, what we need to include is the define of SIO_KEEPALIVE_VALS as
 well as the definition of struct tcp_keepalive.

 We've done #2 before at least once, which worked well until mingw
 suddenly caught up and added it a while later. It's not like this is a
 new definition in windows, but we need to be ready for them to
 eventually do that.

 Yeah.  I'm satisfied with doing #1 and waiting for them to fix it.

 I guess there is:
 3) write an autoconf test and provide them only when mingw doesn't have it.
 if we're going with #3, I'll respectfully have to ask somebod yelse to
 write the autoconf test, that's beyond me I think :-)

 An easy approximation would be to make the code #ifdef SIO_KEEPALIVE_VALS.
 That would fail if the mingw guys decide to provide the #define without
 adding the struct at the same time, but that seems moderately unlikely.

Seems reasonable. I'll go do something along that line and verify that
it actually works :-)

That laves the questions of docs - right now the docs just say it
works on windows. I guess we need to add some kind of disclaimer
around that, but the fact is that for 99+% of our windows users it
will work - since they use the binaries, and the binaries are built
with the full api - so we shouldn't make it *too* prominent..


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers