Re: Keepalives win32

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keepalives win32
Date: 2010-06-28 19:03:45
Message-ID: 4C28F211.90703@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>
> The way I see it, we have two options:
> 1) Read the default value from the registry. That's some fairly ugly code, imho.

It seems faily simple to yank these values out, no? Even easier if you
use the all-in-wonder shell function SHGetValue().

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
Values: KeepAliveTime, KeepAliveInterval
Type: DWORD

The only annoying thing is that the values may not exist. Well, it is
also rather annoying there is no way to set the counter.

>
> The API used is documented at:
> http://msdn.microsoft.com/en-us/library/dd877220(v=VS.85).aspx
> Patch as it looks now (libpq only, and with obvious problems with this
> issue): http://github.com/mhagander/postgres/compare/master...win32keepalive
>

and here :)

http://archives.postgresql.org/pgsql-hackers/2009-05/msg01099.php

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-06-28 19:06:34 Re: Propose Beta3 for July
Previous Message Tom Lane 2010-06-28 19:03:39 Re: Keepalives win32