Thread: Mac OS X shared_buffers not same as postgresql.conf file

Mac OS X shared_buffers not same as postgresql.conf file

From
Neil Tiffin
Date:
Hello all,

I am hoping someone can help me with 9.0.4 server on 8GB Mac w/Snow Leopard and shared_buffers configuration setting.

I have shared_buffers in the config file set for 32 MB and pgAdmin reports a value of 32 MB, but pgAdmin also says the
currentvalue is 4096.  Can anyone point me to any docs about why the current value may be different than the config
value? Temp_buffers are the same way, config file 8MB, but current value in pgAdmin is 1024? 

Thank you.
Neil

Re: Mac OS X shared_buffers not same as postgresql.conf file

From
Joe Conway
Date:
On 09/23/2011 02:33 PM, Neil Tiffin wrote:
> I have shared_buffers in the config file set for 32 MB and pgAdmin
> reports a value of 32 MB, but pgAdmin also says the current value is
> 4096.  Can anyone point me to any docs about why the current value
> may be different than the config value?  Temp_buffers are the same
> way, config file 8MB, but current value in pgAdmin is 1024?

Internally shared_buffers is tracked as number of 8K pages.

postgres=# show shared_buffers;
 shared_buffers
----------------
 32MB
(1 row)

postgres=# select setting from pg_settings where name='shared_buffers';
 setting
---------
 4096
(1 row)

postgres=# select 4096 * 8 / 1024 as MB;
 mb
----
 32
(1 row)

HTH,

Joe

--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support

Re: Mac OS X shared_buffers not same as postgresql.conf file

From
Neil Tiffin
Date:
On Sep 24, 2011, at 1:31 PM, Joe Conway wrote:

> On 09/23/2011 02:33 PM, Neil Tiffin wrote:
>> I have shared_buffers in the config file set for 32 MB and pgAdmin
>> reports a value of 32 MB, but pgAdmin also says the current value is
>> 4096.  Can anyone point me to any docs about why the current value
>> may be different than the config value?  Temp_buffers are the same
>> way, config file 8MB, but current value in pgAdmin is 1024?
>
> Internally shared_buffers is tracked as number of 8K pages.
>
> postgres=# show shared_buffers;
> shared_buffers
> ----------------
> 32MB
> (1 row)
>
> postgres=# select setting from pg_settings where name='shared_buffers';
> setting
> ---------
> 4096
> (1 row)
>
> postgres=# select 4096 * 8 / 1024 as MB;
> mb
> ----
> 32
> (1 row)
>
> HTH,

Excellent, just what I was looking for.  I know there had to be a simple explanation, even though it seems a little
retardedthat pgAdmin does not point this out. 

Re: Mac OS X shared_buffers not same as postgresql.conf file

From
Guillaume Lelarge
Date:
On Sat, 2011-09-24 at 14:43 -0500, Neil Tiffin wrote:
> On Sep 24, 2011, at 1:31 PM, Joe Conway wrote:
>
> > On 09/23/2011 02:33 PM, Neil Tiffin wrote:
> >> I have shared_buffers in the config file set for 32 MB and pgAdmin
> >> reports a value of 32 MB, but pgAdmin also says the current value is
> >> 4096.  Can anyone point me to any docs about why the current value
> >> may be different than the config value?  Temp_buffers are the same
> >> way, config file 8MB, but current value in pgAdmin is 1024?
> >
> > Internally shared_buffers is tracked as number of 8K pages.
> >
> > postgres=# show shared_buffers;
> > shared_buffers
> > ----------------
> > 32MB
> > (1 row)
> >
> > postgres=# select setting from pg_settings where name='shared_buffers';
> > setting
> > ---------
> > 4096
> > (1 row)
> >
> > postgres=# select 4096 * 8 / 1024 as MB;
> > mb
> > ----
> > 32
> > (1 row)
> >
> > HTH,
>
> Excellent, just what I was looking for.  I know there had to be a simple explanation, even though it seems a little
retardedthat pgAdmin does not point this out. 

And how do you get that value from pgAdmin? the config editor gives me
the value with its unit, so I guess it's not from the config editor.


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


