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

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: proposal: rounding up time value less than its unit.
Date: 2014-09-26 18:50:56
Message-ID: CAKFQuwY4nqEjcxWLzzLmGQ0HzK1RpasUGq7YFqiW7n33T_im8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 26, 2014 at 2:39 PM, Stephen Frost [via PostgreSQL] <
ml-node+s1045698n5820714h58(at)n5(dot)nabble(dot)com> wrote:

> David,
>
> * David Johnston ([hidden email]
> <http://user/SendEmail.jtp?type=node&node=5820714&i=0>) wrote:
> > ​This is 9.5 material because 1) it isn't all that critical and, 2) we
> DO
> > NOT want a system to not come up because of a GUC paring error after a
> > minor-release update.
>
> Agreed.
>
> > ​I don't get where we "need" to do anything else besides that...the
> whole
> > "actual min values" comment is unclear to me.
>
> Well, for cases that allow going to zero as an "off" option, we've
> already decided, I believe, that sub-1-unit options are off the table
> and so the min value is at *least* 1, but there could be cases where '1'
> doesn't actually make any sense and it should be higher than that.
>
> Consider the log file rotation bit. If it was in seconds, would it
> actually make sense to support actually doing a rotation *every second*?
>
> No.
>
> In that case, perhaps we'd set the minimum to '60s', even though
> technically we could represent less than that, it's not sensible to do
> so. The point of having minimum (and maximum..) values is that typos
> and other mistakes happen and we want the user to realize they've made a
> mistake.
>
> What needs to happen next is a review of all the GUCs which allow going
> to zero and which treat zero as a special value, and consider what the
> *actual* minimum value for those should be (excluding zero). I was
> hoping you might be interested in doing that... :D
>
>
Like I said I just want to fix the bug and call it a day :)

For me just enforcing 1 as the minimum for everything would be fine.

I'd rather mandate non-integer data entry than impose an actual minimum
that is greater than 1. Specifically a too-short/too-small value might be
used during exploration and testing by a new user even if the same value
would never be useful in production. That, in fact, is the one reason that
allowing "5s" for log rotation age would make sense - to allow people to
more easily checking their log rotation policies. But making it work
without disrupting people using "=60' (1hr) is impossible without simply
outlawing unitless values.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/proposal-rounding-up-time-value-less-than-its-unit-tp5811102p5820717.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-09-26 18:51:21 Re: proposal: rounding up time value less than its unit.
Previous Message Robert Haas 2014-09-26 18:48:03 Re: pg_background (and more parallelism infrastructure patches)