feat: add pg_textsearch tuning support - #148
Open
tjgreen42 wants to merge 4 commits into
Open
Conversation
added 4 commits
April 20, 2026 19:48
When pg_textsearch is listed in shared_preload_libraries, the tuner now recommends a value for pg_textsearch.memory_limit based on total system memory (totalMemory/4 for the default profile, totalMemory/8 for promscale, which already allocates half of RAM to shared_buffers). Detection is automatic: if pg_textsearch is absent from the conf file, no recommendation is emitted.
The PG18 timescale image stores its data under /var/lib/postgresql/18/docker rather than /var/lib/postgresql/data, so the hardcoded TMPDIR caused the backup write to fail. Deriving it from the config file's parent directory keeps the existing behavior for pg10-pg17 while working for pg18.
- parseLineForSharedLibResult now does a comma-token exact match for both timescaledb and pg_textsearch, so libraries like my_pg_textsearch or timescaledb_toolkit no longer trigger detection. - Replaced the underscore-based displayLabel heuristic with an optional displayLabeler interface implemented by PgTextsearchSettingsGroup. - Extracted pgTextsearchDetected() helper so the Tuner.Run wiring has direct unit-test coverage. - Integration workflow now uses TMPDIR=/tmp rather than pointing backups into the PG data directory. - Clarified README to state the memory_limit ratios.
tjgreen42
marked this pull request as ready for review
April 24, 2026 15:50
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.
When
pg_textsearchappears inshared_preload_libraries, the tuner now recommends a value forpg_textsearch.memory_limitscaled to total system memory (totalMemory/4for the default profile;totalMemory/8forpromscale, which already reserves half of RAM forshared_buffers). This GUC puts a hard cap on shared memory used by the extension.