{"Entry":{"collection":"guc","key":"enable_parallel_hash","name":"enable_parallel_hash","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Query Tuning / Planner Method Configuration","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"10","status":"added","to":"11"}],"content_hash":"6b3f4b16a4aa2decf4fe14e0b64f943ca35ef2582e4e822c8b13d9927b72cba1","context":"","default_changed_in":[],"default_history":[{"from":"11","to":"19","value":"on"}],"editorial":{"advice":{"olap":"Benchmark representative analytical plans with and without enable_parallel_hash. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting.","oltp":"Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing parallel hash, in which workers cooperate to build and probe a shared hash table explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban.","small":"Do not use enable_parallel_hash as a permanent hint on a small host. Resource pressure may change the best method, so verify with EXPLAIN (ANALYZE, BUFFERS) and keep the change scoped to the affected workload if it is still needed."},"mechanism":["enable_parallel_hash controls whether the planner may choose parallel hash, in which workers cooperate to build and probe a shared hash table.","It is consulted while a plan is built. A session-level change is useful for comparing EXPLAIN alternatives, but an already cached plan is not retroactively rewritten; invalidation or replanning is required to observe a different choice.","It has no effect when enable_hashjoin is off and also depends on a parallel-safe plan and available workers. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value."],"pitfalls":["Treating enable_parallel_hash as a query hint even though it affects every plan built in its scope.","Testing an already cached prepared plan and concluding that the setting has no effect.","Masking stale statistics or cardinality errors by disabling a plan method globally.","It has no effect when enable_hashjoin is off and also depends on a parallel-safe plan and available workers."],"references":[{"title":"PostgreSQL 19 Beta 4: enable_parallel_hash","url":"https://www.postgresql.org/docs/19/runtime-config-query.html#GUC-ENABLE-PARALLEL-HASH"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["enable_hashjoin","max_parallel_workers_per_gather","work_mem","hash_mem_multiplier"],"summary":"enable_parallel_hash — Enables the planner's use of parallel hash plans. Observed in PG11–19 Beta 4; its last measured boot default is on in PG19 Beta 4, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"11","group":"Query Tuning","group_slug":"query","imported_at":"2026-09-27T17:57:31.221216+08:00","intro_commit":{"authored_at":"2017-12-20T23:39:21-08:00","discussion":["https://postgr.es/m/CAEepm=2W=cOkiZxcg6qiFQP-dHUe09aqTrEMM7yJDrHMhDv_RA@mail.gmail.com"],"hash":"1804284042e659e7d16904e7bbb0ad546394b6a3","subject":"Add parallel-aware hash joins.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1804284042e659e7d16904e7bbb0ad546394b6a3"},"key":"enable_parallel_hash","last_version":"20","max_val":"","min_val":"","name":"enable_parallel_hash","position":129,"present_in":["11","12","13","14","15","16","17","18","19","20"],"short_desc":"Enables or disables the query planner's use of hash-join plan types with parallel hash.","short_desc_zh":"","source_rev":"english-manuals:73234d7b2e84e6224df6fdf498f2bc9241bbe7f0de78447808d94da5dae6f541","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"enable_parallel_hash","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"enable_parallel_hash","SourceRevision":"english-manuals:73234d7b2e84e6224df6fdf498f2bc9241bbe7f0de78447808d94da5dae6f541","Facts":{"boot_val":"on","category":"Query Tuning / Planner Method Configuration","context":"user","description":"Enables or disables the query planner's use of hash-join plan types with parallel hash. Has no effect if hash-join plans are not also enabled. The default is on.","doc":{"anchor":"GUC-ENABLE-PARALLEL-HASH","file":"runtime-config-query.html","lang":"en","sha256":"33456ca7ef52bf28e93e34b932a411db7a1b95800179add2cf867dc6ec9144bc","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"enable_parallel_hash","short_desc":"Enables the planner's use of parallel hash plans.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-ENABLE-PARALLEL-HASH","file":"runtime-config-query.html","lang":"en","sha256":"33456ca7ef52bf28e93e34b932a411db7a1b95800179add2cf867dc6ec9144bc","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"enable_parallel_hash","SourceDatabase":"center","Version":"18","Locale":"en","Title":"enable_parallel_hash","Summary":"Enables or disables the query planner's use of hash-join plan types with parallel hash. Has no effect if hash-join plans are not also enabled. The default is on.","BodyHTML":"\u003cp\u003eEnables or disables the query planner\u0026#39;s use of hash-join plan types with parallel hash. Has no effect if hash-join plans are not also enabled. The default is on.\u003c/p\u003e","SourceRevision":"english-manuals:73234d7b2e84e6224df6fdf498f2bc9241bbe7f0de78447808d94da5dae6f541","ContentHash":"a88597bb0ac2495acc27b1249e9742d82e9c69ec1af6bd4231bb7282c7dabe66","Payload":{"description":"Enables or disables the query planner's use of hash-join plan types with parallel hash. Has no effect if hash-join plans are not also enabled. The default is on."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
