Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discuss] Track sizes of certain subdirectories in bg_mon #64

Open
sdudoladov opened this issue Jan 31, 2024 · 1 comment
Open

[Discuss] Track sizes of certain subdirectories in bg_mon #64

sdudoladov opened this issue Jan 31, 2024 · 1 comment

Comments

@sdudoladov
Copy link
Contributor

Hello, @CyberDem0n

I would like to extend bg_mon to report the sizes of pg_replslot and pgsql_tmp. My question is how to do it in the best way.

  1. I can follow the implementation of pg_log directory size . That however will duplicate data bg_mon reports under the device key for the most common case where all subdirectories reside at the same place (such duplication already happens for data, wal, and logentries). This approach also does not look extensible if one needs to add sizes of more subdirectories of $PGDATA to the bg_mon in the future.

  2. Or I can create a separate subdirectories dictionary with "subdirectory": its size in KB key-value pairs. The dictionary will list all subdirectories in $PGDATA

wdyt ?

@Jan-M
Copy link

Jan-M commented Feb 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants