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

Re: Keepalives win32

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keepalives win32
Date: 2010-06-30 00:09:59
Message-ID: 201006300009.o5U09xj01803@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Mon, Jun 28, 2010 at 8:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> What I was trying to say is I think we could dispense with the
> >> setsockopt() code path, and just always use the WSAIoctl() path anytime
> >> keepalives are turned on. I don't know what "system default values"
> >> you're speaking of, if they're not the registry entries; and I
> >> definitely don't see the point of consulting such values if they aren't
> >> user-settable. We might as well just consult the RFCs and be done.
> 
> > FWIW, I think I prefer Magnus's approach, but I'm not 100% sure I can
> > defend that preference...
> 
> Well, basically what I don't like about Magnus' proposal is that setting
> one of the two values changes the default that will be used for the
> other one.  (Or, if it does not change the default, the extra code is
> useless anyway.)  If we just always go through the WSAIoctl() path then
> we can clearly document "the default for this on Windows is so-and-so".
> How is the documentation going to explain the behavior of the proposed
> code?

Let's look at the usage probabilities.  99% of Win32 users will not use
any of these settings.  I would hate to come up with a solution that
changes the default behavior for that 99%.

Therefore, I think using hard-coded defaults only for cases where
someone sets one but not all settings is appropriate.  The documentation
text would be:

	On Windows, if a keepalive settings is set, then defaults will be
	used for any unset values, specifically, keepalives_idle (200) and
	keepalives_interval(4).  Windows does not allow control of
	keepalives_count.

Seems simple enough.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2010-06-30 00:33:39
Subject: Re: Propose Beta3 for July
Previous:From: Tom LaneDate: 2010-06-29 23:06:16
Subject: Re: Planner deficiencies with views that use windowing functions

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