pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Luca Ferrari <fluca1978@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: how does PostgreSQL determine how many parallel processes to start
Date: Fri, 19 Feb 2021 10:43:17 +0100
Message-ID: <d292a6fca7fec8621420178618d34ee174ee2efe.camel@cybertec.at> (raw)
In-Reply-To: <CAKoxK+61MVdABb2eQ_VLfvRT0hEX12dOkx6Bz9orS5VQ--UvVQ@mail.gmail.com>
References: <CAKoxK+61MVdABb2eQ_VLfvRT0hEX12dOkx6Bz9orS5VQ--UvVQ@mail.gmail.com>

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






view thread (4+ messages)  latest in thread

Message-ID: <d292a6fca7fec8621420178618d34ee174ee2efe.camel@cybertec.at>
Permalink:  ../d292a6fca7fec8621420178618d34ee174ee2efe.camel@cybertec.at/
Also on:    postgresql.org/message-id/d292a6fca7fec8621420178618d34ee174ee2efe.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, fluca1978@gmail.com
  Subject: Re: how does PostgreSQL determine how many parallel processes to start
  In-Reply-To: <d292a6fca7fec8621420178618d34ee174ee2efe.camel@cybertec.at>
  References: <CAKoxK+61MVdABb2eQ_VLfvRT0hEX12dOkx6Bz9orS5VQ--UvVQ@mail.gmail.com> <d292a6fca7fec8621420178618d34ee174ee2efe.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox