Skip site navigation (1) Skip section navigation (2)

Re: Keepalives win32

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keepalives win32
Date: 2010-06-28 20:21:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Jun 28, 2010 at 21:10, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Mon, Jun 28, 2010 at 21:03, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>>> On Mon, Jun 28, 2010 at 20:45, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>> I vote for #2.  It's the least inconsistent --- we don't pay attention
>>>> to the registry for much of anything else, do we?
>>> Directly, no? Indirectly, we do. For every other TCP parameter
>>> (because the registry controls what we'll get as the default when we
>>> "just use things")
>> Not if we make the code use the RFC values as the defaults.  I'm
>> envisioning the GUC assign hooks doing something like
>> #ifdef WIN32
>>        if (newval == 0)
>>                newval = RFC-specified-default;
>> #endif
> Right. (I've only looked at the libpq side so far)
> Also, we could avoid caling it *at all* if neither one of those
> parameters is set. That'll take a bit more code (using the
> unix-codepath of setsockopt() to enable keepalives at all), but it
> shouldn't amount to many lines..

Here's what I'm thinking, for the libpq side. Similar change on the
server side. Seems ok?

for those that prefer that interface)

 Magnus Hagander

Attachment: libpq_keepalives_win32.patch
Description: application/octet-stream (2.8 KB)

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-06-28 20:39:16
Subject: Re: Keepalives win32
Previous:From: Jesper KroghDate: 2010-06-28 20:06:00
Subject: Re: Admission Control

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group