pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Report sort phase progress in parallel btree build
Date: Fri, 11 Jun 2021 23:08:29 +0000
Message-ID: <E1lrqGL-0000W4-LZ@gemulon.postgresql.org> (raw)

Report sort phase progress in parallel btree build

We were already reporting it, but only after the parallel workers were
finished, which is visibly much later than what happens in a serial
build.

With this change we report it when the leader starts its own sort phase
when participating in the build (the normal case).  Now this might
happen a little later than when the workers start their sorting phases,
but a) communicating the actual phase start from workers is likely to be
a hassle, and b) the sort phase start is pretty fuzzy anyway, since
sorting per se is actually initiated by tuplesort.c internally earlier
than tuplesort_performsort() is called.

Backpatch to pg12, where the progress reporting code for CREATE INDEX
went in.

Reported-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
Author: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Greg Nancarrow <gregn4422@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/1128176d-1eee-55d4-37ca-e63644422adb

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0c7efd975754b41bccabbb55902b6d79bd350515

Modified Files
--------------
src/backend/access/nbtree/nbtsort.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)



view thread (3+ messages)

Message-ID: <E1lrqGL-0000W4-LZ@gemulon.postgresql.org>
Permalink:  ../E1lrqGL-0000W4-LZ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lrqGL-0000W4-LZ@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Report sort phase progress in parallel btree build
  In-Reply-To: <E1lrqGL-0000W4-LZ@gemulon.postgresql.org>
  References: <E1lrqGL-0000W4-LZ@gemulon.postgresql.org>

* 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