From: | Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Units in postgresql.conf |
Date: | 2006-07-20 15:51:27 |
Message-ID: | 44BFA67F.5050007@sun.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
> One frequent source of confusion are the different units that the parameters
> in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB;
> bgwriter_delay is in milliseconds, checkpoint_warning is in seconds.
> Obviously, we can't change that without inconveniencing a lot of users.
>
> I think it would be useful to allow units to be added to these settings, for
> example
>
> shared_buffers = 1000kB
> checkpoint_warning = 30s
>
> This would also allow
>
> shared_buffers = 512MB
>
> which is a bit cumbersome to calculate right now (you'd need = 65536).
>
> I haven't thought yet how to parse or implement this, but would people find
> this useful?
>
It is good idea. I going to implement this. There is some proposal:
Time units is easy:
1h = 60min = 3600s = 3600000ms
Memory units:
What kind of unit prefix will we use for memory? 1kB=1000B and
1kiBi=1024B or 1kB=1024kB. See
http://en.wikipedia.org/wiki/Binary_prefix for detail. I suggest use IEC
standard convention. By my opinion it is much better.
And there are some other questions:
1) will be unit required? What will be default unit for value without unit?
I suggest mandatory unit avoid the problem with unclear default value.
2) Each internal representation of setting use different unit. Shell I
convert this representation to milliseconds and bytes? I think it is not
good idea. It should generate some overflow. I suggest to recompute
value and round it to integer.
Zdenek
From | Date | Subject | |
---|---|---|---|
Next Message | Darcy Buskermolen | 2006-07-20 15:59:05 | Re: Units in postgresql.conf |
Previous Message | Luke Lonergan | 2006-07-20 15:36:55 | Re: Progress bar updates |