select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / QUERY TUNING

min_parallel_table_scan_size

Read PG 18 manual ↗

Sets the minimum amount of table data that must be scanned in order for a parallel scan to be considered.

Type
integer
Context
user
Measured default
8 MiB (1024 × 8kB)
Unit
8kB
Metadata snapshot
18

Definition PG 18 manual

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).

Measured default history
Version intervalDefault
10 – 198 MiB (1024 × 8kB)
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

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.

Operational considerations

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.

Workload guidance

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.

Version history 2
  1. PG 11 → 12changed
  2. PG 9.6 → 10added

Related entries

Further reading

Definition snapshot: english-manuals:2630cb2580d43bed59817f8b70c… · English manual source