pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Collect the global OR of hasRowSecurity flags for plancache
2+ messages / 1 participants
[nested] [flat]

* pgsql: Collect the global OR of hasRowSecurity flags for plancache
@ 2015-12-15 01:06  Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-12-15 01:06 UTC (permalink / raw)
  To: pgsql-committers

Collect the global OR of hasRowSecurity flags for plancache

We carry around information about if a given query has row security or
not to allow the plancache to use that information to invalidate a
planned query in the event that the environment changes.

Previously, the flag of one of the subqueries was simply being copied
into place to indicate if the query overall included RLS components.
That's wrong as we need the global OR of all subqueries.  Fix by
changing the code to match how fireRIRules works, which is results
in OR'ing all of the flags.

Noted by Tom.

Back-patch to 9.5 where RLS was introduced.

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/plan/planner.c      |    3 +-
src/backend/optimizer/plan/setrefs.c      |    3 +-
src/test/regress/expected/rowsecurity.out |  154 ++++++++++++++++++++++++++++-
src/test/regress/sql/rowsecurity.sql      |   24 ++++-
4 files changed, 180 insertions(+), 4 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] 2+ messages in thread

* pgsql: Collect the global OR of hasRowSecurity flags for plancache
@ 2015-12-15 01:06  Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-12-15 01:06 UTC (permalink / raw)
  To: pgsql-committers

Collect the global OR of hasRowSecurity flags for plancache

We carry around information about if a given query has row security or
not to allow the plancache to use that information to invalidate a
planned query in the event that the environment changes.

Previously, the flag of one of the subqueries was simply being copied
into place to indicate if the query overall included RLS components.
That's wrong as we need the global OR of all subqueries.  Fix by
changing the code to match how fireRIRules works, which is results
in OR'ing all of the flags.

Noted by Tom.

Back-patch to 9.5 where RLS was introduced.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/651e2ba74af997c2952672397828636dc6c6d017

Modified Files
--------------
src/backend/optimizer/plan/planner.c      |    3 +-
src/backend/optimizer/plan/setrefs.c      |    3 +-
src/test/regress/expected/rowsecurity.out |  154 ++++++++++++++++++++++++++++-
src/test/regress/sql/rowsecurity.sql      |   24 ++++-
4 files changed, 180 insertions(+), 4 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] 2+ messages in thread


end of thread, other threads:[~2015-12-15 01:06 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 01:06 pgsql: Collect the global OR of hasRowSecurity flags for plancache Stephen Frost <sfrost@snowman.net>
2015-12-15 01:06 pgsql: Collect the global OR of hasRowSecurity flags for plancache Stephen Frost <sfrost@snowman.net>

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