Re: subplan resets wrong hashtable

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2020-02-10T04:05:08Z
Lists: pgsql-hackers
On Sun, Feb 09, 2020 at 08:01:26PM -0800, Andres Freund wrote:
> Ugh, that indeed looks wrong. Did you check whether it can actively
> cause wrong query results? If so, did you do theoretically, or got to a
> query returning wrong results?

No, I only noticed while reading code.

I tried briefly to find a plan that looked like what I thought might be broken,
but haven't found anything close.

Justin



Commits

  1. Correctly re-use hash tables in buildSubPlanHash().

  2. Reset, not recreate, execGrouping.c style hashtables.