Re: don't allocate HashAgg hash tables when running explain only

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Greg Stark <stark@mit.edu>, Alexey Bashtanov <bashtanov@imap.cc>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-11-20T06:31:22Z
Lists: pgsql-hackers
On Thu, Nov 19, 2020 at 08:47:51AM +0200, Heikki Linnakangas wrote:
> Yeah, I believe it's always been like that. Yeah, arguably it should be
> backpatched. I felt conservative and didn't backpatch, but feel free to do
> it if you think it should be.

+1 for a backpatch.  The difference in runtime for EXPLAIN in this case
is quite something.
--
Michael

Commits

  1. Skip allocating hash table in EXPLAIN-only mode.