Re: how does PostgreSQL determine how many parallel processes to start

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: how does PostgreSQL determine how many parallel processes to start
Date: 2021-02-19 09:43:17
Message-ID: d292a6fca7fec8621420178618d34ee174ee2efe.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2021-02-19 at 10:38 +0100, Luca Ferrari wrote:
> I know that parallel processes can be limited by
> max_parallel_workers_per_gather and max_parallel_workers, as well as
> the condition to consider a parallel plan is min_table_scan_size (and
> index). But I would like to understand, once a table has been
> considered for a parallel plan, and there is room for other workers,
> how will PostgreSQL decide to start another process?

During planning, it will generate parallel and non-parallel plans
and take the one it estimates to be cheapest.

At execution time, PostgreSQL will use as many of the planned workers
as are currently available (max_parallel_workers).

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2021-02-19 10:21:51 Re: how does PostgreSQL determine how many parallel processes to start
Previous Message Luca Ferrari 2021-02-19 09:38:12 how does PostgreSQL determine how many parallel processes to start