Skip to content

Add metric for pg_dsm_registry_allocations#1404

Open
nadashaban11 wants to merge 1 commit into
cybertec-postgresql:masterfrom
nadashaban11:dsm-registry-allocations
Open

Add metric for pg_dsm_registry_allocations#1404
nadashaban11 wants to merge 1 commit into
cybertec-postgresql:masterfrom
nadashaban11:dsm-registry-allocations

Conversation

@nadashaban11
Copy link
Copy Markdown
Contributor

Description

Added metric for dsm_registry_allocations to report dynamic shared memory allocations using the new pg_dsm_registry_allocations view provided in PostgreSQL 19.

Fixes #1400

  • SQL query to fetch the allocations retrieved from pg_dsm_registry_allocations view
  • Used coalesce(size, 0) to handle edge cases, as I read that partially-initialized entries will report a NULL size
  • Applied tag naming (tag_name, tag_type)
  • Registered the new metric in the presets (exhaustive, full, debug, exhaustive_no_python)
  • I set is_instance_level: true based on my understanding that DSM is a cluster-wide resource, but please let me know if this needs correction

AI & Automation Policy

  • I am the human author and take full personal responsibility for every change in this PR.
  • No AI or automated generative tool was used in any part of this PR OR I have disclosed all tool(s) below.

AI/automation tools used (leave blank if none):

Checklist

  • Code compiles and existing tests pass locally.
  • New or updated tests are included where applicable.
  • Documentation is updated where applicable.

@pashagolub pashagolub added the metrics Metrics related issues label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metrics Metrics related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add metric for pg_dsm_registry_allocations to report dynamic shared memory details

2 participants