Re: Mac OS X shared_buffers not same as postgresql.conf file

From
Guillaume Lelarge
Date:
On Sun, 2011-09-25 at 12:13 -0500, Neil Tiffin wrote:
> On Sep 24, 2011, at 4:21 PM, Guillaume Lelarge wrote:
>
> > On Sat, 2011-09-24 at 14:43 -0500, Neil Tiffin wrote:
> >> On Sep 24, 2011, at 1:31 PM, Joe Conway wrote:
> >>
> >>> On 09/23/2011 02:33 PM, Neil Tiffin wrote:
> >>>> I have shared_buffers in the config file set for 32 MB and pgAdmin
> >>>> reports a value of 32 MB, but pgAdmin also says the current value is
> >>>> 4096.  Can anyone point me to any docs about why the current value
> >>>> may be different than the config value?  Temp_buffers are the same
> >>>> way, config file 8MB, but current value in pgAdmin is 1024?
> >>>
> >>> Internally shared_buffers is tracked as number of 8K pages.
> >>>
> >>> postgres=# show shared_buffers;
> >>> shared_buffers
> >>> ----------------
> >>> 32MB
> >>> (1 row)
> >>>
> >>> postgres=# select setting from pg_settings where name='shared_buffers';
> >>> setting
> >>> ---------
> >>> 4096
> >>> (1 row)
> >>>
> >>> postgres=# select 4096 * 8 / 1024 as MB;
> >>> mb
> >>> ----
> >>> 32
> >>> (1 row)
> >>>
> >>> HTH,
> >>
> >> Excellent, just what I was looking for.  I know there had to be a simple explanation, even though it seems a
littleretarded that pgAdmin does not point this out. 
> >
> > And how do you get that value from pgAdmin? the config editor gives me
> > the value with its unit, so I guess it's not from the config editor.
> >
>
> I got the values from selecting in pgAdmin: Tools -> Server Configuration -> postgresql.conf, then I get a table with
settingname, value, current value, and comment columns.  The 'value' column shows the unit, but the 'current value'
columndoes not, at least on Mac OS X. 
>

Yes, I have the same behaviour. The "Value" comes from the file (hence
with the unit), and the "Current Value" comes from PostgreSQL (simple
query: select setting from pg_settings where name='shared_buffers').


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


Re: Mac OS X shared_buffers not same as postgresql.conf file

From
Neil Tiffin
Date:
On Sep 24, 2011, at 4:21 PM, Guillaume Lelarge wrote:

> On Sat, 2011-09-24 at 14:43 -0500, Neil Tiffin wrote:
>> On Sep 24, 2011, at 1:31 PM, Joe Conway wrote:
>>
>>> On 09/23/2011 02:33 PM, Neil Tiffin wrote:
>>>> I have shared_buffers in the config file set for 32 MB and pgAdmin
>>>> reports a value of 32 MB, but pgAdmin also says the current value is
>>>> 4096.  Can anyone point me to any docs about why the current value
>>>> may be different than the config value?  Temp_buffers are the same
>>>> way, config file 8MB, but current value in pgAdmin is 1024?
>>>
>>> Internally shared_buffers is tracked as number of 8K pages.
>>>
>>> postgres=# show shared_buffers;
>>> shared_buffers
>>> ----------------
>>> 32MB
>>> (1 row)
>>>
>>> postgres=# select setting from pg_settings where name='shared_buffers';
>>> setting
>>> ---------
>>> 4096
>>> (1 row)
>>>
>>> postgres=# select 4096 * 8 / 1024 as MB;
>>> mb
>>> ----
>>> 32
>>> (1 row)
>>>
>>> HTH,
>>
>> Excellent, just what I was looking for.  I know there had to be a simple explanation, even though it seems a little
retardedthat pgAdmin does not point this out. 
>
> And how do you get that value from pgAdmin? the config editor gives me
> the value with its unit, so I guess it's not from the config editor.
>

I got the values from selecting in pgAdmin: Tools -> Server Configuration -> postgresql.conf, then I get a table with
settingname, value, current value, and comment columns.  The 'value' column shows the unit, but the 'current value'
columndoes not, at least on Mac OS X. 

Neil