Open sdudoladov opened 5 months ago
As long as we dont try or want to resolve issues around real free space and or mount points, just continuing approach 1) sounds fine. Seems that monitoring/alerting would need some knowledge about disk layout either way.
Hello, @CyberDem0n
I would like to extend
bg_mon
to report the sizes ofpg_replslot
andpgsql_tmp
. My question is how to do it in the best way.I can follow the implementation of
pg_log
directory size . That however will duplicate databg_mon
reports under thedevice
key for the most common case where all subdirectories reside at the same place (such duplication already happens fordata
,wal
, andlog
entries). This approach also does not look extensible if one needs to add sizes of more subdirectories of$PGDATA
to thebg_mon
in the future.Or I can create a separate
subdirectories
dictionary with"subdirectory": its size in KB
key-value pairs. The dictionary will list all subdirectories in $PGDATAwdyt ?