Re: Keepalives win32
Andrew Chernow <ac@esilo.com>
From: Andrew Chernow <ac@esilo.com>
To: Magnus Hagander <magnus@hagander.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-06-28T19:03:45Z
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/