{"Entry":{"collection":"guc","key":"gin_fuzzy_search_limit","name":"gin_fuzzy_search_limit","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Client Connection Defaults / Other Defaults","category_zh":"","changed_in":["18"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.1","status":"added","to":"8.2"},{"documentation_changed":true,"fields":{},"from":"8.2","status":"changed","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":true,"fields":{},"from":"9.0","status":"changed","to":"9.1"},{"documentation_changed":true,"fields":{},"from":"9.1","status":"changed","to":"9.2"},{"documentation_changed":true,"fields":{},"from":"9.2","status":"changed","to":"9.3"},{"documentation_changed":true,"fields":{},"from":"9.3","status":"changed","to":"9.4"},{"documentation_changed":true,"fields":{},"from":"9.4","status":"changed","to":"9.5"},{"documentation_changed":true,"fields":{},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"9.6","status":"changed","to":"10"},{"documentation_changed":true,"fields":{},"from":"10","status":"changed","to":"11"},{"documentation_changed":true,"fields":{},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"14","status":"changed","to":"15"},{"documentation_changed":true,"fields":{},"from":"16","status":"changed","to":"17"},{"documentation_changed":true,"fields":{"extra_desc":{"from":null,"to":"0 means no limit."}},"from":"17","status":"changed","to":"18"}],"content_hash":"6eceb4e476b6f1a3ab6dfe9003081ce83f5de2e34349ab16dd781952ba76f815","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"0"}],"editorial":{"advice":{"olap":"For batch loads or broad searches, test gin_fuzzy_search_limit against ingestion latency, cleanup spikes, result completeness, and maintenance windows.","oltp":"Change gin_fuzzy_search_limit only after measuring the affected GIN maintenance or search path. Prefer an index-level override when one index, rather than the whole cluster, is exceptional.","small":"Do not raise gin_fuzzy_search_limit merely because the default is reached; bound memory and I/O bursts, and keep exact-query semantics unless approximation is explicitly acceptable."},"mechanism":["gin_fuzzy_search_limit sets the maximum allowed result for exact search by GIN. 0 means no limit. A positive limit makes broad GIN searches return a randomly chosen subset of matches, trading completeness for bounded work; zero preserves exact results.","gin_fuzzy_search_limit is a USER-context setting. An authorized role can change it for a session, while ALTER ROLE or ALTER DATABASE can establish a default for future sessions.","GIN behavior also depends on per-index storage parameters, work or maintenance memory, autovacuum, and the shape of indexed values and predicates."],"pitfalls":["Changing gin_fuzzy_search_limit in one session and assuming role defaults, database defaults, or other pooled sessions changed with it.","Applying a cluster-wide GIN value to fix one exceptional index instead of using its storage parameters.","Ignoring cleanup latency, I/O bursts, autovacuum interaction, or result completeness while tuning.","Enabling a positive limit without telling callers that exact searches may return an incomplete random subset."],"references":[{"title":"PostgreSQL 19 Beta 4: gin_fuzzy_search_limit","url":"https://www.postgresql.org/docs/19/runtime-config-client.html#GUC-GIN-FUZZY-SEARCH-LIMIT"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["gin_pending_list_limit","maintenance_work_mem","work_mem","vacuum_cleanup_index_scale_factor","autovacuum_work_mem"],"summary":"gin_fuzzy_search_limit is the PostgreSQL setting that defines the maximum allowed result for exact search by GIN."},"enumvals":[],"first_version":"8.2","group":"Client Connection Defaults","group_slug":"client","imported_at":"2026-09-27T17:57:31.333529+08:00","intro_commit":{},"key":"gin_fuzzy_search_limit","last_version":"20","max_val":"","min_val":"","name":"gin_fuzzy_search_limit","position":160,"present_in":["8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Soft upper limit of the size of the set returned by GIN index scans.","short_desc_zh":"","source_rev":"english-manuals:f942becd98667dac4bd516eeaac230c28d053d99add72266a9fcae9913f0bd93","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"gin_fuzzy_search_limit","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"gin_fuzzy_search_limit","SourceRevision":"english-manuals:f942becd98667dac4bd516eeaac230c28d053d99add72266a9fcae9913f0bd93","Facts":{"boot_val":"0","category":"Client Connection Defaults / Other Defaults","context":"user","description":"Soft upper limit of the size of the set returned by GIN index scans. For more information see Section 65.4.5.","doc":{"anchor":"GUC-GIN-FUZZY-SEARCH-LIMIT","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"0 means no limit.","lang":"en","max_val":"2147483647","metadata_version":"18","min_val":"0","name":"gin_fuzzy_search_limit","short_desc":"Sets the maximum allowed result for exact search by GIN.","source":"pg-settings-source-snapshot","unit":null,"vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-GIN-FUZZY-SEARCH-LIMIT","file":"runtime-config-client.html","lang":"en","sha256":"6be6cc70f29eca4695dc43b2b2b94c75b7e0eaaa2c00273d7a98488917a7edb7","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"gin_fuzzy_search_limit","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"gin_fuzzy_search_limit","Summary":"","BodyHTML":"\u003cp\u003eGIN 索引扫描返回的集合尺寸的软上限。详见\u003ca href=\"/docs/18/gin.html#GIN-TIPS\" rel=\"nofollow\"\u003e第 65.4.5 节\u003c/a\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"582bd4e06d1e74f95f6c7659aa6d7075d3189a3f931587b4137d873e29bb2e49","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003eGIN 索引扫描返回的集合尺寸的软上限。详见\u003ca href=\"/docs/18/gin.html#GIN-TIPS\" title=\"65.4.5. GIN 提示和技巧\"\u003e第 65.4.5 节\u003c/a\u003e。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
