Re: Interpreting shared_buffers setting

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: Jerry Sievers <gsievers19(at)comcast(dot)net>
Cc: Bob Jolliffe <bobjolliffe(at)gmail(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Interpreting shared_buffers setting
Date: 2019-01-29 18:40:01
Message-ID: 87fttb9uke.fsf@jsievers.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jerry Sievers <gsievers19(at)comcast(dot)net> writes:

> Bob Jolliffe <bobjolliffe(at)gmail(dot)com> writes:
>
>> Excuse me if this is a silly question. I am trying to fiddle with
>> shared_buffers setting on postgresql 10.6 on ubuntu 18.04 server.
>>
>> I have this at bottom of my config file:
>> shared_buffers = 1GB
>>
>> Yet when I check the setting from pg_setting I see something quite different:
>>
>> postgres=# SELECT name, setting FROM pg_settings where name = 'shared_buffers';
>> name | setting
>> ----------------+---------
>> shared_buffers | 131072

Aaaaay! Pasted junk... Here's what I meant.

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

meta_a:postgres# show shared_buffers;
shared_buffers
----------------
1GB
(1 row)

>
> Why not use the show command which is good about output in human
> terms...
>
> psql (11.1 (Ubuntu 11.1-1.pgdg16.04+1))
> Type "help" for help.
>
> meta_a:postgres# select name, setting from pg_settings where name = 'shared_buffers');
> ERROR: syntax error at or near ")"
> LINE 1: ...me, setting from pg_settings where name = 'shared_buffers');
> ^
> meta_a:postgres#
>
>>
>> Is this a question of units? It looks like 128M. Note when I change
>> the setting to 2GB in conf file I see 262144 from pg_setting. I am
>> now unsure what the actual shared_buffers allocation is. I cant see
>> anything in the docs which tells me how to interpret the integer.
>>
>> Any clarification welcome.
>>
>> Regards
>> Bob
>>
>>

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2019-01-29 18:47:31 Re: How can sort performance be so different
Previous Message Saurabh Nanda 2019-01-29 18:36:04 Re: How can sort performance be so different