Re: proposal: rounding up time value less than its unit.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Smith <gregsmithpgsql(at)gmail(dot)com>
Cc: David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: rounding up time value less than its unit.
Date: 2014-09-26 19:22:53
Message-ID: 10046.1411759373@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Smith <gregsmithpgsql(at)gmail(dot)com> writes:
> On 9/26/14, 2:34 PM, David Johnston wrote:
>> I don't get where we "need" to do anything else besides that...the
>> whole "actual min values" comment is unclear to me.

> If you look at pg_settings, there is a minimum value exposed there as
> min_val. For some of these parameters, that number would normally be
> 1. But since we have decided that 0 is a special flag value, min_val is
> 0 instead.

Right.

> There are others where min_val is -1 for the same reason, where
> functionally the minimum is really 0. Some of us would like to see
> min_val reflect the useful minimum, period, and move all these special
> case ones out of there. That is a multi-year battle to engage in
> though, and there's little real value to the user community coming out
> of it relative to that work scope.

The impression I had was that Stephen was thinking of actually setting
min_val to 1 (or whatever) and handling zero or -1 in some out-of-band
fashion, perhaps by adding GUC flag bits showing those as allowable
special cases. I'm not sure how we would display such a state of affairs
in pg_settings, but other than that it doesn't sound implausible.

We could alternatively try to split up these cases into multiple GUCs,
which I guess is what you're imagining as a "multi-year battle". But
personally I think any such proposal will fail on the grounds that
it's too much compatibility loss for the value gained.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-09-26 19:29:34 Re: proposal: rounding up time value less than its unit.
Previous Message Gregory Smith 2014-09-26 19:03:34 Re: proposal: rounding up time value less than its unit.