pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Faster expression evaluation and targetlist projection.
14+ messages / 6 participants
[nested] [flat]

Commits from this thread:
  2017-03-26 83bbcb04ab  Blindly attempt to fix sepgsql tests.
* pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 22:11  Andres Freund <andres@anarazel.de>
  0 siblings, 2 replies; 14+ messages in thread

From: Andres Freund @ 2017-03-25 22:11 UTC (permalink / raw)
  To: pgsql-committers

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: https://postgr.es/m/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


^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 22:55  Thomas Munro <thomas.munro@enterprisedb.com>
  parent: Andres Freund <andres@anarazel.de>
  1 sibling, 2 replies; 14+ messages in thread

From: Thomas Munro @ 2017-03-25 22:55 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-committers

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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 22:56  Peter Geoghegan <pg@bowt.ie>
  parent: Thomas Munro <thomas.munro@enterprisedb.com>
  1 sibling, 0 replies; 14+ messages in thread

From: Peter Geoghegan @ 2017-03-25 22:56 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@enterprisedb.com>; +Cc: Andres Freund <andres@anarazel.de>; pgsql-committers

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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 22:58  David Rowley <david.rowley@2ndquadrant.com>
  parent: Thomas Munro <thomas.munro@enterprisedb.com>
  1 sibling, 1 reply; 14+ messages in thread

From: David Rowley @ 2017-03-25 22:58 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@enterprisedb.com>; +Cc: Andres Freund <andres@anarazel.de>; pgsql-committers

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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 23:03  Andres Freund <andres@anarazel.de>
  parent: Andres Freund <andres@anarazel.de>
  1 sibling, 1 reply; 14+ messages in thread

From: Andres Freund @ 2017-03-25 23:03 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org; Joe Conway <mail@joeconway.com>

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&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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 23:36  Joe Conway <mail@joeconway.com>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 14+ messages in thread

From: Joe Conway @ 2017-03-25 23:36 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; pgsql-hackers@postgresql.org

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&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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 23:45  Andres Freund <andres@anarazel.de>
  parent: Joe Conway <mail@joeconway.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Andres Freund @ 2017-03-25 23:45 UTC (permalink / raw)
  To: Joe Conway <mail@joeconway.com>; +Cc: pgsql-hackers@postgresql.org

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&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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 23:53  Michael Paquier <michael.paquier@gmail.com>
  parent: David Rowley <david.rowley@2ndquadrant.com>
  0 siblings, 0 replies; 14+ messages in thread

From: Michael Paquier @ 2017-03-25 23:53 UTC (permalink / raw)
  To: David Rowley <david.rowley@2ndquadrant.com>; +Cc: Thomas Munro <thomas.munro@enterprisedb.com>; Andres Freund <andres@anarazel.de>; pgsql-committers

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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-25 23:54  Joe Conway <mail@joeconway.com>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 14+ messages in thread

From: Joe Conway @ 2017-03-25 23:54 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-hackers@postgresql.org

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&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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-26 00:21  Andres Freund <andres@anarazel.de>
  parent: Joe Conway <mail@joeconway.com>
  0 siblings, 1 reply; 14+ messages in thread

From: Andres Freund @ 2017-03-26 00:21 UTC (permalink / raw)
  To: pgsql-hackers@postgresql.org; Joe Conway <mail@joeconway.com>



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&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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-26 00:33  Joe Conway <mail@joeconway.com>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 14+ messages in thread

From: Joe Conway @ 2017-03-26 00:33 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; pgsql-hackers@postgresql.org

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.diffs (text/plain, 6.3K) download *** /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 ======================================================================
signature.asc (application/pgp-signature, 818B) download ^ permalink raw reply [nested|flat] 14+ messages in thread

* Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-26 03:40  Andres Freund <andres@anarazel.de>
  parent: Joe Conway <mail@joeconway.com>
  0 siblings, 1 reply; 14+ messages in thread

From: andres@anarazel.de @ 2017-03-26 03:40 UTC (permalink / raw)
  To: Joe Conway <mail@joeconway.com>; +Cc: pgsql-hackers@postgresql.org

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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-26 04:52  Andres Freund <andres@anarazel.de>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 14+ messages in thread

From: Andres Freund @ 2017-03-26 04:52 UTC (permalink / raw)
  To: Joe Conway <mail@joeconway.com>; +Cc: pgsql-hackers@postgresql.org

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



^ permalink  raw  reply  [nested|flat] 14+ messages in thread

* Re: Re: [COMMITTERS] pgsql: Faster expression evaluation and targetlist projection.
@ 2017-03-26 15:30  Joe Conway <mail@joeconway.com>
  parent: Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 14+ messages in thread

From: Joe Conway @ 2017-03-26 15:30 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-hackers@postgresql.org

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

Attachments:

  signature.asc (application/pgp-signature, 835B) download

^ permalink  raw  reply  [nested|flat] 14+ messages in thread


end of thread, other threads:[~2017-03-26 15:30 UTC | newest]

Thread overview: 14+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-03-25 22:11 pgsql: Faster expression evaluation and targetlist projection. Andres Freund <andres@anarazel.de>
2017-03-25 22:55 ` Thomas Munro <thomas.munro@enterprisedb.com>
2017-03-25 22:56   ` Peter Geoghegan <pg@bowt.ie>
2017-03-25 22:58   ` David Rowley <david.rowley@2ndquadrant.com>
2017-03-25 23:53     ` Michael Paquier <michael.paquier@gmail.com>
2017-03-25 23:03 ` Andres Freund <andres@anarazel.de>
2017-03-25 23:36   ` Joe Conway <mail@joeconway.com>
2017-03-25 23:45     ` Andres Freund <andres@anarazel.de>
2017-03-25 23:54       ` Joe Conway <mail@joeconway.com>
2017-03-26 00:21         ` Andres Freund <andres@anarazel.de>
2017-03-26 00:33           ` Joe Conway <mail@joeconway.com>
2017-03-26 03:40             ` Andres Freund <andres@anarazel.de>
2017-03-26 04:52               ` Andres Freund <andres@anarazel.de>
2017-03-26 15:30                 ` Joe Conway <mail@joeconway.com>

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