pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Adjust EXPLAIN output for parallel Result Cache plans
Date: Fri, 30 Apr 2021 02:47:04 +0000
Message-ID: <E1lcJBI-0002Uy-5B@gemulon.postgresql.org> (raw)

Adjust EXPLAIN output for parallel Result Cache plans

Here we adjust the EXPLAIN ANALYZE output for Result Cache so that we
don't show any Result Cache stats for parallel workers who don't
contribute anything to Result Cache plan nodes.

I originally had ideas that workers who don't help could still have their
Result Cache stats displayed.  The idea with that was so that I could
write some parallel Result Cache regression tests that show the EXPLAIN
ANALYZE output.  However, I realized a little too late that such tests
would just not be possible to have run in a stable way on the buildfarm.

With that knowledge, before 9eacee2e6 went in, I had removed all of the
tests that were showing the EXPLAIN ANALYZE output of a parallel Result
Cache plan, however, I forgot to put back the code that adjusts the
EXPLAIN output to hide the Result Cache stats for parallel workers who
were not fast enough to help out before query execution was over. All
other nodes behave this way and so should Result Cache.

Additionally, with this change, it now seems safe enough to remove the SET
force_parallel_mode = off that I had added to the regression tests.

Also, perform some cleanup in the partition_prune tests. I had adjusted
the explain_parallel_append() function to sanitize the Result Cache
EXPLAIN ANALYZE output.  However, since I didn't actually include any
parallel Result Cache tests that show their EXPLAIN ANALYZE output, that
code does nothing and can be removed.

In passing, move the setting of memPeakKb into the scope where it's used.

Reported-by: Amit Khandekar
Author: David Rowley, Amit Khandekar
Discussion: https://postgr.es/m/CAJ3gD9d8SkfY95GpM1zmsOtX2-Ogx5q-WLsf8f0ykEb0hCRK3w@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3c80e96dffd4df7f66fffa5f265cbd87becb7ef5

Modified Files
--------------
src/backend/commands/explain.c                | 25 ++++++++++++++++---------
src/test/regress/expected/partition_prune.out |  3 ---
src/test/regress/expected/resultcache.out     |  4 ----
src/test/regress/sql/partition_prune.sql      |  3 ---
src/test/regress/sql/resultcache.sql          |  5 +----
5 files changed, 17 insertions(+), 23 deletions(-)



Message-ID: <E1lcJBI-0002Uy-5B@gemulon.postgresql.org>
Permalink:  ../E1lcJBI-0002Uy-5B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lcJBI-0002Uy-5B@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: drowley@postgresql.org
  Subject: Re: pgsql: Adjust EXPLAIN output for parallel Result Cache plans
  In-Reply-To: <E1lcJBI-0002Uy-5B@gemulon.postgresql.org>
  References: <E1lcJBI-0002Uy-5B@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