Thread: integer values in conf file

integer values in conf file

From
Thomas Finneid
Date:
Hi

A quick question, In the doc on the net for miscellaneous config
options, e.g. maintenance_work_mem, the doc states the argument is an
integer, but it does not state whether the number should be in Bytes,
KB, MB. From examples I have seen, I conclude its in KB, but is that
correct?

regards

Thomas

Re: integer values in conf file

From
Tom Lane
Date:
Thomas Finneid <tfinneid@student.matnat.uio.no> writes:
> A quick question, In the doc on the net for miscellaneous config
> options, e.g. maintenance_work_mem, the doc states the argument is an
> integer, but it does not state whether the number should be in Bytes,
> KB, MB. From examples I have seen, I conclude its in KB, but is that
> correct?

Yeah, if you don't put a unit on it it'll be taken as kB.  See the
'unit' column in pg_settings when in doubt on such matters.

            regards, tom lane

Re: integer values in conf file

From
Lew
Date:
Thomas Finneid wrote:
> Hi
>
> A quick question, In the doc on the net for miscellaneous config
> options, e.g. maintenance_work_mem, the doc states the argument is an
> integer, but it does not state whether the number should be in Bytes,
> KB, MB. From examples I have seen, I conclude its in KB, but is that
> correct?

 From <http://www.postgresql.org/docs/8.3/static/config-setting.html>:
> Some settings specify a memory or time value.
> Each of these has an implicit unit, which is either kilobytes, blocks
> (typically eight kilobytes), milliseconds, seconds, or minutes.
> Default units can be queried by referencing pg_settings.unit.
> For convenience, a different unit can also be specified explicitly.
> Valid memory units are kB (kilobytes), MB (megabytes), and GB (gigabytes);
> valid time units are ms (milliseconds), s (seconds), min (minutes),
> h (hours), and d (days). Note that the multiplier for memory units is
> 1024, not 1000.

--
Lew