{"Entry":{"collection":"guc","key":"min_parallel_table_scan_size","name":"min_parallel_table_scan_size","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Query Tuning / Planner Cost Constants","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.6","status":"added","to":"10"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"}],"content_hash":"09169d9aa5bfe78e5fb49a5f6a6bfb2049f86fb73c0faa861dfbc1e2803dd6cc","context":"","default_changed_in":[],"default_history":[{"from":"10","to":"19","value":"8 MiB (1024 × 8kB)"}],"editorial":{"advice":{"olap":"Keep the upstream threshold unless small but expensive scans are wrongly excluded. Lowering min_parallel_table_scan_size can raise planning and worker overhead when many queries run concurrently.","oltp":"A higher min_parallel_table_scan_size can reduce parallel startup on short OLTP scans, but confirm that reports and maintenance do not regress.","small":"Prefer a conservative or higher threshold on a small host where worker startup and memory contention dominate. Coordinate it with max_parallel_workers_per_gather rather than tuning it alone."},"mechanism":["min_parallel_table_scan_size is a planner eligibility floor: parallel scan paths are not considered unless table data estimated to be scanned reaches the configured size.","Crossing this floor does not guarantee a parallel plan. The planner still compares costs, checks parallel safety, and requests workers subject to max_parallel_workers_per_gather and the cluster worker pools.","For a parallel sequential scan, the estimate is normally the whole relation size. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value."],"pitfalls":["Assuming the threshold caps actual bytes read; it only controls planner eligibility.","Expecting a parallel plan merely because the size estimate crosses the threshold.","Lowering it without budgeting workers and per-node memory under concurrency.","Comparing the raw numeric value without applying its 8kB block unit."],"references":[{"title":"PostgreSQL 19 Beta 4: min_parallel_table_scan_size","url":"https://www.postgresql.org/docs/19/runtime-config-query.html#GUC-MIN-PARALLEL-TABLE-SCAN-SIZE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["max_parallel_workers_per_gather","parallel_setup_cost","parallel_tuple_cost","max_parallel_workers","enable_seqscan"],"summary":"min_parallel_table_scan_size — Sets the minimum amount of table data for a parallel scan. Observed in PG10–19 Beta 4; its last measured boot default is 8 MiB (1024 × 8kB) in PG19 Beta 4, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"10","group":"Query Tuning","group_slug":"query","imported_at":"2026-09-27T17:57:31.78379+08:00","intro_commit":{"authored_at":"2017-02-15T13:37:24-05:00","discussion":["https://postgr.es/m/CAA4eK1KowGSYYVpd2qPpaPPA5R90r++QwDFbrRECTE9H_HvpOg@mail.gmail.com","https://postgr.es/m/CAA4eK1+TnM4pXQbvn7OXqam+k_HZqb0ROZUMxOiL6DWJYCyYow@mail.gmail.com"],"hash":"51ee6f3160d2e1515ed6197594bda67eb99dc2cc","subject":"Replace min_parallel_relation_size with two new GUCs.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=51ee6f3160d2e1515ed6197594bda67eb99dc2cc"},"key":"min_parallel_table_scan_size","last_version":"20","max_val":"","min_val":"","name":"min_parallel_table_scan_size","position":296,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Sets the minimum amount of table data that must be scanned in order for a parallel scan to be considered.","short_desc_zh":"","source_rev":"english-manuals:bc7dbc9e640863b437906084eebcc3f51da5ac787160a00adcdfa6ae7dc31d58","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"min_parallel_table_scan_size","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"min_parallel_table_scan_size","SourceRevision":"english-manuals:bc7dbc9e640863b437906084eebcc3f51da5ac787160a00adcdfa6ae7dc31d58","Facts":{"boot_val":"1024","category":"Query Tuning / Planner Cost Constants","context":"user","description":"Sets the minimum amount of table data that must be scanned in order for a parallel scan to be considered. For a parallel sequential scan, the amount of table data scanned is always equal to the size of the table, but when indexes are used the amount of table data scanned will normally be less. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default is 8 megabytes (8MB).","doc":{"anchor":"GUC-MIN-PARALLEL-TABLE-SCAN-SIZE","file":"runtime-config-query.html","lang":"en","sha256":"33456ca7ef52bf28e93e34b932a411db7a1b95800179add2cf867dc6ec9144bc","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"If the planner estimates that it will read a number of table pages too small to reach this limit, a parallel scan will not be considered.","lang":"en","max_val":"715827882","metadata_version":"18","min_val":"0","name":"min_parallel_table_scan_size","short_desc":"Sets the minimum amount of table data for a parallel scan.","source":"pg-settings-source-snapshot","unit":"8kB","vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-MIN-PARALLEL-TABLE-SCAN-SIZE","file":"runtime-config-query.html","lang":"en","sha256":"33456ca7ef52bf28e93e34b932a411db7a1b95800179add2cf867dc6ec9144bc","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"min_parallel_table_scan_size","SourceDatabase":"center","Version":"18","Locale":"en","Title":"min_parallel_table_scan_size","Summary":"Sets the minimum amount of table data that must be scanned in order for a parallel scan to be considered. For a parallel sequential scan, the amount of table data scanned is always equal to the size of the table, but when indexes are used the amount of table data scanned will normally be less. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default is 8 megabytes (8MB).","BodyHTML":"\u003cp\u003eSets the minimum amount of table data that must be scanned in order for a parallel scan to be considered. For a parallel sequential scan, the amount of table data scanned is always equal to the size of the table, but when indexes are used the amount of table data scanned will normally be less. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default is 8 megabytes (8MB).\u003c/p\u003e","SourceRevision":"english-manuals:bc7dbc9e640863b437906084eebcc3f51da5ac787160a00adcdfa6ae7dc31d58","ContentHash":"2e07cca0956d8e71e5050cbd15c1ba9e5182cd8e3c224b662052085bf1ac3b87","Payload":{"description":"Sets the minimum amount of table data that must be scanned in order for a parallel scan to be considered. For a parallel sequential scan, the amount of table data scanned is always equal to the size of the table, but when indexes are used the amount of table data scanned will normally be less. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default is 8 megabytes (8MB)."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
