Skip setting up shared instrumentation for Hash node if not needed.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 05d0f13f0701d84e4e6784da336aabcc2dfc8ade
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-02-05T03:14:07Z
Releases: 11.0
Skip setting up shared instrumentation for Hash node if not needed.

We don't need to set up the shared space for hash join instrumentation data
if instrumentation hasn't been requested.  Let's follow the example of the
similar Sort node code and save a few cycles by skipping that when we can.

This reverts commit d59ff4ab3 and instead allows us to use the safer choice
of passing noError = false to shm_toc_lookup in ExecHashInitializeWorker,
since if we reach that call there should be a TOC entry to be found.

Thomas Munro

Discussion: https://postgr.es/m/E1ehkoZ-0005uW-43%40gemulon.postgresql.org

Files

PathChange+/−
src/backend/executor/nodeHash.c modified +17 −6

Discussion

Cited messages not in the archive: E1ehkoZ-0005uW-43@gemulon.postgresql.org