Re: Question about buffers_alloc in pg_stat_bgwriter view for monitoring

From: "Alvar C(dot)H(dot) Freude" <alvar(dot)freude(at)wen-waehlen(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Question about buffers_alloc in pg_stat_bgwriter view for monitoring
Date: 2018-03-29 10:50:25
Message-ID: 821181C7-4056-4544-B0D3-4A3E71267628@wen-waehlen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

> Am 29.03.2018 um 10:30 schrieb Gunnar Nick Bluth <gunnar(dot)bluth(at)pro-open(dot)de>:
>
> Thus, buffer_alloc is the global count of buffers allocated in the
> cluster. That it appears in the bgwriter statistics is more or less
> coincidental.

So it is the number of shared_buffers used?

This isn’t possible:

postgres=# SELECT buffers_alloc*current_setting('block_size')::numeric/1024/1024/1024, current_setting('shared_buffers') FROM pg_stat_bgwriter;
?column? | current_setting
-----------------------+-----------------
1219.7707748413085938 | 64450MB
(1 row)

About 64 GB shared buffers and 1219 used? ;-)

Or other machine:

?column? | current_setting
----------------------+-----------------
126.4642944335937500 | 64450MB
(1 row)

My Private:

?column? | current_setting
--------------------+-----------------
3.3014221191406250 | 6GB
(1 Zeile)

Ciao
Alvar

--
Alvar C.H. Freude | http://alvar.a-blast.org
https://blog.alvar-freude.de/
https://www.wen-waehlen.de/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-03-29 13:47:01 Re: Bad Query Plans on 10.3 vs 9.6
Previous Message Ben Madin 2018-03-29 09:48:19 Re: Postgresql 9.3 Server will not start after Ubuntu Upgrade