From: Bruce Momjian on
Tom Lane wrote:
> Bruce Momjian <bruce(a)momjian.us> writes:
> > I still like #1 because it affects the fewest people, and that option
> > uses the RFC defaults only for unset values when others are set.
>
> What's your idea of "affecting the fewest people"? There is no previous
> history to be backward-compatible with, because we never supported
> keepalive on Windows before.

Well, starting in 9.0, keepalives in libpq will default to 'on':

Controls whether client-side TCP keepalives are used. The default
value is 1, meaning on, but you can change this to 0, meaning off,
if keepalives are not wanted. This parameter is ignored for
connections made via a Unix-domain socket.

My definition is whether we should affect keepalive behavior for the 99%
of people who do not change the libpq defaults, meaning the other
keepalive settings. #2 would cause these people to use
non-registry-controlled keepalive behavior by using RFC defaults, and
even if we use Windows defaults, those defaults might be different for
different Windows versions.

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

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

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

From: Tom Lane on
Magnus Hagander <magnus(a)hagander.net> writes:
>> But you previously stated that this code was ignoring the registry
>> values. �So doesn't "system defaults" boil down to whatever Windows'
>> wired-in defaults are?

> The order is Windows wired-in-defaults -> registry values -> what app chooses.

> And yes, we *are* ignoring whatever the user has put in the registry,

How does that statement square with your follow-on example?

> Assume the user had reconfigured his default in the registry to 1 hour.

> If the user makes no config change at all, that means it will run with
> 1 hour for idle and 1 second for interval.

> If we now set tcp_interval to 10 seconds (to change the default), we
> will now also change his idle value back to the system default, so he
> will get 2 hours for idle and 10 seconds for interval. Thus, we are
> ignoring the changes he made globally on his system.

With the code as you have it, yes, but if we do it as I'm suggesting,
that doesn't happen --- the effective value of the other parameter
doesn't change.

regards, tom lane

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

From: Bruce Momjian on
Tom Lane wrote:
> Bruce Momjian <bruce(a)momjian.us> writes:
> > Tom Lane wrote:
> >> What's your idea of "affecting the fewest people"? There is no previous
> >> history to be backward-compatible with, because we never supported
> >> keepalive on Windows before.
>
> > Well, starting in 9.0, keepalives in libpq will default to 'on':
>
> Yes, which is already a change in behavior. I don't understand why you
> are worrying about "backwards compatibility" to parameter values that
> weren't in use before. I think self-consistency of the new version is
> far more important than that.

I am worried about compatibility/consistency with other Windows
processes.

> > even if we use Windows defaults, those defaults might be different for
> > different Windows versions.
>
> I'm not sure if that's an issue or not, but if it is, that seems to me
> to argue for #2 not #1.

I assume if someone modified the registry, they want it to be used for
all applications that use keepalives on their system. Also, keep in
mind that, unlike the backend, which has postgresql.conf, it is
burdensome to set a libpq setting for all applications (without using
pg_service.conf).

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

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

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

From: Magnus Hagander on
On Wed, Jun 30, 2010 at 16:48, Tom Lane <tgl(a)sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus(a)hagander.net> writes:
>> On Wed, Jun 30, 2010 at 16:27, Tom Lane <tgl(a)sss.pgh.pa.us> wrote:
>>> It's hard to argue about this when most of us have no idea what these
>>> "system defaults" are, or whether they really are any different from the
>>> RFC values in the first place, or whether ordinary users know how to
>>> alter them or even find out their values. �Please provide some
>>> background if you want intelligent comments.
>
>> The system defaults are whatever the user has configured at a machine
>> level (by editing the registry, by hand or by tool (including
>> policies)). I doubt many users have configured them by hand. There may
>> well be tools that do it for them.
>
> But you previously stated that this code was ignoring the registry
> values. �So doesn't "system defaults" boil down to whatever Windows'
> wired-in defaults are?

The order is Windows wired-in-defaults -> registry values -> what app chooses.

And yes, we *are* ignoring whatever the user has put in the registry,
making our path Windows documented-wired-in-defaults -> what app
chooses if we do this.

Windows default for idle is 2 hours, for interval 1 second.

Assume the user had reconfigured his default in the registry to 1 hour.

If the user makes no config change at all, that means it will run with
1 hour for idle and 1 second for interval.

If we now set tcp_interval to 10 seconds (to change the default), we
will now also change his idle value back to the system default, so he
will get 2 hours for idle and 10 seconds for interval. Thus, we are
ignoring the changes he made globally on his system.


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

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

From: Tom Lane on
Magnus Hagander <magnus(a)hagander.net> writes:
> Do you have an opinion on the two choices for handling keepalives_idle
> and keepalives_interval? They basically are:

> 1) When not configured, use system defaults. When only one of the two
> parameters configured, use RFC default for the other one (overwrite
> system default).

> 2) When not configured, use RFC defaults (overwrite system defaults).
> When only one of the two parameters configured, use RFC default for
> the other one (overwrite system default)

> 3) When not configured, use system defaults. When only one of the two
> parameters configured, throw error.

It's hard to argue about this when most of us have no idea what these
"system defaults" are, or whether they really are any different from the
RFC values in the first place, or whether ordinary users know how to
alter them or even find out their values. Please provide some
background if you want intelligent comments.

regards, tom lane

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

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: Propose Beta3 for July
Next: [HACKERS] keepalives on MacOS X