Parallel query
Parallel execution with worker processes: Gather/Gather Merge, parallel scans, joins, aggregation and append, parallel safety markings and worker limits. Introduced in PostgreSQL 9.6.
Versions
- PostgreSQL 20 · worked-on · improved · major
- PostgreSQL 19 · worked-on · improved · moderate
- PostgreSQL 18 · shipped · improved · moderate · 4 commits · +273 / -40 lines
- PostgreSQL 17 · shipped · improved · moderate · 3 commits · +95 / -22 lines
- PostgreSQL 16 · shipped · improved · moderate · 1 commit · +1.1k / -28 lines
- PostgreSQL 15 · worked-on · improved · moderate
- PostgreSQL 12 · worked-on · improved · moderate
- PostgreSQL 11 · worked-on · improved · moderate
Threads
- Two fixes for parallel query cleanup: DSM detach order and a stray statement timeout
- Assert failure in parallel query due to SubPlan double visit for hash join
- bug: Gather rescan keeps the first scan's tuple bound in workers
- [PATCH] Add RetrieveInstrumentation hook for CustomScan providers
- New test rowtypes-alter might fail on unallowed parallel worker appearance
- PL/pgSQL: allow parallel query for assignment statements
- BUG #19803: Assertion "!parallel_aware || pathnode->path.parallel_safe" in create_append_path
- [PATCH 0/3] Improve UNION de-duplication
- Improving scalability of Parallel Bitmap Heap/Index Scan
- BUG #19766: Assert in shm_toc_insert: EXPLAIN ANALYZE of a SubPlan shared by Parallel Append children
- Report relation extension blockers within parallel lock groups
- Costing for parallel scans with few/single row produced in the outer side
- Set calcSumX2 = true in numeric_(poly_)deserialize
- Re: BUG #19684: Assertion in tuplesort_begin_heap() falsified by parallel plan with sort
- BUG #19684: Assertion in tuplesort_begin_heap() falsified by parallel plan with sort
- Race conditions during parallel worker (unclean) exit
- BUG #19557: Parallel leader stuckat ParallelFinish leaked InterruptHoldoffCount
- Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE
- array_agg(anyarray) silently produces corrupt results with parallel workers when inputs mix NULL and non-NULL array elements
- Fix Heap Blocks accumulation for Parallel Bitmap Heap Scan
- scale parallel_tuple_cost by tuple width
- V18 change on EXPLAIN ANALYZE
- Tighten asserts on ParallelWorkerNumber a little bit
- Consider low startup cost in add_partial_path
- Disable parallel query by default
- Can we rely on the ordering of paths in pathlist?
- Performance issues with parallelism and LIMIT
- Parallel query: Use TopTransactionContext for ReinitializeParallelDSM()
- BUG #19336: TRAP: failed Assert("!IsTransactionOrTransactionBlock()")
- BUG #19119: Linux 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP aarch64 aarch64 aarch64 GNU/Linux
- BUG #19094: select statement on postgres 17 vs postgres 18 is returning different/duplicate results
- simple patch for discussion
- DSA overflow in hash join
- [PATCH] Allow parallelism for plpgsql return expression after commit 556f7b7
- Buffer overflow in SerializeLibraryState() found by Address Sanitizer
- Question Regarding Merge Append and Parallel Execution of Index Scans on Partitioned Table
- Current master hangs under the debugger after Parallel Seq Scan (Linux, MacOS)
- a pool for parallel worker
- BUG #18843: ERROR: Input of anonymous composite types is not implemented in array_agg function
- Parallel safety docs for CTEs
- Error from array_agg when table has many rows
- Further _bt_first simplifications for parallel index scans
- Commit 5a2fed911a broke parallel query
- Improve consistency checks in tbm_prepare_shared_iterate
- Precheck to consider path costs for partial paths
- Wrong results with right-semi-joins
- single_copy not needed in GatherPath
- Assert failure on running a completed portal again
- RFC/PoC: GUC option to enable tuple queue autoflush for parallel workers
- BUG #18725: "set role" requires "grant connect on database"
- Leader backend hang on IPC/ParallelFinish when LWLock held at parallel query start
- can_partial_agg use root->processed_groupClause instead of parse->groupClause
- BUG #18545: \dt breaks transaction, calling error when executed in SET SESSION AUTHORIZATION
- Worker parallelism on EXECUTE with a non-zero fetch count
- Use MAX_PARALLEL_WORKER_LIMIT consistently in guc_tables.c
- pgsql: Don't enter parallel mode when holding interrupts.
- Rethinking parallel-scan relation identity checks
- BUG #18600: Getting wait_type_event as IPC:BTreePage for count queries
- BUG #18588: Cannot force/let database use parallel execution in simple case.
- BUG #18586: Process (and transaction) is stuck in IPC when the DB is under high load
- Enabling parallel execution for cursors
- is_superuser versus set_config_option's parallelism check
- Typo in 15.3.4
- Redundant code in create_gather_merge_path
- Possible incorrect row estimation for Gather paths
- Should consider materializing the cheapest inner path in consider_parallel_nestloop()
- BUG #18334: Segfault when running a query with parallel workers
- [PATCH] plpython function causes server panic
- Parallel Aggregates for string_agg and array_agg
- Query stuck with wait event IPC / ParallelFinish
- BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
- An improvement on parallel DISTINCT
- BUG #18330: The query planner chooses the wrong plan when using the parallel aggregation function
- Allow parallel plan for referential integrity checks?
- Apply the "LIMIT 1" optimization to partial DISTINCT
- Why do parallel scans require syncscans (but not really)?
- Postgres db Update to Version 15
- BUG #18236: Backend processing a parallel query terminates badly when postmaster killed with SIGKILL
- catalog access with reset GUCs during parallel worker startup
- confusion about Re: Write operations in parallel mode's update part.
- Parallel query behaving different with custom GUCs
- max_parallel_workers question
- Should Explain show Parallel Hash node’s total rows?
- Buildfarm failures on chipmunk
- Assert while autovacuum was executing
- BUG #18005: PSQL Process hangs in parallel mode / complement information
- removing limitations from bitmap index scan
- Shouldn't cost_append() also scale the partial path's cost?
- Server crash with parallel workers with Postgres 14.7
- Can we do something to help stop users mistakenly using force_parallel_mode?
- Consider parallel for lateral subqueries with limit
- Problem about postponing gathering partial paths for topmost scan/join rel
- BUG #17519: I get a segmentation fault when querying in parallel.
- Fix BUG #17335: Duplicate result rows in Gather node
- BUG #17335: Duplicate result rows in Gather node when "Suppress Append ... that have a single child" applied
- parallel distinct union and aggregate support patch
- Gather performance analysis
- Fix erroneous parallel execution when modifying CTE is present in rewritten query
- Inaccurate usage of "which" instead of "that" in parallel.sgml
- Parallel scan with SubTransGetTopmostTransaction assert coredump
- Allow parallel DISTINCT
- BUG #17092: SELECT using LIMIT clause without ORDER BY fails when parallel query is on
- intermittent failures in Cygwin from select_parallel tests
- Relaxing the sub-transaction restriction in parallel query
- Segmentation fault when calling BlessTupleDesc in a C function in parallel on PostgreSQL-(12.6, 12.7, 13.2, 13.3)
- PG 13.2 Parallel scan with SubTransGetTopmostTransaction assert coredump
- Buffers from parallel workers not accumulated to upper nodes with gather merge
- Executing inet_server_addr/port() in parallel workers
- Parallel bitmap index scan
- Re: Consider parallel for lateral subqueries with limit
- Parallel plans and "union all" subquery
- BUG #16627: union all with partioned table yields random aggregate results
- Does TupleQueueReaderNext() really need to copy its result?
- Fix for parallel BTree initialization bug
- Parallel worker hangs while handling errors.
- Parallel query hangs after a smart shutdown is issued
- Inconsistent behavior of smart shutdown handling for queries with and without parallel workers
- Parallel Seq Scan vs kernel read ahead
- Mark btree_gist functions as PARALLEL SAFE
- Volatile Functions in Parallel Plans
- Parallel grouping sets
- EXPLAIN: Non-parallel ancestor plan nodes exclude parallel worker instrumentation
- BUG #16396: Parallel Union queries seem to treat NULL values differently
- Parallel leader process info in EXPLAIN
- Expose lock group leader pid in pg_stat_activity
- Duplicate Workers entries in some EXPLAIN plans
- force_parallel_mode = regress has a blind spot
- SegFault on 9.6.14
- BUG #15726: parallel queries failed ERROR: invalid name syntax CONTEXT: parallel worker
- Unstable select_parallel regression output in 12rc1
- Parallel Append subplan order instability on aye-aye
- How to estimate the shared memory size required for parallel scan?
- max_parallel_workers can't actually be set?
- BUG #15869: Custom aggregation returns null when parallelized
- Confusing comment for function ExecParallelEstimate
- BUG #15821: Parallel Workers with functions and auto_explain: ERROR: could not find key 3 in shm TOC
- Typo in execParallel.c
- Parallel Foreign Scans - need advice
- Parallel query execution introduces performance regressions
- parallel query hangs - impossible to cancel
- Parallel query vs smart shutdown and Postmaster death
- BUG #15691: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
- Oddity with parallel safety test for scan/join target in grouping_planner
- Unneeded parallel safety tests in grouping_planner
- Occasional 9.6.10 PMChildFlags fatal error, possibly due to >2 parallel gathers
- SerializeParamList vs machines with strict alignment
- BUG #15350: Getting invalid cache ID: 11 Errors
- BUG #15324: Non-deterministic behaviour from parallelised sub-query
- Funny hang on PostgreSQL 10 during parallel index scan on slave
- Bug: ERROR: invalid cache ID: 42 CONTEXT: parallel worker
- Explain buffers wrong counter with parallel plans
- Parallel Append implementation
- BUG #15290: Stuck Parallel Index Scan query
- pgsql: Fix parallel index and index-only scans to fall back to serial.
- EXPLAIN of Parallel Append
- server crashed with TRAP: FailedAssertion("!(!parallel_aware || pathnode->path.parallel_safe)"
- Cannot create an aggregate function with variadic parameters and enabled for parallel execution
- [sqlsmith] Failed assertion in create_gather_path
- Append's first_partial_plan
- es_query_dsa is broken
- Unstable number of workers in select_parallel test on spurfowl
- why not parallel seq scan for slow functions
- [POC] Faster processing at Gather node
- parallel append vs. simple UNION ALL
- planner failure with ProjectSet + aggregation + parallel query
- select_parallel test failure: gather sometimes losing tuples (maybe during rescans)?
- server crash in nodeAppend.c
- Cancelling parallel query leads to segfault
- PATCH: enabling parallel execution for cursors explicitly (experimental)
- Query running for very long time (server hanged) with parallel append
- ERROR: could not map dynamic shared memory segment
- ERROR: too many dynamic shared memory segments
- Wait for parallel workers to attach
- PARALLEL in old syntax for CREATE AGGREGATE
- Multi-level hierarchy with parallel append can lead to an extra subplan.
- Parallel append plan instability/randomness
- explain analyze output with parallel workers - question about meaning of information for explain.depesz.com
- Observations in Parallel Append
- Shouldn't execParallel.c null-terminate query_string in the parallel DSM?
- Missed parallelism option in plpgsql?
- access/parallel.h lacks PGDLLIMPORT
- Top-N sorts verses parallelism
- [sqlsmith] Parallel worker executor crash on master
- Parallel Index Scan vs BTP_DELETED and BTP_HALF_DEAD
- BUG #14960: Queries stuck on BtreePage lock on parallel index scan
- BUG in 10.1 - dsa_area could not attach to a segment that has been freed
- pgsql: Support Parallel Append plan nodes.
- A GUC to prevent leader processes from running subplans?
- GatherMerge misses to push target list
- Segfault 11 on PG10 with max_parallel_workers_per_gather>3
- Parallel Plans and Cost of non-filter functions
- Parallel worker error
- Parallel Bitmap Heap Scans segfaults due to (tbm->dsa==NULL) on PostgreSQL 10
- Re: Parallel Append implementation
- Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE
- valgrind vs. shared typmod registry
- pgsql: Add support for coordinating record typmods among parallel worke
- POC: Sharing record typmods between backends
- Assorted leaks and weirdness in parallel execution
- [postgresql 10 beta3] unrecognized node type: 90
- Write operations in parallel mode
- Atomics for heap_parallelscan_nextpage()
- pgsql: Avoid GatherMerge crash when there are no workers.
- signal 11 segfaults with parallel workers
- Request more documentation for incompatibility of parallelism and plpgsql exec_run_select
- 9.6.3 - Backend Crash - Parallel Worker Prepared Statements
- No title
- Re: modeling parallel contention (was: Parallel Append implementation)
- pgsql: Add a Gather executor node.
- Parallel Aggregation support for aggregate functions that use transitions not implemented for array_agg
- TPC-H Q20 from 1 hour to 19 hours!
- partial aggregation with internal state type
- COPY (query) TO ... doesn't allow parallelism
- Increasing parallel workers at runtime
- Enabling parallelism for queries coming from SQL or other PL functions
- Combining Aggregates