Re: Question about buffers_alloc in pg_stat_bgwriter view formonitoring - Mailing list pgsql-general

From Alvar Freude
Subject Re: Question about buffers_alloc in pg_stat_bgwriter view formonitoring
Date
Msg-id B753E635-C55D-4801-AA1A-DE5418FB6193@a-blast.org
Whole thread Raw
In response to Re: Question about buffers_alloc in pg_stat_bgwriter view formonitoring  ("Gunnar \"Nick\" Bluth" <gunnar.bluth@pro-open.de>)
Responses Re: Question about buffers_alloc in pg_stat_bgwriter view formonitoring  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-general
Hi,

> Am 29.03.2018 um 10:30 schrieb Gunnar Nick Bluth <gunnar.bluth@pro-open.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.

But it seems not to be the total shared_buffers used, but the total number of allocated and re-allocated buffers. So it
incrementsevery time a buffer is allocated. Maybe I’m the only one who misunderstands it – or someone with better
englishthen me should update the docs. ;-) 


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)


Or other machine:

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


Small one:

     ?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/

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bad Query Plans on 10.3 vs 9.6
Next
From: Cory Tucker
Date:
Subject: Re: Bad Query Plans on 10.3 vs 9.6