This is the multi-page printable view of this section. .
Query Tuning
- 1: constraint_exclusion
- 2: cpu_index_tuple_cost
- 3: cpu_operator_cost
- 4: cpu_tuple_cost
- 5: cursor_tuple_fraction
- 6: default_statistics_target
- 7: effective_cache_size
- 8: enable_async_append
- 9: enable_bitmapscan
- 10: enable_distinct_reordering
- 11: enable_eager_aggregate
- 12: enable_gathermerge
- 13: enable_group_by_reordering
- 14: enable_hashagg
- 15: enable_hashjoin
- 16: enable_incremental_sort
- 17: enable_indexonlyscan
- 18: enable_indexscan
- 19: enable_material
- 20: enable_memoize
- 21: enable_mergejoin
- 22: enable_nestloop
- 23: enable_parallel_append
- 24: enable_parallel_hash
- 25: enable_partition_pruning
- 26: enable_partitionwise_aggregate
- 27: enable_partitionwise_join
- 28: enable_presorted_aggregate
- 29: enable_self_join_elimination
- 30: enable_seqscan
- 31: enable_sort
- 32: enable_tidscan
- 33: from_collapse_limit
- 34: geqo
- 35: geqo_effort
- 36: geqo_generations
- 37: geqo_pool_size
- 38: geqo_seed
- 39: geqo_selection_bias
- 40: geqo_threshold
- 41: jit
- 42: jit_above_cost
- 43: jit_inline_above_cost
- 44: jit_optimize_above_cost
- 45: join_collapse_limit
- 46: min_eager_agg_group_size
- 47: min_parallel_index_scan_size
- 48: min_parallel_relation_size
- 49: min_parallel_table_scan_size
- 50: parallel_setup_cost
- 51: parallel_tuple_cost
- 52: plan_cache_mode
- 53: random_page_cost
- 54: recursive_worktable_factor
- 55: seq_page_cost
Dossier URLs remain flat; this category exists only to organize browsing and the sidebar.
1 - constraint_exclusion
Fact — official short description: “Enables the planner to use constraints to optimize queries.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- partition
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | partition |
— | partition |
How it works
constraint_exclusion lets the planner compare query predicates with CHECK constraints and omit relations whose constraints prove that they cannot match. partition limits that work to traditional inheritance children and UNION ALL arms; it is separate from declarative partition pruning.
The proof is attempted at planning time, so enabling it more broadly increases planning work even when no relation can be excluded. It relies on constraints that are visible and logically contradictory to the query conditions.
For declaratively partitioned tables, enable_partition_pruning is the primary control. constraint_exclusion remains useful for inheritance-based partitioning and carefully constructed constraint-backed UNION ALL views. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep constraint_exclusion at its upstream default unless representative plans show a repeatable, workload-wide problem. Test a local override first and include planning latency as well as execution latency. |
| OLAP | Analytical SQL can make constraint_exclusion more visible because joins, cursors, or recursion are larger. Benchmark the full statement family and inspect estimates rather than copying a single successful value. |
| Small nodes | On a small host, avoid increasing planning search or memory pressure through constraint_exclusion without a measured benefit. Prefer query-local structure or a scoped role setting over a cluster-wide override. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating constraint_exclusion as an executor resource limit rather than a planning assumption or policy.
- Testing only one parameter set or one data distribution.
- Expecting an already cached plan to be rewritten automatically.
- Using a global override to hide stale statistics or fragile SQL structure.
Related parameters
enable_partition_pruning · from_collapse_limit · join_collapse_limit · default_statistics_target
References
2 - cpu_index_tuple_cost
Fact — official short description: “Sets the planner’s estimate of the cost of processing each index entry during an index scan.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0.005
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0.005 |
— | 0.005 |
How it works
cpu_index_tuple_cost models the CPU work to process one index entry during an index scan. It is one term in estimated path cost and does not allocate resources or change executor behavior directly.
Planner cost units are arbitrary and only their ratios matter. Scaling all cost constants together leaves path ordering unchanged; changing one alters the balance between I/O, row processing, operators, and parallel overhead.
The value is consulted when a plan is built. Statistics, row-count estimates, cache assumptions, tablespace overrides, and enabled plan methods can outweigh a small change in this constant. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Calibrate cpu_index_tuple_cost only from a representative workload, not one plan. First correct stale statistics and compare EXPLAIN (ANALYZE, BUFFERS) estimates with reality; use role or tablespace scope where possible. |
| OLAP | Analytical workloads can justify a different CPU-versus-I/O balance, but change cpu_index_tuple_cost together with the related cost model and validate the full scan/join/aggregate mix. |
| Small nodes | Keep the upstream value unless repeated evidence shows a systematic modeling error. On small systems, concurrency and cache residency often matter more than fine-grained changes to cpu_index_tuple_cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Interpreting the value as elapsed time or a hard resource limit.
- Tuning it to repair one query and regressing the wider workload.
- Changing cost constants before correcting statistics and cardinality estimates.
- Forgetting that only relative values influence path choice.
Related parameters
cpu_tuple_cost · cpu_operator_cost · random_page_cost · seq_page_cost · enable_indexscan
References
3 - cpu_operator_cost
Fact — official short description: “Sets the planner’s estimate of the cost of processing each operator or function call.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0.0025
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0.0025 |
— | 0.0025 |
How it works
cpu_operator_cost models the CPU work for each operator or function invocation. It is one term in estimated path cost and does not allocate resources or change executor behavior directly.
Planner cost units are arbitrary and only their ratios matter. Scaling all cost constants together leaves path ordering unchanged; changing one alters the balance between I/O, row processing, operators, and parallel overhead.
The value is consulted when a plan is built. Statistics, row-count estimates, cache assumptions, tablespace overrides, and enabled plan methods can outweigh a small change in this constant. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Calibrate cpu_operator_cost only from a representative workload, not one plan. First correct stale statistics and compare EXPLAIN (ANALYZE, BUFFERS) estimates with reality; use role or tablespace scope where possible. |
| OLAP | Analytical workloads can justify a different CPU-versus-I/O balance, but change cpu_operator_cost together with the related cost model and validate the full scan/join/aggregate mix. |
| Small nodes | Keep the upstream value unless repeated evidence shows a systematic modeling error. On small systems, concurrency and cache residency often matter more than fine-grained changes to cpu_operator_cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Interpreting the value as elapsed time or a hard resource limit.
- Tuning it to repair one query and regressing the wider workload.
- Changing cost constants before correcting statistics and cardinality estimates.
- Forgetting that only relative values influence path choice.
Related parameters
cpu_tuple_cost · cpu_index_tuple_cost · jit_above_cost · seq_page_cost
References
4 - cpu_tuple_cost
Fact — official short description: “Sets the planner’s estimate of the cost of processing each tuple (row).”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0.01
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0.01 |
— | 0.01 |
How it works
cpu_tuple_cost models the CPU work to process one row. It is one term in estimated path cost and does not allocate resources or change executor behavior directly.
Planner cost units are arbitrary and only their ratios matter. Scaling all cost constants together leaves path ordering unchanged; changing one alters the balance between I/O, row processing, operators, and parallel overhead.
The value is consulted when a plan is built. Statistics, row-count estimates, cache assumptions, tablespace overrides, and enabled plan methods can outweigh a small change in this constant. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Calibrate cpu_tuple_cost only from a representative workload, not one plan. First correct stale statistics and compare EXPLAIN (ANALYZE, BUFFERS) estimates with reality; use role or tablespace scope where possible. |
| OLAP | Analytical workloads can justify a different CPU-versus-I/O balance, but change cpu_tuple_cost together with the related cost model and validate the full scan/join/aggregate mix. |
| Small nodes | Keep the upstream value unless repeated evidence shows a systematic modeling error. On small systems, concurrency and cache residency often matter more than fine-grained changes to cpu_tuple_cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Interpreting the value as elapsed time or a hard resource limit.
- Tuning it to repair one query and regressing the wider workload.
- Changing cost constants before correcting statistics and cardinality estimates.
- Forgetting that only relative values influence path choice.
Related parameters
cpu_index_tuple_cost · cpu_operator_cost · seq_page_cost · random_page_cost · enable_seqscan
References
5 - cursor_tuple_fraction
Fact — official short description: “Sets the planner’s estimate of the fraction of a cursor’s rows that will be retrieved.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0.1
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0.1 |
— | 0.1 |
How it works
cursor_tuple_fraction tells the planner what fraction of a cursor’s result is expected to be fetched. Lower fractions give more weight to startup cost; 1.0 plans like an ordinary query that consumes the full result.
The estimate can change join order and access paths by preferring a fast first row even when total execution would be slower. It does not stop FETCH after that fraction and is not a row limit.
It is consulted at planning time for cursor plans. Application behavior matters: cursors used for pagination, early exit, or full export have very different appropriate fractions. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep cursor_tuple_fraction at its upstream default unless representative plans show a repeatable, workload-wide problem. Test a local override first and include planning latency as well as execution latency. |
| OLAP | Analytical SQL can make cursor_tuple_fraction more visible because joins, cursors, or recursion are larger. Benchmark the full statement family and inspect estimates rather than copying a single successful value. |
| Small nodes | On a small host, avoid increasing planning search or memory pressure through cursor_tuple_fraction without a measured benefit. Prefer query-local structure or a scoped role setting over a cluster-wide override. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating cursor_tuple_fraction as an executor resource limit rather than a planning assumption or policy.
- Testing only one parameter set or one data distribution.
- Expecting an already cached plan to be rewritten automatically.
- Using a global override to hide stale statistics or fragile SQL structure.
Related parameters
plan_cache_mode · random_page_cost · enable_nestloop · enable_indexscan
References
6 - default_statistics_target
Fact — official short description: “Sets the default statistics target.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 100
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 100 |
— | 100 |
How it works
The target limits the number of entries in most-common-value lists and histogram bins stored for a column. The planner uses those statistics to estimate row counts, which feed access-path, join-order, and join-method decisions.
ANALYZE samples large tables rather than reading every row. Its sample size is driven by the largest statistics target among the columns being analyzed, so increasing the target raises analysis time and space roughly in proportion.
ALTER TABLE … ALTER COLUMN … SET STATISTICS overrides the global default for a column. Correlation between columns is a separate problem that normally requires CREATE STATISTICS rather than simply increasing this setting.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the global target moderate and raise it for skewed columns that actually produce row-estimate errors. Re-run ANALYZE and compare estimated versus actual rows before and after. |
| OLAP | A higher baseline can help complex filters and joins, but use extended statistics for correlated predicates and budget the extra ANALYZE time after bulk loads. |
| Small nodes | A modest global increase is usually inexpensive, but per-column tuning remains more precise. Do not collect deep histograms for columns never used in predicates, grouping, or ordering. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 400 |
different | 400 |
| OLAP | 1000 |
different | 1000 |
| CRIT | 400 |
different | 400 |
| TINY | 200 |
different | 200 |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 400 (dcs); OLAP: PG9.0–19 Beta 3 = 1000 (dcs); CRIT: PG9.0–19 Beta 3 = 400 (dcs); TINY: PG9.0–19 Beta 3 = 200 (dcs). Advice, pending human review — Editorial hypothesis, pending maintainer review: the profiles trade progressively more ANALYZE work for better planner estimates, with OLAP emphasizing plan quality and TINY limiting collection overhead.
Common pitfalls
- Changing the setting does not refresh existing statistics; ANALYZE must run afterward.
- Higher single-column targets do not model cross-column correlation by themselves.
- A high global target increases ANALYZE work even for unimportant columns.
- Partitioned parents can require manual ANALYZE because child changes do not trigger it.
- Approximate sampling can still produce estimation error and plan variation.
Related parameters
autovacuum_analyze_scale_factor · autovacuum_analyze_threshold · enable_partitionwise_join · plan_cache_mode · random_page_cost · effective_cache_size
References
7 - effective_cache_size
Fact — official short description: “Sets the planner’s assumption about the total size of the data caches.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 4 GiB (524288 × 8kB)
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–9.3 | 16384 |
8kB |
128 MiB (16384 × 8kB) |
| PG9.4–19 Beta 3 | 524288 |
8kB |
4 GiB (524288 × 8kB) |
How it works
effective_cache_size is a cost-model input. Higher values make index scans look more attractive; lower values make sequential scans more attractive.
The estimate should reflect both shared_buffers and the portion of the operating-system page cache likely to hold PostgreSQL data, while accounting for overlap and for concurrent queries sharing the same cache capacity.
Changing this parameter does not resize PostgreSQL shared memory, reserve kernel cache, or guarantee that pages remain cached between queries. Its effect is indirect, through plan selection.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Estimate the cache actually usable by PostgreSQL after OS and co-located service needs, then validate index-heavy plans with EXPLAIN. Avoid copying a fixed percentage from a host with different concurrency or working-set behavior. |
| OLAP | Large scans can evict or compete with cached data, so do not equate installed RAM with cache available to a single analytical query. Calibrate against representative mixed and cold-cache runs. |
| Small nodes | Leave room for the OS and other services; a value near total RAM is usually an overstatement on a shared small host. Treat it as a planner estimate, not a memory target. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 24576MB |
different | {{ pg_effective_cache_size }}MB |
| OLAP | 24576MB |
different | {{ pg_effective_cache_size }}MB |
| CRIT | 24576MB |
different | {{ pg_effective_cache_size }}MB |
| TINY | 24576MB |
different | {{ pg_effective_cache_size }}MB |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 24576MB (dcs); OLAP: PG9.0–19 Beta 3 = 24576MB (dcs); CRIT: PG9.0–19 Beta 3 = 24576MB (dcs); TINY: PG9.0–19 Beta 3 = 24576MB (dcs). Advice, pending human review — Editorial inference: using that remainder as the planner’s effective-cache estimate is a simplification that should be checked against real OS cache, overlap, co-located services, and query concurrency.
Common pitfalls
- Expecting the setting to allocate or reserve memory.
- Setting it equal to installed RAM without subtracting memory unavailable to PostgreSQL caching.
- Ignoring that concurrent queries on different data sets share the effective cache.
- Overstating it and then attributing index-heavy plan choices to unrelated cost parameters.
Related parameters
shared_buffers · random_page_cost · seq_page_cost · effective_io_concurrency · max_connections
References
8 - enable_async_append
Fact — official short description: “Enables the planner’s use of async append plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG14 |
| Present in | PG14–19 Beta 3 |
| Removed in | No |
| Introduction commit | 27e1f14563cf — Add support for asynchronous execution. |
| Commit date | 2021-03-31 |
| Discussion | thread 1 · thread 2 · thread 3 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG14–19 Beta 3 | on |
— | on |
How it works
enable_async_append controls whether the planner may choose async-aware Append, which can overlap waits while reading multiple asynchronous-capable children.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing async-aware Append, which can overlap waits while reading multiple asynchronous-capable children explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_async_append. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_async_append 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG14–19 Beta 3 unmodified; OLAP: PG14–19 Beta 3 unmodified; CRIT: PG14–19 Beta 3 unmodified; TINY: PG14–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_async_append 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_parallel_append · effective_io_concurrency · io_method · enable_partition_pruning
References
9 - enable_bitmapscan
Fact — official short description: “Enables the planner’s use of bitmap-scan plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_bitmapscan controls whether the planner may choose bitmap index and bitmap heap scans, which combine tuple locations before visiting heap pages.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing bitmap index and bitmap heap scans, which combine tuple locations before visiting heap pages explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_bitmapscan. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_bitmapscan 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_bitmapscan 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_indexscan · enable_seqscan · random_page_cost · work_mem · effective_io_concurrency
References
10 - enable_distinct_reordering
Fact — official short description: “Enables reordering of DISTINCT keys.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG18 |
| Present in | PG18–19 Beta 3 |
| Removed in | No |
| Introduction commit | a8ccf4e93a7e — Reordering DISTINCT keys to match input path’s pathkeys |
| Commit date | 2024-11-26 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG18–19 Beta 3 | on |
— | on |
How it works
enable_distinct_reordering controls whether the planner may choose reordering DISTINCT keys to match useful input pathkeys and avoid or reduce sorting.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the PG18 default on. For a suspected regression, compare session-local plans and verify whether reordered DISTINCT keys actually match useful input pathkeys or merely trade one sort for another. |
| OLAP | Large DISTINCT operations can benefit when reordering exploits index, merge, or existing sort order. Measure sort memory, spill volume, planning time, and total execution rather than disabling the optimization globally after one plan. |
| Small nodes | Keep on unless a reproducible plan regression is demonstrated. If sorts spill, correct work_mem and plan inputs before treating this planner switch as a permanent hint. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG18–19 Beta 3 unmodified; OLAP: PG18–19 Beta 3 unmodified; CRIT: PG18–19 Beta 3 unmodified; TINY: PG18–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_distinct_reordering 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_sort · enable_incremental_sort · enable_presorted_aggregate · work_mem
References
11 - enable_eager_aggregate
Fact — official short description: “Enables eager aggregation.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG19 Beta 3 |
| Present in | PG19 Beta 3 |
| Removed in | No |
| Introduction commit | 8e11859102f9 — Implement Eager Aggregation |
| Commit date | 2025-10-08 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG19 Beta 3 | on |
— | on |
How it works
PostgreSQL describes enable_eager_aggregate as follows: “Enables eager aggregation.” It can be changed per session, which makes plan or behavior comparisons possible without changing every workload. The atlas measures it in PG19 Beta 3; boot_val is the compiled or initialized baseline, not proof of a running cluster’s effective setting.
Eager aggregation partially pushes aggregation below a join so fewer rows may cross the join, then finalizes the result after all relations are joined. It is considered only when estimated average group size reaches min_eager_agg_group_size; estimates, grouping semantics, memory, and alternative join paths still determine whether the planner selects it.
Read it together with min_eager_agg_group_size, enable_hashagg, enable_partitionwise_aggregate, work_mem. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Use a session-level experiment with EXPLAIN (ANALYZE, BUFFERS) and a representative parameter distribution. Keep the default unless eager aggregation consistently reduces rows and latency without plan instability. |
| OLAP | Test joins with meaningful pre-aggregation opportunities, stale and fresh statistics, and spill pressure. Compare total CPU, peak memory, intermediate rows, and parallel plans, not just one query’s elapsed time. |
| Small nodes | Leave planner switches and thresholds at their defaults until a repeatable regression is isolated. Fix cardinality statistics first; forcing a path globally can trade one improvement for many regressions. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG19 Beta 3 unmodified; OLAP: PG19 Beta 3 unmodified; CRIT: PG19 Beta 3 unmodified; TINY: PG19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating the measured boot_val for enable_eager_aggregate as proof of the effective value on an initialized or managed cluster.
- Applying a change as though it were immediate while pg_settings reports user context.
- Changing this setting in isolation without checking the linked limits, observability, and rollback path.
- Depending on beta behavior in production without retesting the PostgreSQL 19 final release.
Related parameters
min_eager_agg_group_size · enable_hashagg · enable_partitionwise_aggregate · work_mem · hash_mem_multiplier
References
12 - enable_gathermerge
Fact — official short description: “Enables the planner’s use of gather merge plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG10 |
| Present in | PG10–19 Beta 3 |
| Removed in | No |
| Introduction commit | 355d3993c53e — Add a Gather Merge executor node. |
| Commit date | 2017-03-09 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG10–19 Beta 3 | on |
— | on |
How it works
enable_gathermerge controls whether the planner may choose Gather Merge, which preserves the order produced by parallel workers while merging their streams.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing Gather Merge, which preserves the order produced by parallel workers while merging their streams explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_gathermerge. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_gathermerge 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG10–19 Beta 3 unmodified; OLAP: PG10–19 Beta 3 unmodified; CRIT: PG10–19 Beta 3 unmodified; TINY: PG10–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_gathermerge 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
max_parallel_workers_per_gather · enable_sort · enable_incremental_sort · parallel_leader_participation
References
13 - enable_group_by_reordering
Fact — official short description: “Enables reordering of GROUP BY keys.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG17 |
| Present in | PG17–19 Beta 3 |
| Removed in | No |
| Introduction commit | db0d67db2401 — Optimize order of GROUP BY keys |
| Commit date | 2022-03-31 |
| Discussion | thread 1 · thread 2 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG17–19 Beta 3 | on |
— | on |
How it works
enable_group_by_reordering controls whether the planner may choose reordering GROUP BY keys to match a child’s pathkeys and exploit preordered input.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the default on. If a plan regresses, compare session-local on/off plans and check whether reordered GROUP BY keys exploit a child’s existing pathkeys or add planning work without avoiding a sort. |
| OLAP | Large groupings can benefit from index or presorted input order. Evaluate sort and aggregate nodes, spill, planning time, and result ordering requirements before changing the switch for a reporting role. |
| Small nodes | Keep on unless a repeatable regression is isolated. Resolve stale statistics, missing ordering paths, and work_mem pressure before using off as a scoped workaround. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG17–19 Beta 3 unmodified; OLAP: PG17–19 Beta 3 unmodified; CRIT: PG17–19 Beta 3 unmodified; TINY: PG17–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_group_by_reordering 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_sort · enable_incremental_sort · enable_hashagg · enable_presorted_aggregate
References
14 - enable_hashagg
Fact — official short description: “Enables the planner’s use of hashed aggregation plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_hashagg controls whether the planner may choose hashed aggregation, which groups rows in hash tables instead of sorted streams.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing hashed aggregation, which groups rows in hash tables instead of sorted streams explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_hashagg. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_hashagg 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_hashagg 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
work_mem · hash_mem_multiplier · enable_sort · enable_partitionwise_aggregate
References
15 - enable_hashjoin
Fact — official short description: “Enables the planner’s use of hash join plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_hashjoin controls whether the planner may choose hash joins, which build a hash table for one input and probe it with the other.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing hash joins, which build a hash table for one input and probe it with the other explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_hashjoin. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_hashjoin 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_hashjoin 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
work_mem · hash_mem_multiplier · enable_parallel_hash · enable_mergejoin · enable_nestloop
References
16 - enable_incremental_sort
Fact — official short description: “Enables the planner’s use of incremental sort steps.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG13 |
| Present in | PG13–19 Beta 3 |
| Removed in | No |
| Introduction commit | 94e454cddfba — Rename enable_incrementalsort for clarity |
| Commit date | 2020-07-05 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG13–19 Beta 3 | on |
— | on |
How it works
enable_incremental_sort controls whether the planner may choose incremental sort, which sorts within groups that are already ordered by a prefix of the required keys.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing incremental sort, which sorts within groups that are already ordered by a prefix of the required keys explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_incremental_sort. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_incremental_sort 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG13–19 Beta 3 unmodified; OLAP: PG13–19 Beta 3 unmodified; CRIT: PG13–19 Beta 3 unmodified; TINY: PG13–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_incremental_sort 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_sort · enable_gathermerge · work_mem · enable_presorted_aggregate
References
17 - enable_indexonlyscan
Fact — official short description: “Enables the planner’s use of index-only-scan plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.2 |
| Present in | PG9.2–19 Beta 3 |
| Removed in | No |
| Introduction commit | a2822fb9337a — Support index-only scans using the visibility map to avoid heap fetches. |
| Commit date | 2011-10-07 |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.2–19 Beta 3 | on |
— | on |
How it works
enable_indexonlyscan controls whether the planner may choose index-only scans, which can return index tuples without heap reads when visibility information permits.
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 unless enable_indexscan is also on, and heap visits still occur for pages not marked all-visible. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing index-only scans, which can return index tuples without heap reads when visibility information permits explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_indexonlyscan. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_indexonlyscan 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.2–19 Beta 3 unmodified; OLAP: PG9.2–19 Beta 3 unmodified; CRIT: PG9.2–19 Beta 3 unmodified; TINY: PG9.2–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_indexonlyscan 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 unless enable_indexscan is also on, and heap visits still occur for pages not marked all-visible.
Related parameters
enable_indexscan · enable_bitmapscan · enable_seqscan · random_page_cost · track_counts
References
18 - enable_indexscan
Fact — official short description: “Enables the planner’s use of index-scan plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_indexscan controls whether the planner may choose ordinary index scans; this switch also gates consideration of index-only scans.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing ordinary index scans; this switch also gates consideration of index-only scans explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_indexscan. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_indexscan 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_indexscan 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_indexonlyscan · enable_bitmapscan · enable_seqscan · random_page_cost · effective_cache_size
References
19 - enable_material
Fact — official short description: “Enables the planner’s use of materialization.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_material controls whether the planner may choose planner-inserted Materialize nodes that preserve an input for rescans or isolate execution properties.
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.
Turning it off cannot remove materialization that is required for correctness; it only prevents optional planner insertion. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing planner-inserted Materialize nodes that preserve an input for rescans or isolate execution properties explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_material. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_material 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_material 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.
- Turning it off cannot remove materialization that is required for correctness; it only prevents optional planner insertion.
Related parameters
work_mem · temp_file_limit · enable_memoize · enable_nestloop
References
20 - enable_memoize
Fact — official short description: “Enables the planner’s use of memoization.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG14 |
| Present in | PG14–19 Beta 3 |
| Removed in | No |
| Introduction commit | 47ca4836441d — Change the name of the Result Cache node to Memoize |
| Commit date | 2021-07-14 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG14–19 Beta 3 | on |
— | on |
How it works
enable_memoize controls whether the planner may choose Memoize nodes that cache parameterized inner-scan results inside nested-loop joins.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing Memoize nodes that cache parameterized inner-scan results inside nested-loop joins explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_memoize. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_memoize 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG14–19 Beta 3 unmodified; OLAP: PG14–19 Beta 3 unmodified; CRIT: PG14–19 Beta 3 unmodified; TINY: PG14–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_memoize 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_nestloop · work_mem · enable_material · cpu_operator_cost
References
21 - enable_mergejoin
Fact — official short description: “Enables the planner’s use of merge join plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_mergejoin controls whether the planner may choose merge joins, which consume inputs ordered on compatible join keys.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing merge joins, which consume inputs ordered on compatible join keys explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_mergejoin. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_mergejoin 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_mergejoin 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_hashjoin · enable_nestloop · enable_sort · enable_indexscan · work_mem
References
22 - enable_nestloop
Fact — official short description: “Enables the planner’s use of nested-loop join plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_nestloop controls whether the planner may choose nested-loop joins, including parameterized inner scans that may be best for small outer relations.
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.
Turning it off only discourages nested loops because some joins have no other correct implementation. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing nested-loop joins, including parameterized inner scans that may be best for small outer relations explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_nestloop. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_nestloop 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_nestloop 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.
- Turning it off only discourages nested loops because some joins have no other correct implementation.
Related parameters
enable_hashjoin · enable_mergejoin · enable_memoize · random_page_cost · work_mem
References
23 - enable_parallel_append
Fact — official short description: “Enables the planner’s use of parallel append plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | ab7271677812 — Support Parallel Append plan nodes. |
| Commit date | 2017-12-05 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | on |
— | on |
How it works
enable_parallel_append controls whether the planner may choose parallel-aware Append, allowing workers to divide work across child plans.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing parallel-aware Append, allowing workers to divide work across child plans explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_parallel_append. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_parallel_append 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_parallel_append 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_async_append · max_parallel_workers_per_gather · enable_partition_pruning · parallel_leader_participation
References
24 - enable_parallel_hash
Fact — official short description: “Enables the planner’s use of parallel hash plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | 1804284042e6 — Add parallel-aware hash joins. |
| Commit date | 2017-12-20 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | on |
— | on |
How it works
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.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| 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. |
| 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. |
| Small nodes | 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common 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.
Related parameters
enable_hashjoin · max_parallel_workers_per_gather · work_mem · hash_mem_multiplier
References
25 - enable_partition_pruning
Fact — official short description: “Enables plan-time and execution-time partition pruning.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | 055fb8d33da6 — Add GUC enable_partition_pruning |
| Commit date | 2018-04-23 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | on |
— | on |
How it works
enable_partition_pruning controls whether the planner may choose plan-time and execution-time elimination of partitions contradicted by query predicates.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing plan-time and execution-time elimination of partitions contradicted by query predicates explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_partition_pruning. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_partition_pruning 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_partition_pruning 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
constraint_exclusion · enable_partitionwise_join · enable_partitionwise_aggregate · plan_cache_mode
References
26 - enable_partitionwise_aggregate
Fact — official short description: “Enables partitionwise aggregation and grouping.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- off
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | e2f1eb0ee30d — Implement partition-wise grouping/aggregation. |
| Commit date | 2018-03-22 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | off |
— | off |
How it works
enable_partitionwise_aggregate controls whether the planner may choose per-partition grouping or aggregation, with later finalization when grouping keys do not contain partition keys.
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 can multiply work_mem-limited nodes and planning effort roughly with the number of participating partitions. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing per-partition grouping or aggregation, with later finalization when grouping keys do not contain partition keys explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_partitionwise_aggregate. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_partitionwise_aggregate 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | on |
different | 'on' |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 = on (dcs); CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. Advice, pending human review — Editorial inference, pending maintainer review: The OLAP-only override is intended to exploit partition-local aggregation for analytical schemas while avoiding its planning and memory multiplication in other profiles.
Common pitfalls
- Treating enable_partitionwise_aggregate 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 can multiply work_mem-limited nodes and planning effort roughly with the number of participating partitions.
Related parameters
enable_partitionwise_join · enable_partition_pruning · work_mem · enable_hashagg · max_parallel_workers_per_gather
References
27 - enable_partitionwise_join
Fact — official short description: “Enables partitionwise join.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- off
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | 2fb1abaeb016 — Rename enable_partition_wise_join to enable_partitionwise_join |
| Commit date | 2018-02-16 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | off |
— | off |
How it works
enable_partitionwise_join controls whether the planner may choose joining one-to-one matching partitions when join keys contain compatible partition keys.
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 can multiply work_mem-limited nodes and planning effort roughly with the number of participating partitions. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default off for routine OLTP. Test on at session scope only when both sides have one-to-one compatible partition layouts and the join includes every partition key; budget planning CPU and the work_mem-limited nodes created per partition. |
| OLAP | Partition-aligned analytical joins can improve with on, which is why the current Pigsty OLAP template enables it. Compare planning memory, planning time, total execution memory, and partition count—not execution time alone. |
| Small nodes | Leave off unless a specific partition-aligned join repeatedly benefits. Many partitions can make planning and per-node memory disproportionate on a small host even when each local join is efficient. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | on |
different | 'on' |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 = on (dcs); CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. Advice, pending human review — Editorial inference, pending maintainer review: The OLAP-only override is intended to exploit matching partition layouts for analytical joins while avoiding wider planning and memory cost in other profiles.
Common pitfalls
- Treating enable_partitionwise_join 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 can multiply work_mem-limited nodes and planning effort roughly with the number of participating partitions.
Related parameters
enable_partitionwise_aggregate · enable_partition_pruning · work_mem · join_collapse_limit · max_parallel_workers_per_gather
References
28 - enable_presorted_aggregate
Fact — official short description: “Enables the planner’s ability to produce plans that provide presorted input for ORDER BY / DISTINCT aggregate functions.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG16 |
| Present in | PG16–19 Beta 3 |
| Removed in | No |
| Introduction commit | 3226f47282a0 — Add enable_presorted_aggregate GUC |
| Commit date | 2022-12-20 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG16–19 Beta 3 | on |
— | on |
How it works
enable_presorted_aggregate controls whether the planner may choose plans that deliver input already ordered for aggregate ORDER BY or DISTINCT clauses.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing plans that deliver input already ordered for aggregate ORDER BY or DISTINCT clauses explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_presorted_aggregate. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_presorted_aggregate 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG16–19 Beta 3 unmodified; OLAP: PG16–19 Beta 3 unmodified; CRIT: PG16–19 Beta 3 unmodified; TINY: PG16–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_presorted_aggregate 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_sort · enable_incremental_sort · enable_group_by_reordering · work_mem
References
29 - enable_self_join_elimination
Fact — official short description: “Enables removal of unique self-joins.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG18 |
| Present in | PG18–19 Beta 3 |
| Removed in | No |
| Introduction commit | fc069a3a6319 — Implement Self-Join Elimination |
| Commit date | 2025-02-13 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG18–19 Beta 3 | on |
— | on |
How it works
enable_self_join_elimination controls whether the planner may choose removing provably redundant self-joins on plain tables when uniqueness and predicates preserve semantics.
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.
The optimization is limited to plain tables and requires proofs that removing the duplicate relation preserves results. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the PG18 default on. If a regression is suspected, compare on and off in one session and inspect whether uniqueness proofs and predicates allow a redundant plain-table self-join to be removed; do not disable it cluster-wide to mask bad estimates. |
| OLAP | Self-join elimination can reduce scans and join work in generated analytical SQL. Validate plan shape and result equivalence on representative statements, remembering that the optimization is limited to plain tables and provable uniqueness. |
| Small nodes | Keep on unless a reproducible PG18 planner regression is isolated. The switch does not remove arbitrary self-joins, so query and index design remain necessary when the proof conditions are absent. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG18–19 Beta 3 unmodified; OLAP: PG18–19 Beta 3 unmodified; CRIT: PG18–19 Beta 3 unmodified; TINY: PG18–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_self_join_elimination 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.
- The optimization is limited to plain tables and requires proofs that removing the duplicate relation preserves results.
Related parameters
join_collapse_limit · from_collapse_limit · enable_nestloop · enable_hashjoin
References
30 - enable_seqscan
Fact — official short description: “Enables the planner’s use of sequential-scan plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_seqscan controls whether the planner may choose sequential scans, which visit a relation in physical page order.
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.
Turning it off only discourages sequential scans because some queries still have no usable alternative. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing sequential scans, which visit a relation in physical page order explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_seqscan. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_seqscan 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_seqscan 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.
- Turning it off only discourages sequential scans because some queries still have no usable alternative.
Related parameters
enable_indexscan · enable_bitmapscan · seq_page_cost · random_page_cost · effective_cache_size
References
31 - enable_sort
Fact — official short description: “Enables the planner’s use of explicit sort steps.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_sort controls whether the planner may choose explicit Sort nodes when no usable input order satisfies the requested pathkeys.
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.
Turning it off only discourages explicit sorting because correctness can still require a sort. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing explicit Sort nodes when no usable input order satisfies the requested pathkeys explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_sort. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_sort 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_sort 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.
- Turning it off only discourages explicit sorting because correctness can still require a sort.
Related parameters
work_mem · temp_file_limit · enable_incremental_sort · enable_gathermerge · trace_sort
References
32 - enable_tidscan
Fact — official short description: “Enables the planner’s use of TID scan plans.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
enable_tidscan controls whether the planner may choose TID scans for predicates that identify physical tuple locations such as ctid.
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.
The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep the upstream default for routine OLTP. Use a transaction- or session-local change to diagnose whether choosing TID scans for predicates that identify physical tuple locations such as ctid explains a regression, then repair statistics, indexes, estimates, or query shape instead of leaving a cluster-wide method ban. |
| OLAP | Benchmark representative analytical plans with and without enable_tidscan. Judge planning time, memory, spill, and execution time together; a win for one report is not evidence for a global setting. |
| Small nodes | Do not use enable_tidscan 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating enable_tidscan 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.
- The switch changes which candidate paths the planner may cost; it does not make the chosen method faster by itself.
Related parameters
enable_indexscan · enable_seqscan · random_page_cost · cpu_tuple_cost
References
33 - from_collapse_limit
Fact — official short description: “Sets the FROM-list size beyond which subqueries are not collapsed.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 8
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 8 |
— | 8 |
How it works
from_collapse_limit bounds how far the planner merges eligible subqueries into the parent FROM list. Flattening exposes more join orders and predicate movement opportunities but enlarges the search space.
If flattening would produce more FROM items than the limit, the subquery boundary is retained. Smaller values can reduce planning time while hiding a better global join order.
The resulting relation count interacts with join_collapse_limit and geqo_threshold; raising this limit can unexpectedly move the query from exhaustive planning into GEQO. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep from_collapse_limit at its upstream default unless representative plans show a repeatable, workload-wide problem. Test a local override first and include planning latency as well as execution latency. |
| OLAP | Analytical SQL can make from_collapse_limit more visible because joins, cursors, or recursion are larger. Benchmark the full statement family and inspect estimates rather than copying a single successful value. |
| Small nodes | On a small host, avoid increasing planning search or memory pressure through from_collapse_limit without a measured benefit. Prefer query-local structure or a scoped role setting over a cluster-wide override. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating from_collapse_limit as an executor resource limit rather than a planning assumption or policy.
- Testing only one parameter set or one data distribution.
- Expecting an already cached plan to be rewritten automatically.
- Using a global override to hide stale statistics or fragile SQL structure.
Related parameters
join_collapse_limit · geqo_threshold · geqo · plan_cache_mode
References
34 - geqo
Fact — official short description: “Enables genetic query optimization.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- on
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | on |
— | on |
How it works
It selects the heuristic GEQO join-order search instead of exhaustive dynamic programming for sufficiently large join problems.
GEQO trades bounded planning time for a heuristic search that can miss the best join order. It still costs scan and join paths with the ordinary planner cost model after constructing candidates.
The setting is read during planning, and GEQO’s randomized search means plan quality can vary with seed and search budget. Collapse limits can change the number of relations exposed to the join search and therefore whether the threshold is crossed. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep geqo at its upstream default unless planning time for many-way joins is measured as a problem. Prefer simplifying generated SQL or fixing join estimates before expanding a randomized search budget globally. |
| OLAP | For recurring many-table reports, test geqo with multiple geqo_seed values and compare planning plus execution time. A single lucky seed is not a stable production policy. |
| Small nodes | Avoid increasing geqo in ways that consume disproportionate planning CPU on a small host. The default adaptive values are safer than copying a large-system GEQO budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Judging plan quality from one randomized GEQO run.
- Changing a GEQO knob without accounting for geqo_threshold and collapse limits.
- Spending much more planning CPU for a marginal or unstable execution-time gain.
- Assuming GEQO guarantees the globally best join order.
Related parameters
geqo_threshold · geqo_effort · geqo_pool_size · geqo_generations · join_collapse_limit
References
35 - geqo_effort
Fact — official short description: “GEQO: effort is used to set the default for other GEQO parameters.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 5
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 5 |
— | 5 |
How it works
It is a convenience knob from 1 to 10 that derives defaults for pool size and generations; it has no direct step in the genetic algorithm.
GEQO trades bounded planning time for a heuristic search that can miss the best join order. It still costs scan and join paths with the ordinary planner cost model after constructing candidates.
The setting is read during planning, and GEQO’s randomized search means plan quality can vary with seed and search budget. Collapse limits can change the number of relations exposed to the join search and therefore whether the threshold is crossed. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep geqo_effort at its upstream default unless planning time for many-way joins is measured as a problem. Prefer simplifying generated SQL or fixing join estimates before expanding a randomized search budget globally. |
| OLAP | For recurring many-table reports, test geqo_effort with multiple geqo_seed values and compare planning plus execution time. A single lucky seed is not a stable production policy. |
| Small nodes | Avoid increasing geqo_effort in ways that consume disproportionate planning CPU on a small host. The default adaptive values are safer than copying a large-system GEQO budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Judging plan quality from one randomized GEQO run.
- Changing a GEQO knob without accounting for geqo_threshold and collapse limits.
- Spending much more planning CPU for a marginal or unstable execution-time gain.
- Assuming GEQO guarantees the globally best join order.
Related parameters
geqo · geqo_pool_size · geqo_generations · geqo_selection_bias · geqo_threshold
References
36 - geqo_generations
Fact — official short description: “GEQO: number of iterations of the algorithm.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0 |
— | 0 |
How it works
It sets the number of evolutionary iterations; zero derives a value from the selected pool size.
GEQO trades bounded planning time for a heuristic search that can miss the best join order. It still costs scan and join paths with the ordinary planner cost model after constructing candidates.
The setting is read during planning, and GEQO’s randomized search means plan quality can vary with seed and search budget. Collapse limits can change the number of relations exposed to the join search and therefore whether the threshold is crossed. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep geqo_generations at its upstream default unless planning time for many-way joins is measured as a problem. Prefer simplifying generated SQL or fixing join estimates before expanding a randomized search budget globally. |
| OLAP | For recurring many-table reports, test geqo_generations with multiple geqo_seed values and compare planning plus execution time. A single lucky seed is not a stable production policy. |
| Small nodes | Avoid increasing geqo_generations in ways that consume disproportionate planning CPU on a small host. The default adaptive values are safer than copying a large-system GEQO budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Judging plan quality from one randomized GEQO run.
- Changing a GEQO knob without accounting for geqo_threshold and collapse limits.
- Spending much more planning CPU for a marginal or unstable execution-time gain.
- Assuming GEQO guarantees the globally best join order.
Related parameters
geqo · geqo_pool_size · geqo_effort · geqo_seed · geqo_selection_bias
References
37 - geqo_pool_size
Fact — official short description: “GEQO: number of individuals in the population.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0 |
— | 0 |
How it works
It sets the number of candidate join orders in the genetic population; zero asks PostgreSQL to derive a value from effort and query size.
GEQO trades bounded planning time for a heuristic search that can miss the best join order. It still costs scan and join paths with the ordinary planner cost model after constructing candidates.
The setting is read during planning, and GEQO’s randomized search means plan quality can vary with seed and search budget. Collapse limits can change the number of relations exposed to the join search and therefore whether the threshold is crossed. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep geqo_pool_size at its upstream default unless planning time for many-way joins is measured as a problem. Prefer simplifying generated SQL or fixing join estimates before expanding a randomized search budget globally. |
| OLAP | For recurring many-table reports, test geqo_pool_size with multiple geqo_seed values and compare planning plus execution time. A single lucky seed is not a stable production policy. |
| Small nodes | Avoid increasing geqo_pool_size in ways that consume disproportionate planning CPU on a small host. The default adaptive values are safer than copying a large-system GEQO budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Judging plan quality from one randomized GEQO run.
- Changing a GEQO knob without accounting for geqo_threshold and collapse limits.
- Spending much more planning CPU for a marginal or unstable execution-time gain.
- Assuming GEQO guarantees the globally best join order.
Related parameters
geqo · geqo_effort · geqo_generations · geqo_selection_bias · geqo_seed
References
38 - geqo_seed
Fact — official short description: “GEQO: seed for random path selection.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 0 |
— | 0 |
How it works
It seeds GEQO’s random path selection. Changing it explores a different subset of join orders without changing table data or statistics.
GEQO trades bounded planning time for a heuristic search that can miss the best join order. It still costs scan and join paths with the ordinary planner cost model after constructing candidates.
The setting is read during planning, and GEQO’s randomized search means plan quality can vary with seed and search budget. Collapse limits can change the number of relations exposed to the join search and therefore whether the threshold is crossed. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep geqo_seed at its upstream default unless planning time for many-way joins is measured as a problem. Prefer simplifying generated SQL or fixing join estimates before expanding a randomized search budget globally. |
| OLAP | For recurring many-table reports, test geqo_seed with multiple geqo_seed values and compare planning plus execution time. A single lucky seed is not a stable production policy. |
| Small nodes | Avoid increasing geqo_seed in ways that consume disproportionate planning CPU on a small host. The default adaptive values are safer than copying a large-system GEQO budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Judging plan quality from one randomized GEQO run.
- Changing a GEQO knob without accounting for geqo_threshold and collapse limits.
- Spending much more planning CPU for a marginal or unstable execution-time gain.
- Assuming GEQO guarantees the globally best join order.
Related parameters
geqo · geqo_pool_size · geqo_generations · geqo_selection_bias · geqo_threshold
References
39 - geqo_selection_bias
Fact — official short description: “GEQO: selective pressure within the population.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 2
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 2 |
— | 2 |
How it works
It controls selective pressure: higher values more strongly favor fitter candidates while reducing population diversity.
GEQO trades bounded planning time for a heuristic search that can miss the best join order. It still costs scan and join paths with the ordinary planner cost model after constructing candidates.
The setting is read during planning, and GEQO’s randomized search means plan quality can vary with seed and search budget. Collapse limits can change the number of relations exposed to the join search and therefore whether the threshold is crossed. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep geqo_selection_bias at its upstream default unless planning time for many-way joins is measured as a problem. Prefer simplifying generated SQL or fixing join estimates before expanding a randomized search budget globally. |
| OLAP | For recurring many-table reports, test geqo_selection_bias with multiple geqo_seed values and compare planning plus execution time. A single lucky seed is not a stable production policy. |
| Small nodes | Avoid increasing geqo_selection_bias in ways that consume disproportionate planning CPU on a small host. The default adaptive values are safer than copying a large-system GEQO budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Judging plan quality from one randomized GEQO run.
- Changing a GEQO knob without accounting for geqo_threshold and collapse limits.
- Spending much more planning CPU for a marginal or unstable execution-time gain.
- Assuming GEQO guarantees the globally best join order.
Related parameters
geqo · geqo_pool_size · geqo_generations · geqo_seed · geqo_effort
References
40 - geqo_threshold
Fact — official short description: “Sets the threshold of FROM items beyond which GEQO is used.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 12
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 12 |
— | 12 |
How it works
It counts FROM items and switches eligible join problems to GEQO at or above the threshold; a FULL OUTER JOIN construct counts as one item.
GEQO trades bounded planning time for a heuristic search that can miss the best join order. It still costs scan and join paths with the ordinary planner cost model after constructing candidates.
The setting is read during planning, and GEQO’s randomized search means plan quality can vary with seed and search budget. Collapse limits can change the number of relations exposed to the join search and therefore whether the threshold is crossed. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep geqo_threshold at its upstream default unless planning time for many-way joins is measured as a problem. Prefer simplifying generated SQL or fixing join estimates before expanding a randomized search budget globally. |
| OLAP | For recurring many-table reports, test geqo_threshold with multiple geqo_seed values and compare planning plus execution time. A single lucky seed is not a stable production policy. |
| Small nodes | Avoid increasing geqo_threshold in ways that consume disproportionate planning CPU on a small host. The default adaptive values are safer than copying a large-system GEQO budget. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Judging plan quality from one randomized GEQO run.
- Changing a GEQO knob without accounting for geqo_threshold and collapse limits.
- Spending much more planning CPU for a marginal or unstable execution-time gain.
- Assuming GEQO guarantees the globally best join order.
Related parameters
geqo · geqo_effort · join_collapse_limit · from_collapse_limit · geqo_seed
References
41 - jit
Fact — official short description: “Allow JIT compilation.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- off
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | 432bb9e04da4 — Basic JIT provider and error handling infrastructure. |
| Commit date | 2018-03-21 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11 | off |
— | off |
| PG12–18 | on |
— | on |
| PG19 Beta 3 | off |
— | off |
How it works
The jit switch is the top-level gate. When it is on, jit_above_cost decides whether compilation starts, while jit_inline_above_cost and jit_optimize_above_cost govern additional, more expensive compilation work.
JIT is mainly beneficial for long-running CPU-bound queries, often analytical ones. Compilation adds latency, so short statements can become slower if thresholds are lowered too aggressively.
The decision is made at plan time. For a prepared statement using a generic plan, the settings active when that plan is prepared control the decision; EXPLAIN ANALYZE reports whether JIT ran and how much time its phases consumed.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Leave the default thresholds high or disable JIT if compilation latency appears in short-request tails. Test at the statement or role level before changing it cluster-wide. |
| OLAP | Keep it available and benchmark CPU-heavy aggregates, expressions, and scans. Judge total execution time, including generation, inlining, optimization, and emission overhead. |
| Small nodes | On small CPU-constrained systems, JIT often has little benefit for ordinary queries. Keeping it on with conservative thresholds is different from lowering thresholds to force compilation. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- jit=on does nothing if PostgreSQL was built without an available JIT implementation.
- On does not mean every query is compiled; cost thresholds still gate execution.
- Lowering thresholds can make short queries slower than interpreted execution.
- Generic prepared plans use the configuration in effect when the plan was prepared.
- Estimated cost is not execution time, so threshold behavior must be measured with representative plans.
Related parameters
jit_above_cost · jit_inline_above_cost · jit_optimize_above_cost · jit_provider · plan_cache_mode · jit_expressions
References
42 - jit_above_cost
Fact — official short description: “Perform JIT compilation if query is more expensive.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 100000
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | cc415a56d09a — Basic planner and executor integration for JIT. |
| Commit date | 2018-03-22 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | 100000 |
— | 100000 |
How it works
jit_above_cost compares the finished plan’s estimated cost with a threshold to decide whether PostgreSQL may start JIT compilation. The cost is the planner’s arbitrary estimate, not milliseconds.
The decision occurs at plan time and only matters when JIT is enabled and a provider is available. Generic prepared plans retain the decision made when the generic plan was generated.
A value of -1 disables this stage. jit_inline_above_cost and jit_optimize_above_cost are additional gates after jit_above_cost, so setting either below the base compilation threshold is not meaningful. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Do not lower jit_above_cost globally to chase a single CPU-heavy statement. Compilation latency is visible in short-query tails; test at statement or role scope and include JIT generation time in the result. |
| OLAP | For long CPU-bound queries, benchmark total elapsed time on both sides of jit_above_cost. Lowering the threshold is useful only when saved execution CPU consistently exceeds compilation overhead. |
| Small nodes | Keep the default or disable the stage with -1 when LLVM work competes with a small CPU budget. Estimated cost alone does not prove that JIT will pay back its startup cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Reading the threshold as milliseconds rather than arbitrary planner cost units.
- Ignoring JIT generation, inlining, optimization, and emission time when benchmarking.
- Expecting a changed value to alter a generic plan that was already generated.
- Setting an advanced-stage threshold below jit_above_cost and expecting that stage to run by itself.
Related parameters
jit · jit_inline_above_cost · jit_optimize_above_cost · jit_expressions
References
43 - jit_inline_above_cost
Fact — official short description: “Perform JIT inlining if query is more expensive.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 500000
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | 9370462e9a79 — Add inlining support to LLVM JIT provider. |
| Commit date | 2018-03-28 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | 500000 |
— | 500000 |
How it works
jit_inline_above_cost compares the finished plan’s estimated cost with a threshold to decide whether PostgreSQL may run JIT inlining. The cost is the planner’s arbitrary estimate, not milliseconds.
The decision occurs at plan time and only matters when JIT is enabled and a provider is available. Generic prepared plans retain the decision made when the generic plan was generated.
A value of -1 disables this stage. jit_inline_above_cost and jit_optimize_above_cost are additional gates after jit_above_cost, so setting either below the base compilation threshold is not meaningful. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Do not lower jit_inline_above_cost globally to chase a single CPU-heavy statement. Compilation latency is visible in short-query tails; test at statement or role scope and include JIT generation time in the result. |
| OLAP | For long CPU-bound queries, benchmark total elapsed time on both sides of jit_inline_above_cost. Lowering the threshold is useful only when saved execution CPU consistently exceeds compilation overhead. |
| Small nodes | Keep the default or disable the stage with -1 when LLVM work competes with a small CPU budget. Estimated cost alone does not prove that JIT will pay back its startup cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Reading the threshold as milliseconds rather than arbitrary planner cost units.
- Ignoring JIT generation, inlining, optimization, and emission time when benchmarking.
- Expecting a changed value to alter a generic plan that was already generated.
- Setting an advanced-stage threshold below jit_above_cost and expecting that stage to run by itself.
Related parameters
jit · jit_above_cost · jit_optimize_above_cost · jit_expressions
References
44 - jit_optimize_above_cost
Fact — official short description: “Optimize JIT-compiled functions if query is more expensive.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 500000
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG11 |
| Present in | PG11–19 Beta 3 |
| Removed in | No |
| Introduction commit | cc415a56d09a — Basic planner and executor integration for JIT. |
| Commit date | 2018-03-22 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG11–19 Beta 3 | 500000 |
— | 500000 |
How it works
jit_optimize_above_cost compares the finished plan’s estimated cost with a threshold to decide whether PostgreSQL may run expensive JIT optimization passes. The cost is the planner’s arbitrary estimate, not milliseconds.
The decision occurs at plan time and only matters when JIT is enabled and a provider is available. Generic prepared plans retain the decision made when the generic plan was generated.
A value of -1 disables this stage. jit_inline_above_cost and jit_optimize_above_cost are additional gates after jit_above_cost, so setting either below the base compilation threshold is not meaningful. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Do not lower jit_optimize_above_cost globally to chase a single CPU-heavy statement. Compilation latency is visible in short-query tails; test at statement or role scope and include JIT generation time in the result. |
| OLAP | For long CPU-bound queries, benchmark total elapsed time on both sides of jit_optimize_above_cost. Lowering the threshold is useful only when saved execution CPU consistently exceeds compilation overhead. |
| Small nodes | Keep the default or disable the stage with -1 when LLVM work competes with a small CPU budget. Estimated cost alone does not prove that JIT will pay back its startup cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG11–19 Beta 3 unmodified; OLAP: PG11–19 Beta 3 unmodified; CRIT: PG11–19 Beta 3 unmodified; TINY: PG11–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Reading the threshold as milliseconds rather than arbitrary planner cost units.
- Ignoring JIT generation, inlining, optimization, and emission time when benchmarking.
- Expecting a changed value to alter a generic plan that was already generated.
- Setting an advanced-stage threshold below jit_above_cost and expecting that stage to run by itself.
Related parameters
jit · jit_above_cost · jit_inline_above_cost · jit_expressions
References
45 - join_collapse_limit
Fact — official short description: “Sets the FROM-list size beyond which JOIN constructs are not flattened.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 8
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 8 |
— | 8 |
How it works
join_collapse_limit controls when explicit JOIN constructs, except FULL JOIN, are flattened into a reorderable FROM list. A value of 1 preserves the written explicit join order.
Flattening enlarges the set of join orders the planner can explore, improving opportunities at the cost of planning CPU and memory. Outer-join semantics still constrain legal reorderings.
The exposed item count interacts with from_collapse_limit and geqo_threshold. Using 1 as a manual join-order tool transfers responsibility to SQL authors and is not a general plan-stability guarantee. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep join_collapse_limit at its upstream default unless representative plans show a repeatable, workload-wide problem. Test a local override first and include planning latency as well as execution latency. |
| OLAP | Analytical SQL can make join_collapse_limit more visible because joins, cursors, or recursion are larger. Benchmark the full statement family and inspect estimates rather than copying a single successful value. |
| Small nodes | On a small host, avoid increasing planning search or memory pressure through join_collapse_limit without a measured benefit. Prefer query-local structure or a scoped role setting over a cluster-wide override. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating join_collapse_limit as an executor resource limit rather than a planning assumption or policy.
- Testing only one parameter set or one data distribution.
- Expecting an already cached plan to be rewritten automatically.
- Using a global override to hide stale statistics or fragile SQL structure.
Related parameters
from_collapse_limit · geqo_threshold · geqo · enable_hashjoin · enable_nestloop
References
46 - min_eager_agg_group_size
Fact — official short description: “Sets the minimum average group size required to consider applying eager aggregation.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 8
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG19 Beta 3 |
| Present in | PG19 Beta 3 |
| Removed in | No |
| Introduction commit | 8e11859102f9 — Implement Eager Aggregation |
| Commit date | 2025-10-08 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG19 Beta 3 | 8 |
— | 8 |
How it works
PostgreSQL describes min_eager_agg_group_size as follows: “Sets the minimum average group size required to consider applying eager aggregation.” It can be changed per session, which makes plan or behavior comparisons possible without changing every workload. The atlas measures it in PG19 Beta 3; boot_val is the compiled or initialized baseline, not proof of a running cluster’s effective setting.
This cost threshold represents the estimated average input rows per group needed before eager aggregation is considered worthwhile. A higher value demands more row reduction; a lower value explores more eager-aggregation paths but can spend planning and execution work on groups that barely shrink the join input.
Read it together with enable_eager_aggregate, enable_hashagg, enable_partitionwise_aggregate, work_mem. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Use a session-level experiment with EXPLAIN (ANALYZE, BUFFERS) and a representative parameter distribution. Keep the default unless eager aggregation consistently reduces rows and latency without plan instability. |
| OLAP | Test joins with meaningful pre-aggregation opportunities, stale and fresh statistics, and spill pressure. Compare total CPU, peak memory, intermediate rows, and parallel plans, not just one query’s elapsed time. |
| Small nodes | Leave planner switches and thresholds at their defaults until a repeatable regression is isolated. Fix cardinality statistics first; forcing a path globally can trade one improvement for many regressions. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG19 Beta 3 unmodified; OLAP: PG19 Beta 3 unmodified; CRIT: PG19 Beta 3 unmodified; TINY: PG19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating the measured boot_val for min_eager_agg_group_size as proof of the effective value on an initialized or managed cluster.
- Applying a change as though it were immediate while pg_settings reports user context.
- Changing this setting in isolation without checking the linked limits, observability, and rollback path.
- Depending on beta behavior in production without retesting the PostgreSQL 19 final release.
Related parameters
enable_eager_aggregate · enable_hashagg · enable_partitionwise_aggregate · work_mem · hash_mem_multiplier
References
47 - min_parallel_index_scan_size
Fact — official short description: “Sets the minimum amount of index data for a parallel scan.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 512 KiB (64 × 8kB)
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG10 |
| Present in | PG10–19 Beta 3 |
| Removed in | No |
| Introduction commit | 51ee6f3160d2 — Replace min_parallel_relation_size with two new GUCs. |
| Commit date | 2017-02-15 |
| Discussion | thread 1 · thread 2 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG10–19 Beta 3 | 64 |
8kB |
512 KiB (64 × 8kB) |
How it works
min_parallel_index_scan_size is a planner eligibility floor: parallel scan paths are not considered unless index pages estimated to be visited 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.
The index threshold also participates in deciding whether an index can be vacuumed in parallel. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | A higher min_parallel_index_scan_size can reduce parallel startup on short OLTP scans, but confirm that reports and maintenance do not regress. Pigsty’s OLTP/crit value is a policy bias, not a resource limit. |
| OLAP | Keep the upstream threshold unless small but expensive scans are wrongly excluded. Lowering min_parallel_index_scan_size can raise planning and worker overhead when many queries run concurrently. |
| Small nodes | 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 2MB |
different | 2MB |
| OLAP | Unmodified | — | — |
| CRIT | 2MB |
different | 2MB |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG10–19 Beta 3 = 2MB (dcs); OLAP: PG10–19 Beta 3 unmodified; CRIT: PG10–19 Beta 3 = 2MB (dcs); TINY: PG10–19 Beta 3 unmodified. Advice, pending human review — Editorial inference, pending maintainer review: The OLTP/crit value raises the index eligibility floor to reduce parallel tendency, while OLAP and tiny retain upstream behavior.
Common 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.
Related parameters
max_parallel_workers_per_gather · parallel_setup_cost · parallel_tuple_cost · max_parallel_workers · enable_indexscan
References
48 - min_parallel_relation_size
Fact — official short description: “Sets the minimum size of relations to be considered for parallel scan.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 8 MiB (1024 × 8kB)
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.6 |
| Present in | PG9.6 |
| Removed in | PG10 |
| Introduction commit | 75be66464cb1 — Invent min_parallel_relation_size GUC to replace a hard-wired constant. |
| Commit date | 2016-06-16 |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.6 | 1024 |
8kB |
8 MiB (1024 × 8kB) |
How it works
PostgreSQL describes min_parallel_relation_size as follows: “Sets the minimum size of relations to be considered for parallel scan.” It can be changed per session, which makes plan or behavior comparisons possible without changing every workload. The atlas measures it in PG9.6; boot_val is the compiled or initialized baseline, not proof of a running cluster’s effective setting.
PostgreSQL 9.6 used one relation-size threshold when deciding whether a parallel scan was worth considering. PostgreSQL 10 split the control into min_parallel_table_scan_size and min_parallel_index_scan_size, allowing heap and index access paths to have different break-even points.
Read it together with min_parallel_table_scan_size, min_parallel_index_scan_size, max_parallel_workers_per_gather, enable_parallel_append. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Do not add this retired name to a current OLTP configuration. Translate its intent to the documented successor, test the migration under connection and write concurrency, and remove stale automation that still emits it. |
| OLAP | For an upgrade or analytical estate, inventory every generated configuration before cutover. Map the old control to its successor and compare plans, throughput, WAL, or logging behavior rather than assuming the old numeric value is portable. |
| Small nodes | Delete the obsolete override after recording why it existed. On a small node, prefer the successor’s default until measurements justify a new value; an unknown startup parameter can otherwise stop the server. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG9.6; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.6 unmodified; OLAP: PG9.6 unmodified; CRIT: PG9.6 unmodified; TINY: PG9.6 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating the measured boot_val for min_parallel_relation_size as proof of the effective value on an initialized or managed cluster.
- Applying a change as though it were immediate while pg_settings reports user context.
- Changing this setting in isolation without checking the linked limits, observability, and rollback path.
- Copying the removed name into a modern postgresql.conf instead of migrating to its documented successor.
Related parameters
min_parallel_table_scan_size · min_parallel_index_scan_size · max_parallel_workers_per_gather · enable_parallel_append
References
49 - min_parallel_table_scan_size
Fact — official short description: “Sets the minimum amount of table data for a parallel scan.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 8 MiB (1024 × 8kB)
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG10 |
| Present in | PG10–19 Beta 3 |
| Removed in | No |
| Introduction commit | 51ee6f3160d2 — Replace min_parallel_relation_size with two new GUCs. |
| Commit date | 2017-02-15 |
| Discussion | thread 1 · thread 2 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG10–19 Beta 3 | 1024 |
8kB |
8 MiB (1024 × 8kB) |
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.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| 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. Pigsty’s OLTP/crit value is a policy bias, not a resource limit. |
| 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. |
| Small nodes | 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. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 32MB |
different | 32MB |
| OLAP | Unmodified | — | — |
| CRIT | 32MB |
different | 32MB |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG10–19 Beta 3 = 32MB (dcs); OLAP: PG10–19 Beta 3 unmodified; CRIT: PG10–19 Beta 3 = 32MB (dcs); TINY: PG10–19 Beta 3 unmodified. Advice, pending human review — Editorial inference, pending maintainer review: The OLTP/crit value raises the table eligibility floor to reduce parallel tendency, while OLAP and tiny retain upstream behavior.
Common 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.
Related parameters
max_parallel_workers_per_gather · parallel_setup_cost · parallel_tuple_cost · max_parallel_workers · enable_seqscan
References
50 - parallel_setup_cost
Fact — official short description: “Sets the planner’s estimate of the cost of starting up worker processes for parallel query.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 1000
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.6 |
| Present in | PG9.6–19 Beta 3 |
| Removed in | No |
| Introduction commit | 3bd909b22093 — Add a Gather executor node. |
| Commit date | 2015-09-30 |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.6–19 Beta 3 | 1000 |
— | 1000 |
How it works
parallel_setup_cost models the fixed overhead of launching parallel workers for a plan. It is one term in estimated path cost and does not allocate resources or change executor behavior directly.
Planner cost units are arbitrary and only their ratios matter. Scaling all cost constants together leaves path ordering unchanged; changing one alters the balance between I/O, row processing, operators, and parallel overhead.
The value is consulted when a plan is built. Statistics, row-count estimates, cache assumptions, tablespace overrides, and enabled plan methods can outweigh a small change in this constant. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Calibrate parallel_setup_cost only from a representative workload, not one plan. First correct stale statistics and compare EXPLAIN (ANALYZE, BUFFERS) estimates with reality; use role or tablespace scope where possible. |
| OLAP | Analytical workloads can justify a different CPU-versus-I/O balance, but change parallel_setup_cost together with the related cost model and validate the full scan/join/aggregate mix. |
| Small nodes | Keep the upstream value unless repeated evidence shows a systematic modeling error. On small systems, concurrency and cache residency often matter more than fine-grained changes to parallel_setup_cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 2000 |
different | 2000 |
| OLAP | Unmodified | — | — |
| CRIT | 2000 |
different | 2000 |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.6–19 Beta 3 = 2000 (dcs); OLAP: PG9.6–19 Beta 3 unmodified; CRIT: PG9.6–19 Beta 3 = 2000 (dcs); TINY: PG9.6–19 Beta 3 unmodified. Advice, pending human review — Editorial inference, pending maintainer review: Doubling the setup estimate in OLTP/crit is intended to reduce parallel-plan selection without disabling it; OLAP and tiny retain upstream behavior.
Common pitfalls
- Interpreting the value as elapsed time or a hard resource limit.
- Tuning it to repair one query and regressing the wider workload.
- Changing cost constants before correcting statistics and cardinality estimates.
- Forgetting that only relative values influence path choice.
Related parameters
parallel_tuple_cost · max_parallel_workers_per_gather · min_parallel_table_scan_size · max_parallel_workers
References
51 - parallel_tuple_cost
Fact — official short description: “Sets the planner’s estimate of the cost of passing each tuple (row) from worker to leader backend.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 0.1
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.6 |
| Present in | PG9.6–19 Beta 3 |
| Removed in | No |
| Introduction commit | 3bd909b22093 — Add a Gather executor node. |
| Commit date | 2015-09-30 |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.6–19 Beta 3 | 0.1 |
— | 0.1 |
How it works
parallel_tuple_cost models the per-row overhead of moving tuples from parallel workers to another process. It is one term in estimated path cost and does not allocate resources or change executor behavior directly.
Planner cost units are arbitrary and only their ratios matter. Scaling all cost constants together leaves path ordering unchanged; changing one alters the balance between I/O, row processing, operators, and parallel overhead.
The value is consulted when a plan is built. Statistics, row-count estimates, cache assumptions, tablespace overrides, and enabled plan methods can outweigh a small change in this constant. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Calibrate parallel_tuple_cost only from a representative workload, not one plan. First correct stale statistics and compare EXPLAIN (ANALYZE, BUFFERS) estimates with reality; use role or tablespace scope where possible. |
| OLAP | Analytical workloads can justify a different CPU-versus-I/O balance, but change parallel_tuple_cost together with the related cost model and validate the full scan/join/aggregate mix. |
| Small nodes | Keep the upstream value unless repeated evidence shows a systematic modeling error. On small systems, concurrency and cache residency often matter more than fine-grained changes to parallel_tuple_cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 0.2 |
different | 0.2 |
| OLAP | Unmodified | — | — |
| CRIT | 0.2 |
different | 0.2 |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.6–19 Beta 3 = 0.2 (dcs); OLAP: PG9.6–19 Beta 3 unmodified; CRIT: PG9.6–19 Beta 3 = 0.2 (dcs); TINY: PG9.6–19 Beta 3 unmodified. Advice, pending human review — Editorial inference, pending maintainer review: Doubling the tuple-transfer estimate in OLTP/crit is intended to reduce parallel-plan selection for tuple-heavy paths; OLAP and tiny retain upstream behavior.
Common pitfalls
- Interpreting the value as elapsed time or a hard resource limit.
- Tuning it to repair one query and regressing the wider workload.
- Changing cost constants before correcting statistics and cardinality estimates.
- Forgetting that only relative values influence path choice.
Related parameters
parallel_setup_cost · max_parallel_workers_per_gather · parallel_leader_participation · enable_gathermerge
References
52 - plan_cache_mode
Fact — official short description: “Controls the planner’s selection of custom or generic plan.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- auto
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG12 |
| Present in | PG12–19 Beta 3 |
| Removed in | No |
| Introduction commit | f7cb2842bf47 — Add plan_cache_mode setting |
| Commit date | 2018-07-16 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG12–19 Beta 3 | auto |
— | auto |
How it works
Prepared statements can use a custom plan built with current parameter values or a generic plan independent of those values. plan_cache_mode overrides PostgreSQL’s normal cost-based choice with auto, force_custom_plan, or force_generic_plan.
The setting is checked when a cached statement is executed, not when PREPARE is issued. A custom plan pays planning cost repeatedly but can adapt to skew; a generic plan saves planning work but can be poor for parameter-sensitive predicates.
PL/pgSQL and protocol-level prepared statements are both affected. Forcing a mode is diagnostic or workload-specific policy, not a cure for bad statistics or missing indexes. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep plan_cache_mode at its upstream default unless representative plans show a repeatable, workload-wide problem. Test a local override first and include planning latency as well as execution latency. |
| OLAP | Analytical SQL can make plan_cache_mode more visible because joins, cursors, or recursion are larger. Benchmark the full statement family and inspect estimates rather than copying a single successful value. |
| Small nodes | On a small host, avoid increasing planning search or memory pressure through plan_cache_mode without a measured benefit. Prefer query-local structure or a scoped role setting over a cluster-wide override. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG12–19 Beta 3 unmodified; OLAP: PG12–19 Beta 3 unmodified; CRIT: PG12–19 Beta 3 unmodified; TINY: PG12–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating plan_cache_mode as an executor resource limit rather than a planning assumption or policy.
- Testing only one parameter set or one data distribution.
- Expecting an already cached plan to be rewritten automatically.
- Using a global override to hide stale statistics or fragile SQL structure.
Related parameters
default_statistics_target · cursor_tuple_fraction · join_collapse_limit · compute_query_id · jit_above_cost
References
53 - random_page_cost
Fact — official short description: “Sets the planner’s estimate of the cost of a nonsequentially fetched disk page.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 4
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 4 |
— | 4 |
How it works
Planner cost units are arbitrary and meaningful mainly in relation to other cost constants. With seq_page_cost conventionally at 1.0, random_page_cost expresses the average penalty of random page access after accounting for expected caching and storage behavior.
Reducing the value relative to seq_page_cost favors index scans; increasing it makes such scans less attractive. Both values can also be overridden per tablespace, which is useful when a cluster spans storage tiers.
The official guidance treats these constants as workload-wide averages and warns against changing them from a few isolated experiments. Plan quality also depends on statistics, effective_cache_size, correlation, and query shape.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | On low-latency SSD with a high cache hit rate, 1.1 is a reasonable trial value, not a universal truth. Compare representative EXPLAIN (ANALYZE, BUFFERS) plans and tail latency before adopting it. |
| OLAP | Do not lower it merely because storage is SSD; analytical scans may still favor sequential access. Calibrate with the full scan-versus-index workload mix and consider tablespace-specific values. |
| Small nodes | If the entire database is usually cached, a value near seq_page_cost can be defensible. Avoid setting it below seq_page_cost and fix stale statistics before forcing index-heavy plans. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 1.1 |
different | 1.1 |
| OLAP | 1.1 |
different | 1.1 |
| CRIT | 1.1 |
different | 1.1 |
| TINY | 1.1 |
different | 1.1 |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 1.1 (dcs); OLAP: PG9.0–19 Beta 3 = 1.1 (dcs); CRIT: PG9.0–19 Beta 3 = 1.1 (dcs); TINY: PG9.0–19 Beta 3 = 1.1 (dcs). Advice, pending human review — Editorial hypothesis, pending maintainer review: 1.1 models SSD random access and cache-heavy deployments as much closer to sequential access.
Common pitfalls
- The number is a relative planner cost, not milliseconds or measured device latency.
- Lowering it to repair one query can regress the wider workload.
- Bad cardinality estimates can be mistaken for incorrect storage costs.
- A value below seq_page_cost is normally physically implausible.
- A global value can misrepresent mixed SSD, HDD, and network-attached tablespaces.
Related parameters
seq_page_cost · effective_cache_size · effective_io_concurrency · default_statistics_target · enable_indexscan · enable_bitmapscan
References
54 - recursive_worktable_factor
Fact — official short description: “Sets the planner’s estimate of the average size of a recursive query’s working table.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 10
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG15 |
| Present in | PG15–19 Beta 3 |
| Removed in | No |
| Introduction commit | 0bd7af082ace — Invent recursive_worktable_factor GUC to replace hard-wired constant. |
| Commit date | 2022-03-24 |
| Discussion | thread 1 |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG15–19 Beta 3 | 10 |
— | 10 |
How it works
recursive_worktable_factor estimates the average recursive working-table size as a multiple of the non-recursive seed term. The estimate feeds costs for joining the worktable to other relations.
It does not cap recursion, memory, rows, or iterations. A low-fan-out traversal can be modeled with a smaller value, while graph expansion with high fan-out may need a larger estimate.
The value is used during planning; actual recursive growth still depends on data and termination predicates. Misestimation can select an unsuitable join method inside the recursive term. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Keep recursive_worktable_factor at its upstream default unless representative plans show a repeatable, workload-wide problem. Test a local override first and include planning latency as well as execution latency. |
| OLAP | Analytical SQL can make recursive_worktable_factor more visible because joins, cursors, or recursion are larger. Benchmark the full statement family and inspect estimates rather than copying a single successful value. |
| Small nodes | On a small host, avoid increasing planning search or memory pressure through recursive_worktable_factor without a measured benefit. Prefer query-local structure or a scoped role setting over a cluster-wide override. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG15–19 Beta 3 unmodified; OLAP: PG15–19 Beta 3 unmodified; CRIT: PG15–19 Beta 3 unmodified; TINY: PG15–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Treating recursive_worktable_factor as an executor resource limit rather than a planning assumption or policy.
- Testing only one parameter set or one data distribution.
- Expecting an already cached plan to be rewritten automatically.
- Using a global override to hide stale statistics or fragile SQL structure.
Related parameters
work_mem · enable_nestloop · enable_hashjoin · default_statistics_target
References
55 - seq_page_cost
Fact — official short description: “Sets the planner’s estimate of the cost of a sequentially fetched disk page.”
Identity
Type,- Upstream pg_settings type
Context,- Settable by an ordinary user
Unit,- Raw unit
Range,- Raw limits in the last observed version
Enum values,- — for non-enum types
Category,- Upstream classification
Latest boot value,- 1
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 1 |
— | 1 |
How it works
seq_page_cost models a sequential page fetch and the conventional base of the planner’s arbitrary cost scale. It is one term in estimated path cost and does not allocate resources or change executor behavior directly.
Planner cost units are arbitrary and only their ratios matter. Scaling all cost constants together leaves path ordering unchanged; changing one alters the balance between I/O, row processing, operators, and parallel overhead.
The value is consulted when a plan is built. Statistics, row-count estimates, cache assumptions, tablespace overrides, and enabled plan methods can outweigh a small change in this constant. Its user context permits session- or transaction-local changes; newly performed or newly planned work sees the value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Calibrate seq_page_cost only from a representative workload, not one plan. First correct stale statistics and compare EXPLAIN (ANALYZE, BUFFERS) estimates with reality; use role or tablespace scope where possible. |
| OLAP | Analytical workloads can justify a different CPU-versus-I/O balance, but change seq_page_cost together with the related cost model and validate the full scan/join/aggregate mix. |
| Small nodes | Keep the upstream value unless repeated evidence shows a systematic modeling error. On small systems, concurrency and cache residency often matter more than fine-grained changes to seq_page_cost. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Interpreting the value as elapsed time or a hard resource limit.
- Tuning it to repair one query and regressing the wider workload.
- Changing cost constants before correcting statistics and cardinality estimates.
- Forgetting that only relative values influence path choice.
Related parameters
random_page_cost · cpu_tuple_cost · effective_cache_size · enable_seqscan · effective_io_concurrency