pgsql: Make EXPLAIN report maximum hashtable usage across multiple resc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make EXPLAIN report maximum hashtable usage across multiple resc
Date: 2020-04-11 16:39:33
Message-ID: E1jNJAL-0000Cb-Ip@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make EXPLAIN report maximum hashtable usage across multiple rescans.

Before discarding the old hash table in ExecReScanHashJoin, capture
its statistics, ensuring that we report the maximum hashtable size
across repeated rescans of the hash input relation. We can repurpose
the existing code for reporting hashtable size in parallel workers
to help with this, making the patch pretty small. This also ensures
that if rescans happen within parallel workers, we get the correct
maximums across all instances.

Konstantin Knizhnik and Tom Lane, per diagnosis by Thomas Munro
of a trouble report from Alvaro Herrera.

Discussion: https://postgr.es/m/20200323165059.GA24950@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/969f9d0b4ba574bb8df65683dbf7a09c030f3e67

Modified Files
--------------
src/backend/commands/explain.c | 46 +++++++++++------------------
src/backend/executor/nodeHash.c | 58 ++++++++++++++++++++++++++++---------
src/backend/executor/nodeHashjoin.c | 10 ++++++-
src/include/executor/nodeHash.h | 4 +--
src/include/nodes/execnodes.h | 18 ++++++++++--
5 files changed, 87 insertions(+), 49 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2020-04-11 17:35:41 pgsql: Optimize RelationFindReplTupleSeq() for CLOBBER_CACHE_ALWAYS.
Previous Message Julien Rouhaud 2020-04-11 13:38:18 Re: pgsql: Support FETCH FIRST WITH TIES