Skip to content

v14: fix: Performance and high memory usage of relation hint calculation - #4588

Merged
steve-chavez merged 1 commit into
v14from
backport-4472-to-v14
Jan 3, 2026
Merged

v14: fix: Performance and high memory usage of relation hint calculation#4588
steve-chavez merged 1 commit into
v14from
backport-4472-to-v14

Conversation

@postgrest-ci

@postgrest-ci postgrest-ci Bot commented Jan 2, 2026

Copy link
Copy Markdown

Backport for #4472.

* Calculation of hint message when requested relation is not present in schema cache requires creation of a FuzzySet (to use fuzzy search to find candidate tables). For schemas with many tables it is costly.
This patch introduces dbTablesFuzzyIndex in SchemaCache to memoize the FuzzySet creation.

* Additionally, because of FuzzySet large memory requirements, this patch introduces a limit of 500 relations per schema, above which FuzzySet is not created and hint calculation disabled.

(cherry picked from commit e592d56)
@steve-chavez
steve-chavez merged commit e252a49 into v14 Jan 3, 2026
31 checks passed
@steve-chavez
steve-chavez deleted the backport-4472-to-v14 branch January 3, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants