Re: effective_cache_size vs units

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Kenneth Marshall <ktm(at)is(dot)rice(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: effective_cache_size vs units
Date: 2006-12-19 23:52:31
Message-ID: 200612192352.kBJNqVO14152@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gregory Stark wrote:
>
> "Kenneth Marshall" <ktm(at)it(dot)is(dot)rice(dot)edu> writes:
>
> > My one comment is that a little 'b' is used to indicate bits normally
> > and a capital 'B' is used to indicate bytes. So
> > kb = '1024 bits'
> > kB = '1024 bytes'
> > I do think that whether or not the k/m/g is upper case or lower case
> > is immaterial.
>
> Yes, well, no actually there are standard capitalizations for the k and M and
> G. A lowercase g is a gram and a lowercase m means "milli-".

I will have 150 grams of shared memory, please.

> But I think that only gets you as far as concluding that Postgres ought to
> consistently use kB MB and GB in its own output. Which afaik it does.
>
> To reach a conclusion about whether it should restrict valid user input
> similarly you would have to make some sort of argument about what problems it
> could lead to if we allow users to be sloppy.
>
> I could see such an argument being made but it requires a lot of speculation
> about hypothetical future parameters and future problems. When we have known
> real problems today.
>
> And yes, btw, the case sensitivity of these units had already surprised and
> bothered me earlier and I failed to mention it at the time.

Agreed. However, I see 'ms' as milliseconds, so perhaps the M vs. m is
already in use. I think we at least need to document the case
sensitivity and improve the error message.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew O'Connor 2006-12-19 23:54:56 Re: Autovacuum Improvements
Previous Message Glen Parker 2006-12-19 23:31:20 Re: Autovacuum Improvements