Skip to main content

parallel_query_dsa

Short Description

Waiting for parallel query dynamic shared memory allocation lock.

Additional Information

During Parallel operations Dynamic Shared Areas of memory (DSA) are allocated. This wait is seen while waiting for the allocation lock.

How to reduce this wait

Parallel queries are excellent at scanning large amounts of data the quickly returning results. Run in isolation or in a considered manner they are a useful tool.

Do not allow concurrent parallel queries from many users to flood system CPU or IO resources.

Avoid spilling to disk. The shared hash table should if possible remain in memory. Adjust work_mem to ensure this happens where practical and be aware that the total memory allocated is work_mem * workers.

Adjust max_worker_process , max_parallel_workers and max_parallel_workers_per_gather to control response of your query and overall impact to the system.

PostgreSQL documentation - Parallel Query

PostgreSQL documentation - The Statistics Collector

EDB - Parallel Hash Joins in PostgreSQL Explained

Search online

If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.