Repository navigation
Document asset table bloat and PostgreSQL monitoring metrics - #211
Open
richturner wants to merge 2 commits into
Open
richturner wants to merge 2 commits into
richturner wants to merge 2 commits into
Conversation
4 tasks
- Add a monitoring metrics table with healthy values and alerting advice - Add an asset table bloat section covering detection, idle in transaction connections and compaction with VACUUM FULL - Clarify the memory golden rule, fillfactor default and compose defaults - Make the shm_size margin and DB container name consistent
richturner
force-pushed
the
enhancement/db_maintenance_monitoring
branch
from
November 20, 2026 11:47
73602c2 to
80cd4ed
Compare
…idle in transaction sessions
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates the Database section of
docs/developer-guide/100-system-administration.md(Next docs) based on an investigation into a production instance wherepg_table_bloat_countkept flipping between 0 and 1. The cause was a bloated asset table heap: 177 MB for about 2,900 rows, reduced to 3.7 MB withVACUUM FULL.Companion to openremote/core#3599, which adds the
pg_asset_raw_data_size/pg_asset_disk_sizemetrics and changespg_connections_stuckto count only connections idle in transaction for more than 1 minute. This PR documents those metrics, so merge it after or together with the core PR.Changes
idle_in_transaction_session_timeout), and compacting withVACUUM FULL, with a lock warning and how to read theVERBOSEoutput.maintenance_work_memis used per autovacuum worker andwork_memper sort or hash step, and gives a more realistic worst-case estimate.profile/deploy.ymland lists the environment variable overrides for the 2 GB worked example.shm_sizemargin (10-20%) throughout, and thepsqlaccess command now usesor-postgresql-1like the rest of the page.Backport
The golden rule, fillfactor and
shm_sizecorrections also apply to the released 1.34.0 docs inversioned_docs/, which this PR does not change.Dependency
The asset table bloat section recommends the new
POSTGRES_IDLE_IN_TRANSACTION_SESSION_TIMEOUTenvironment variable, which needs openremote/postgresql#37 (image) and openremote/core#3600 (profile/deploy.yml). Keep this PR open until those are merged. It still documentsALTER DATABASEas the fallback for older images.