pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: jit: Re-allow JIT compilation of execGrouping.c hashtable compar
Date: Sun, 29 Sep 2019 23:28:17 +0000
Message-ID: <E1iEibx-0005Xn-5q@gemulon.postgresql.org> (raw)

jit: Re-allow JIT compilation of execGrouping.c hashtable comparisons.

In the course of 5567d12ce03, 356687bd8 and 317ffdfeaac, I changed
BuildTupleHashTable[Ext]'s call to ExecBuildGroupingEqual to not pass
in the parent node, but NULL. Which in turn prevents the tuple
equality comparator from being JIT compiled.  While that fixes
bug #15486, it is not actually necessary after all of the above commits,
as we don't re-build the comparator when using the new
BuildTupleHashTableExt() interface (as the content of the hashtable
are reset, but the TupleHashTable itself is not).

Therefore re-allow jit compilation for callers that use
BuildTupleHashTableExt with a separate context for "metadata" and
content.

As in the previous commit, there's ongoing work to make this easier to
test to prevent such regressions in the future, but that
infrastructure is not going to be backpatchable.

The performance impact of not JIT compiling hashtable equality
comparators can be substantial e.g. for aggregation queries that
aggregate a lot of input rows to few output rows (when there are a lot
of output groups, there will be fewer comparisons).

Author: Andres Freund
Discussion: https://postgr.es/m/20190927072053.njf6prdl3vb7y7qb@alap3.anarazel.de
Backpatch: 11, just as 5567d12ce03

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ac88807f9b227ddcd92b8be9a053094837c1b99a

Modified Files
--------------
src/backend/executor/execGrouping.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1iEibx-0005Xn-5q@gemulon.postgresql.org>
Permalink:  ../E1iEibx-0005Xn-5q@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1iEibx-0005Xn-5q@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: andres@anarazel.de
  Subject: Re: pgsql: jit: Re-allow JIT compilation of execGrouping.c hashtable compar
  In-Reply-To: <E1iEibx-0005Xn-5q@gemulon.postgresql.org>
  References: <E1iEibx-0005Xn-5q@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