pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Do execGrouping.c via expression eval machinery.
6+ messages / 1 participants
[nested] [flat]
Commits from this thread:
2018-02-21 29d432e477 Blindly attempt to adapt sepgsql regression tests.
* pgsql: Do execGrouping.c via expression eval machinery.
@ 2018-02-16 05:58 Andres Freund <andres@anarazel.de>
2018-02-16 06:14 ` Re: pgsql: Do execGrouping.c via expression eval machinery. Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 6+ messages in thread
From: Andres Freund @ 2018-02-16 05:58 UTC (permalink / raw)
To: pgsql-committers
Do execGrouping.c via expression eval machinery.
This has a performance benefit on own, although not hugely so. The
primary benefit is that it will allow for to JIT tuple deforming and
comparator invocations.
Author: Andres Freund
Discussion: https://postgr.es/m/20171129080934.amqqkke2zjtekd4t@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/773aec7aa98abd38d6d9435913bb8e14e392c274
Modified Files
--------------
src/backend/executor/execExpr.c | 118 +++++++++++++++
src/backend/executor/execExprInterp.c | 29 ++++
src/backend/executor/execGrouping.c | 236 +++++++-----------------------
src/backend/executor/nodeAgg.c | 143 +++++++++++-------
src/backend/executor/nodeGroup.c | 24 +--
src/backend/executor/nodeRecursiveunion.c | 5 +-
src/backend/executor/nodeSetOp.c | 48 +++---
src/backend/executor/nodeSubplan.c | 81 +++++++++-
src/backend/executor/nodeUnique.c | 31 ++--
src/backend/executor/nodeWindowAgg.c | 38 +++--
src/backend/utils/adt/orderedsetaggs.c | 56 +++----
src/include/executor/execExpr.h | 1 +
src/include/executor/executor.h | 28 ++--
src/include/executor/nodeAgg.h | 12 +-
src/include/nodes/execnodes.h | 14 +-
15 files changed, 498 insertions(+), 366 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Do execGrouping.c via expression eval machinery.
2018-02-16 05:58 pgsql: Do execGrouping.c via expression eval machinery. Andres Freund <andres@anarazel.de>
@ 2018-02-16 06:14 ` Andres Freund <andres@anarazel.de>
2018-02-16 06:47 ` Re: pgsql: Do execGrouping.c via expression eval machinery. Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 6+ messages in thread
From: Andres Freund @ 2018-02-16 06:14 UTC (permalink / raw)
To: pgsql-committers
On 2018-02-16 05:58:09 +0000, Andres Freund wrote:
> Do execGrouping.c via expression eval machinery.
>
> This has a performance benefit on own, although not hugely so. The
> primary benefit is that it will allow for to JIT tuple deforming and
> comparator invocations.
>
> Author: Andres Freund
> Discussion: https://postgr.es/m/20171129080934.amqqkke2zjtekd4t@alap3.anarazel.de
Triggered a failure on termite:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=termite&dt=2018-02-16%2006%3A00%3A06
investigating. If I can't figure this out by tomorrow PST morning, I'll
revert.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Do execGrouping.c via expression eval machinery.
2018-02-16 05:58 pgsql: Do execGrouping.c via expression eval machinery. Andres Freund <andres@anarazel.de>
2018-02-16 06:14 ` Re: pgsql: Do execGrouping.c via expression eval machinery. Andres Freund <andres@anarazel.de>
@ 2018-02-16 06:47 ` Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 6+ messages in thread
From: Andres Freund @ 2018-02-16 06:47 UTC (permalink / raw)
To: pgsql-committers
On 2018-02-15 22:14:30 -0800, Andres Freund wrote:
> On 2018-02-16 05:58:09 +0000, Andres Freund wrote:
> > Do execGrouping.c via expression eval machinery.
> >
> > This has a performance benefit on own, although not hugely so. The
> > primary benefit is that it will allow for to JIT tuple deforming and
> > comparator invocations.
> >
> > Author: Andres Freund
> > Discussion: https://postgr.es/m/20171129080934.amqqkke2zjtekd4t@alap3.anarazel.de
>
> Triggered a failure on termite:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=termite&dt=2018-02-16%2006%3A00%3A06
> investigating. If I can't figure this out by tomorrow PST morning, I'll
> revert.
I've analyzed the problem - the cross type case isn't quite right
(i.e. the FindTupleHashEntry call in nodeSubplan.c). Unfortunately we do
not exercise that code in a meaningful manner on a 64 bit system, as
int4 vs int8 is nearly invisible there... Reverting as writing a fix
and developing appropriate coverage will take a couple hours.
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Do execGrouping.c via expression eval machinery, take two.
@ 2018-02-16 22:48 Andres Freund <andres@anarazel.de>
2018-02-17 00:03 ` Re: pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 6+ messages in thread
From: Andres Freund @ 2018-02-16 22:48 UTC (permalink / raw)
To: pgsql-committers
Do execGrouping.c via expression eval machinery, take two.
This has a performance benefit on own, although not hugely so. The
primary benefit is that it will allow for to JIT tuple deforming and
comparator invocations.
Large parts of this were previously committed (773aec7aa), but the
commit contained an omission around cross-type comparisons and was
thus reverted.
Author: Andres Freund
Discussion: https://postgr.es/m/20171129080934.amqqkke2zjtekd4t@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bf6c614a2f2c58312b3be34a47e7fb7362e07bcb
Modified Files
--------------
src/backend/executor/execExpr.c | 143 +++++++++++++++++
src/backend/executor/execExprInterp.c | 29 ++++
src/backend/executor/execGrouping.c | 249 +++++++-----------------------
src/backend/executor/nodeAgg.c | 145 ++++++++++-------
src/backend/executor/nodeGroup.c | 24 +--
src/backend/executor/nodeRecursiveunion.c | 11 +-
src/backend/executor/nodeSetOp.c | 54 +++----
src/backend/executor/nodeSubplan.c | 110 +++++++++++--
src/backend/executor/nodeUnique.c | 31 ++--
src/backend/executor/nodeWindowAgg.c | 38 +++--
src/backend/utils/adt/orderedsetaggs.c | 56 +++----
src/include/executor/execExpr.h | 1 +
src/include/executor/executor.h | 34 ++--
src/include/executor/nodeAgg.h | 14 +-
src/include/nodes/execnodes.h | 27 ++--
15 files changed, 566 insertions(+), 400 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Do execGrouping.c via expression eval machinery, take two.
2018-02-16 22:48 pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
@ 2018-02-17 00:03 ` Andres Freund <andres@anarazel.de>
2018-02-21 05:26 ` Re: pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 6+ messages in thread
From: Andres Freund @ 2018-02-17 00:03 UTC (permalink / raw)
To: pgsql-committers@postgresql.org, pgsql-hackers@postgresql.org, Robert Haas <robertmhaas@gmail.com>; Kohei KaiGai <kaigai@kaigai.gr.jp>
Hi,
On 2018-02-16 22:48:39 +0000, Andres Freund wrote:
> Do execGrouping.c via expression eval machinery, take two.
>
> This has a performance benefit on own, although not hugely so. The
> primary benefit is that it will allow for to JIT tuple deforming and
> comparator invocations.
>
> Large parts of this were previously committed (773aec7aa), but the
> commit contained an omission around cross-type comparisons and was
> thus reverted.
>
> Author: Andres Freund
> Discussion: https://postgr.es/m/20171129080934.amqqkke2zjtekd4t@alap3.anarazel.de
This triggered a failure on rhinoceros, in the sepgsql test:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&dt=2018-02-16%2023%3A45%3A02
The relevant diff is:
+ LOG: SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=system_u:object_r:sepgsql_proc_exec_t:s0 tclass=db_procedure name="pg_catalog.int4eq(integer,integer)"
and that's because we now invoke the function access hook for grouping
equal, which we previously didn't.
I personally think the new behaviour makes more sense, but if somebody
wants to argue differently? The only argument against I can see is that
there's some other cases where also don't yet invoke it, but that seems
weak.
I never fully grasped the exact use-case for the function execute hook
is, so maybe Kaigai and/or Robert could comment?
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgsql: Do execGrouping.c via expression eval machinery, take two.
2018-02-16 22:48 pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
2018-02-17 00:03 ` Re: pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
@ 2018-02-21 05:26 ` Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 6+ messages in thread
From: Andres Freund @ 2018-02-21 05:26 UTC (permalink / raw)
To: pgsql-committers@postgresql.org, pgsql-hackers@postgresql.org, Robert Haas <robertmhaas@gmail.com>; Kohei KaiGai <kaigai@kaigai.gr.jp>
Hi,
On 2018-02-16 16:03:37 -0800, Andres Freund wrote:
> This triggered a failure on rhinoceros, in the sepgsql test:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&dt=2018-02-16%2023%3A45%3A02
>
> The relevant diff is:
> + LOG: SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=system_u:object_r:sepgsql_proc_exec_t:s0 tclass=db_procedure name="pg_catalog.int4eq(integer,integer)"
> and that's because we now invoke the function access hook for grouping
> equal, which we previously didn't.
>
> I personally think the new behaviour makes more sense, but if somebody
> wants to argue differently? The only argument against I can see is that
> there's some other cases where also don't yet invoke it, but that seems
> weak.
>
> I never fully grasped the exact use-case for the function execute hook
> is, so maybe Kaigai and/or Robert could comment?
Fixed by adjusting the test output:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&dt=2018-02-21%2002%3A45%3A01
Greetings,
Andres Freund
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-02-21 05:26 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-16 05:58 pgsql: Do execGrouping.c via expression eval machinery. Andres Freund <andres@anarazel.de>
2018-02-16 06:14 ` Andres Freund <andres@anarazel.de>
2018-02-16 06:47 ` Andres Freund <andres@anarazel.de>
2018-02-16 22:48 pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
2018-02-17 00:03 ` Re: pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
2018-02-21 05:26 ` Re: pgsql: Do execGrouping.c via expression eval machinery, take two. Andres Freund <andres@anarazel.de>
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