pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow parallel create index to accumulate buffer usage stats.
Date: Thu, 09 Apr 2020 04:43:40 +0000
Message-ID: <E1jMP2S-0004b8-2m@gemulon.postgresql.org> (raw)

Allow parallel create index to accumulate buffer usage stats.

Currently, we don't account for buffer usage incurred by parallel workers
for parallel create index.  This commit allows each worker to record the
buffer usage stats and leader backend to accumulate that stats at the
end of the operation.  This will allow pg_stat_statements to display
correct buffer usage stats for (parallel) create index command.

Reported-by: Julien Rouhaud
Author: Sawada Masahiko
Reviewed-by: Dilip Kumar, Julien Rouhaud and Amit Kapila
Backpatch-through: 11, where this was introduced
Discussion: https://postgr.es/m/20200328151721.GB12854@nol

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f179e9f01b65dd880b204599187ffff29ecba91e

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



view thread (3+ messages)  latest in thread

Message-ID: <E1jMP2S-0004b8-2m@gemulon.postgresql.org>
Permalink:  ../E1jMP2S-0004b8-2m@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jMP2S-0004b8-2m@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: akapila@postgresql.org
  Subject: Re: pgsql: Allow parallel create index to accumulate buffer usage stats.
  In-Reply-To: <E1jMP2S-0004b8-2m@gemulon.postgresql.org>
  References: <E1jMP2S-0004b8-2m@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