pgsql: Faster expression evaluation and targetlist projection.

Started by Andres Freundalmost 9 years ago14 messages
#1Andres Freund
andres@anarazel.de

Faster expression evaluation and targetlist projection.

This replaces the old, recursive tree-walk based evaluation, with
non-recursive, opcode dispatch based, expression evaluation.
Projection is now implemented as part of expression evaluation.

This both leads to significant performance improvements, and makes
future just-in-time compilation of expressions easier.

The speed gains primarily come from:
- non-recursive implementation reduces stack usage / overhead
- simple sub-expressions are implemented with a single jump, without
function calls
- sharing some state between different sub-expressions
- reduced amount of indirect/hard to predict memory accesses by laying
out operation metadata sequentially; including the avoidance of
nearly all of the previously used linked lists
- more code has been moved to expression initialization, avoiding
constant re-checks at evaluation time

Future just-in-time compilation (JIT) has become easier, as
demonstrated by released patches intended to be merged in a later
release, for primarily two reasons: Firstly, due to a stricter split
between expression initialization and evaluation, less code has to be
handled by the JIT. Secondly, due to the non-recursive nature of the
generated "instructions", less performance-critical code-paths can
easily be shared between interpreted and compiled evaluation.

The new framework allows for significant future optimizations. E.g.:
- basic infrastructure for to later reduce the per executor-startup
overhead of expression evaluation, by caching state in prepared
statements. That'd be helpful in OLTPish scenarios where
initialization overhead is measurable.
- optimizing the generated "code". A number of proposals for potential
work has already been made.
- optimizing the interpreter. Similarly a number of proposals have
been made here too.

The move of logic into the expression initialization step leads to some
backward-incompatible changes:
- Function permission checks are now done during expression
initialization, whereas previously they were done during
execution. In edge cases this can lead to errors being raised that
previously wouldn't have been, e.g. a NULL array being coerced to a
different array type previously didn't perform checks.
- The set of domain constraints to be checked, is now evaluated once
during expression initialization, previously it was re-built
every time a domain check was evaluated. For normal queries this
doesn't change much, but e.g. for plpgsql functions, which caches
ExprStates, the old set could stick around longer. The behavior
around might still change.

Author: Andres Freund, with significant changes by Tom Lane,
changes by Heikki Linnakangas
Reviewed-By: Tom Lane, Heikki Linnakangas
Discussion: /messages/by-id/20161206034955.bh33paeralxbtluv@alap3.anarazel.de

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b8d7f053c5c2bf2a7e8734fe3327f6a8bc711755

