pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Philip Semanchuk <philip@americanefficient.com>
To: Thorsten Schöning <tschoening@am-soft.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: How does Postgres decide if to use additional workers?
Date: Wed, 10 Feb 2021 09:22:58 -0500
Message-ID: <C8DDB51D-A655-4B20-B3CA-82B2EA759F96@americanefficient.com> (raw)
In-Reply-To: <767344739.20210209165202@am-soft.de>
References: <767344739.20210209165202@am-soft.de>



> On Feb 9, 2021, at 10:52 AM, Thorsten Schöning <tschoening@am-soft.de> wrote:
> 
> So, based on which facts does Postgres decide if to use aadditional
> workers or not? Can I see those decisions explained somewhere? I don't
> see anything in the query plan. Thanks!

Hi Thorsten,
This is an interesting topic for me too. here’s a formula for the max number of workers that Postgres will consider for a table. Of course, most queries use more than just one table, and I don’t yet understand how Postgres handles the situation where the formula suggests multiple workers for some tables and a single worker for others.

There was some conversation about this on the performance mailing list in June. Here’s a link to the message that contains the formula; there’s more items of interest in the whole thread:
https://www.postgresql.org/message-id/89423FD3-0F13-447D-8D9E-EB1722150F94%40americanefficient.com

Hope this helps
Philip 




view thread (3+ messages)

Message-ID: <C8DDB51D-A655-4B20-B3CA-82B2EA759F96@americanefficient.com>
Permalink:  ../C8DDB51D-A655-4B20-B3CA-82B2EA759F96@americanefficient.com/
Also on:    postgresql.org/message-id/C8DDB51D-A655-4B20-B3CA-82B2EA759F96@americanefficient.com

 · 

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: philip@americanefficient.com, tschoening@am-soft.de
  Subject: Re: How does Postgres decide if to use additional workers?
  In-Reply-To: <C8DDB51D-A655-4B20-B3CA-82B2EA759F96@americanefficient.com>
  References: <767344739.20210209165202@am-soft.de> <C8DDB51D-A655-4B20-B3CA-82B2EA759F96@americanefficient.com>

* 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