Modified Files
--------------
contrib/postgres_fdw/postgres_fdw.c | 2 +-
src/backend/bootstrap/bootstrap.c | 2 +-
src/backend/catalog/index.c | 43 +-
src/backend/catalog/partition.c | 3 +-
src/backend/catalog/toasting.c | 2 +-
src/backend/commands/analyze.c | 10 +-
src/backend/commands/explain.c | 2 +-
src/backend/commands/indexcmds.c | 4 +-
src/backend/commands/prepare.c | 4 +-
src/backend/commands/tablecmds.c | 25 +-
src/backend/commands/trigger.c | 10 +-
src/backend/executor/Makefile | 7 +-
src/backend/executor/README | 176 +-
src/backend/executor/execExpr.c | 2665 +++++++++++++++
src/backend/executor/execExprInterp.c | 3525 +++++++++++++++++++
src/backend/executor/execIndexing.c | 20 +-
src/backend/executor/execMain.c | 39 +-
src/backend/executor/execQual.c | 5313 -----------------------------
src/backend/executor/execSRF.c | 924 +++++
src/backend/executor/execScan.c | 10 +-
src/backend/executor/execUtils.c | 338 +-
src/backend/executor/functions.c | 2 +-
src/backend/executor/nodeAgg.c | 34 +-
src/backend/executor/nodeBitmapHeapscan.c | 17 +-
src/backend/executor/nodeCtescan.c | 8 +-
src/backend/executor/nodeCustom.c | 8 +-
src/backend/executor/nodeForeignscan.c | 15 +-
src/backend/executor/nodeFunctionscan.c | 19 +-
src/backend/executor/nodeGather.c | 8 +-
src/backend/executor/nodeGatherMerge.c | 8 +-
src/backend/executor/nodeGroup.c | 12 +-
src/backend/executor/nodeHash.c | 12 +-
src/backend/executor/nodeHashjoin.c | 44 +-
src/backend/executor/nodeIndexonlyscan.c | 15 +-
src/backend/executor/nodeIndexscan.c | 24 +-
src/backend/executor/nodeMergejoin.c | 33 +-
src/backend/executor/nodeModifyTable.c | 38 +-
src/backend/executor/nodeNestloop.c | 23 +-
src/backend/executor/nodeProjectSet.c | 61 +-
src/backend/executor/nodeResult.c | 16 +-
src/backend/executor/nodeSamplescan.c | 17 +-
src/backend/executor/nodeSeqscan.c | 8 +-
src/backend/executor/nodeSubplan.c | 96 +-
src/backend/executor/nodeSubqueryscan.c | 8 +-
src/backend/executor/nodeTableFuncscan.c | 20 +-
src/backend/executor/nodeTidscan.c | 139 +-
src/backend/executor/nodeValuesscan.c | 10 +-
src/backend/executor/nodeWindowAgg.c | 8 +-
src/backend/executor/nodeWorktablescan.c | 8 +-
src/backend/optimizer/path/costsize.c | 2 +-
src/backend/optimizer/plan/planner.c | 2 +-
src/backend/optimizer/util/clauses.c | 12 +-
src/backend/utils/adt/domains.c | 29 +-
src/backend/utils/adt/ruleutils.c | 4 +-
src/backend/utils/adt/xml.c | 45 +-
src/backend/utils/cache/typcache.c | 40 +-
src/include/executor/execExpr.h | 642 ++++
src/include/executor/execdebug.h | 23 +-
src/include/executor/executor.h | 178 +-
src/include/executor/nodeSubplan.h | 4 +
src/include/fmgr.h | 8 +
src/include/nodes/execnodes.h | 504 +--
src/include/nodes/nodes.h | 30 +-
src/include/utils/typcache.h | 3 +-
src/include/utils/xml.h | 4 +-
src/pl/plpgsql/src/pl_exec.c | 5 +-
src/test/regress/expected/case.out | 2 +-
src/test/regress/expected/privileges.out | 20 +-
src/test/regress/sql/case.sql | 2 +-
src/test/regress/sql/privileges.sql | 5 +-
src/tools/pgindent/typedefs.list | 6 +-
71 files changed, 8871 insertions(+), 6534 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Thomas Munro
thomas.munro@enterprisedb.com
In reply to: Andres Freund (#1)
Re: pgsql: Faster expression evaluation and targetlist projection.

On Sun, Mar 26, 2017 at 11:11 AM, Andres Freund <andres@anarazel.de> wrote:

Faster expression evaluation and targetlist projection.

This replaces the old, recursive tree-walk based evaluation, with
non-recursive, opcode dispatch based, expression evaluation.
Projection is now implemented as part of expression evaluation.

This both leads to significant performance improvements, and makes
future just-in-time compilation of expressions easier.

This is a huge achievement. Congratulations!

--
Thomas Munro
http://www.enterprisedb.com

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

In reply to: Thomas Munro (#2)
Re: pgsql: Faster expression evaluation and targetlist projection.

On Sat, Mar 25, 2017 at 3:55 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:

This is a huge achievement. Congratulations!

I also think it's excellent. Well done to all involved.

--
Peter Geoghegan

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#4David Rowley
david.rowley@2ndquadrant.com
In reply to: Thomas Munro (#2)
Re: pgsql: Faster expression evaluation and targetlist projection.

On 26 March 2017 at 09:55, Thomas Munro <thomas.munro@enterprisedb.com> wrote:

On Sun, Mar 26, 2017 at 11:11 AM, Andres Freund <andres@anarazel.de> wrote:

Faster expression evaluation and targetlist projection.

This replaces the old, recursive tree-walk based evaluation, with
non-recursive, opcode dispatch based, expression evaluation.
Projection is now implemented as part of expression evaluation.

This both leads to significant performance improvements, and makes
future just-in-time compilation of expressions easier.

This is a huge achievement. Congratulations!

Agreed. Congratulations!

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#5Andres Freund
andres@anarazel.de
In reply to: Andres Freund (#1)
Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

Hi Joe,

On 2017-03-25 22:11:37 +0000, Andres Freund wrote:

Faster expression evaluation and targetlist projection.

Apparently this broke the selinux integration somehow:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&amp;dt=2017-03-25%2022%3A45%3A01

Unfortunately the buildfarm appears to not display regression.diffs -
making this a bit hard to debug remotely. Any chance you could help me
out with that? I'd rather not setup selinux here...

Regards,

Andres

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#6Joe Conway
mail@joeconway.com
In reply to: Andres Freund (#5)
Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

On 03/25/2017 04:03 PM, Andres Freund wrote:

Hi Joe,

On 2017-03-25 22:11:37 +0000, Andres Freund wrote:

Faster expression evaluation and targetlist projection.

Apparently this broke the selinux integration somehow:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&amp;dt=2017-03-25%2022%3A45%3A01

Unfortunately the buildfarm appears to not display regression.diffs -
making this a bit hard to debug remotely. Any chance you could help me
out with that? I'd rather not setup selinux here...

Sure. What exactly do you want? Should we jump on a call or hangout or
something?

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

#7Andres Freund
andres@anarazel.de
In reply to: Joe Conway (#6)
Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

On 2017-03-25 16:36:03 -0700, Joe Conway wrote:

On 03/25/2017 04:03 PM, Andres Freund wrote:

Hi Joe,

On 2017-03-25 22:11:37 +0000, Andres Freund wrote:

Faster expression evaluation and targetlist projection.

Apparently this broke the selinux integration somehow:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&amp;dt=2017-03-25%2022%3A45%3A01

Unfortunately the buildfarm appears to not display regression.diffs -
making this a bit hard to debug remotely. Any chance you could help me
out with that? I'd rather not setup selinux here...

Sure. What exactly do you want?

I think, for starters, seeing regression.diffs from sepgsql would be
useful. Might already clear up what's the issue.

Should we jump on a call or hangout or something?

I think for now just seeing regression.diffs would be enough - depending
on what the differences are. Could very well be that we're just seing a
difference due to function permission checks happening a bit earlier
now.

Greetings,

Andres Freund

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#8Michael Paquier
michael.paquier@gmail.com
In reply to: David Rowley (#4)
Re: pgsql: Faster expression evaluation and targetlist projection.

On Sun, Mar 26, 2017 at 7:58 AM, David Rowley
<david.rowley@2ndquadrant.com> wrote:

On 26 March 2017 at 09:55, Thomas Munro <thomas.munro@enterprisedb.com> wrote:

On Sun, Mar 26, 2017 at 11:11 AM, Andres Freund <andres@anarazel.de> wrote:

Faster expression evaluation and targetlist projection.

This replaces the old, recursive tree-walk based evaluation, with
non-recursive, opcode dispatch based, expression evaluation.
Projection is now implemented as part of expression evaluation.

This both leads to significant performance improvements, and makes
future just-in-time compilation of expressions easier.

This is a huge achievement. Congratulations!

Agreed. Congratulations!

Hurray. Congratulations.
--
Michael

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#9Joe Conway
mail@joeconway.com
In reply to: Andres Freund (#7)
Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

On 03/25/2017 04:45 PM, Andres Freund wrote:

On 2017-03-25 16:36:03 -0700, Joe Conway wrote:

On 03/25/2017 04:03 PM, Andres Freund wrote:

Hi Joe,

On 2017-03-25 22:11:37 +0000, Andres Freund wrote:

Faster expression evaluation and targetlist projection.

Apparently this broke the selinux integration somehow:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&amp;dt=2017-03-25%2022%3A45%3A01

Unfortunately the buildfarm appears to not display regression.diffs -
making this a bit hard to debug remotely. Any chance you could help me
out with that? I'd rather not setup selinux here...

Sure. What exactly do you want?

I think, for starters, seeing regression.diffs from sepgsql would be
useful. Might already clear up what's the issue.

I went looking, and even after a forced run the diff file is gone --
does the buildfarm auto-cleanup or something?

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

#10Andres Freund
andres@anarazel.de
In reply to: Joe Conway (#9)
Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

On March 25, 2017 4:54:08 PM PDT, Joe Conway <mail@joeconway.com> wrote:

On 03/25/2017 04:45 PM, Andres Freund wrote:

On 2017-03-25 16:36:03 -0700, Joe Conway wrote:

On 03/25/2017 04:03 PM, Andres Freund wrote:

Hi Joe,

On 2017-03-25 22:11:37 +0000, Andres Freund wrote:

Faster expression evaluation and targetlist projection.

Apparently this broke the selinux integration somehow:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rhinoceros&amp;dt=2017-03-25%2022%3A45%3A01

Unfortunately the buildfarm appears to not display

regression.diffs -

making this a bit hard to debug remotely. Any chance you could

help me

out with that? I'd rather not setup selinux here...

Sure. What exactly do you want?

I think, for starters, seeing regression.diffs from sepgsql would be
useful. Might already clear up what's the issue.

I went looking, and even after a forced run the diff file is gone --
does the buildfarm auto-cleanup or something?

Yes, it does. You'd probably have to run the tests manually. Do you have selinux setup? I assumed you would, given I seen to recall a talk of yours with references to it ;)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#11Joe Conway
mail@joeconway.com
In reply to: Andres Freund (#10)
1 attachment(s)
Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

On 03/25/2017 05:21 PM, Andres Freund wrote:

On March 25, 2017 4:54:08 PM PDT, Joe Conway <mail@joeconway.com> wrote:

On 03/25/2017 04:45 PM, Andres Freund wrote:

I think, for starters, seeing regression.diffs from sepgsql would be
useful. Might already clear up what's the issue.

I went looking, and even after a forced run the diff file is gone --
does the buildfarm auto-cleanup or something?

Yes, it does. You'd probably have to run the tests manually. Do you
have selinux setup? I assumed you would, given I seen to recall a
talk of yours with references to it ;)

Yeah, but those machines are MLS fully constrained, and the sepgsql
regression test specifically needs "targeted" and some other particular
setup. So the easiest box to run this on is the buildfarm animal, but I
also want to do it in a way that doesn't mess up that environment.

I found "keep_error_builds" in build-farm.conf and tried setting to 1
and rerunning in force -- that seems to have worked, so diffs attached.

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

Attachments:

sepgsql.regression.diffstext/plain; charset=UTF-8; name=sepgsql.regression.diffsDownload
*** /opt/src/pgsql-git/build-farm-root/HEAD/pgsql.build/contrib/sepgsql/expected/ddl.out	2017-03-25 17:16:52.707097081 -0700
--- /opt/src/pgsql-git/build-farm-root/HEAD/pgsql.build/contrib/sepgsql/results/ddl.out	2017-03-25 17:23:17.811479306 -0700
***************
*** 187,192 ****
--- 187,193 ----
  LOG:  SELinux: allowed { search } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="pg_catalog"
  LOG:  SELinux: allowed { search } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="pg_catalog"
  LOG:  SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_table_4.y"
+ LOG:  SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_proc_exec_t:s0 tclass=db_procedure name="pg_catalog.float8(integer)"
  DROP INDEX regtest_index_tbl4_y;
  LOG:  SELinux: allowed { remove_name } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="regtest_schema"
  LOG:  SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema.regtest_table_4"

======================================================================

*** /opt/src/pgsql-git/build-farm-root/HEAD/pgsql.build/contrib/sepgsql/expected/alter.out	2017-03-25 17:16:52.707097081 -0700
--- /opt/src/pgsql-git/build-farm-root/HEAD/pgsql.build/contrib/sepgsql/results/alter.out	2017-03-25 17:23:21.280482200 -0700
***************
*** 170,177 ****
--- 170,180 ----
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table regtest_table column a"
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema.regtest_table_3"
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table regtest_table_3 column x"
+ LOG:  SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_proc_exec_t:s0 tclass=db_procedure name="pg_catalog.int4eq(integer,integer)"
  ALTER TABLE regtest_table ADD CONSTRAINT test_ck CHECK (b like '%abc%') NOT VALID;      -- not supported
  ALTER TABLE regtest_table VALIDATE CONSTRAINT test_ck;  -- not supported
+ LOG:  SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_proc_exec_t:s0 tclass=db_procedure name="pg_catalog.textlike(pg_catalog.text,pg_catalog.text)"
+ LOG:  SELinux: allowed { execute } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_proc_exec_t:s0 tclass=db_procedure name="pg_catalog.textlike(pg_catalog.text,pg_catalog.text)"
  ALTER TABLE regtest_table DROP CONSTRAINT test_ck;      -- not supported
  CREATE TRIGGER regtest_test_trig BEFORE UPDATE ON regtest_table
      FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();

======================================================================

*** /opt/src/pgsql-git/build-farm-root/HEAD/pgsql.build/contrib/sepgsql/expected/misc.out	2017-03-25 17:16:52.707097081 -0700
--- /opt/src/pgsql-git/build-farm-root/HEAD/pgsql.build/contrib/sepgsql/results/misc.out	2017-03-25 17:23:21.485482371 -0700
***************
*** 46,53 ****
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="public.t1"
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table t1 column x"
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table t1 column y"
- 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.row_number()"
  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.textlike(pg_catalog.text,pg_catalog.text)"
   row_number | x  |                y                 
  ------------+----+----------------------------------
            1 |  2 | c81e728d9d4c2f636f067f89cc14862c
--- 46,53 ----
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="public.t1"
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table t1 column x"
  LOG:  SELinux: allowed { select } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0-s0:c0.c255 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="table t1 column y"
  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.textlike(pg_catalog.text,pg_catalog.text)"
+ 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.row_number()"
   row_number | x  |                y                 
  ------------+----+----------------------------------
            1 |  2 | c81e728d9d4c2f636f067f89cc14862c

======================================================================

#12Noname
andres@anarazel.de
In reply to: Joe Conway (#11)
Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

Hi,

On 2017-03-25 17:33:33 -0700, Joe Conway wrote:

On 03/25/2017 05:21 PM, Andres Freund wrote:

On March 25, 2017 4:54:08 PM PDT, Joe Conway <mail@joeconway.com> wrote:

On 03/25/2017 04:45 PM, Andres Freund wrote:

I think, for starters, seeing regression.diffs from sepgsql would be
useful. Might already clear up what's the issue.

I went looking, and even after a forced run the diff file is gone --
does the buildfarm auto-cleanup or something?

Yes, it does. You'd probably have to run the tests manually. Do you
have selinux setup? I assumed you would, given I seen to recall a
talk of yours with references to it ;)

Yeah, but those machines are MLS fully constrained, and the sepgsql
regression test specifically needs "targeted" and some other particular
setup. So the easiest box to run this on is the buildfarm animal, but I
also want to do it in a way that doesn't mess up that environment.

Ah.

I found "keep_error_builds" in build-farm.conf and tried setting to 1
and rerunning in force -- that seems to have worked, so diffs attached.

Thanks. Those all look like "valid" differences, i.e. checks that
previously hadn't been executed because the function is never invoked,
as there's no data in those tables.

I blindly tried to fix these, let's hope that works.

- Andres

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#13Andres Freund
andres@anarazel.de
In reply to: Noname (#12)
Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

On 2017-03-25 20:40:23 -0700, Andres Freund wrote:

I blindly tried to fix these, let's hope that works.

In a second attempt (yes, reading diffs correctly is helpful), this
resolved the selinux issue. Yeha.

- Andres

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#14Joe Conway
mail@joeconway.com
In reply to: Andres Freund (#13)
Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.

On 03/25/2017 09:52 PM, Andres Freund wrote:

On 2017-03-25 20:40:23 -0700, Andres Freund wrote:

I blindly tried to fix these, let's hope that works.

In a second attempt (yes, reading diffs correctly is helpful), this
resolved the selinux issue. Yeha.

+1!

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development