pgsql: Compute root->qual_security_level in a less random place. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Compute root->qual_security_level in a less random place.
Date
Msg-id E1hAeYf-0000lM-JM@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Compute root->qual_security_level in a less random place.

We can set this up once and for all in subquery_planner's initial survey
of the flattened rangetable, rather than incrementally adjusting it in
build_simple_rel.  The previous approach made it rather hard to reason
about exactly when the value would be available, and we were definitely
using it in some places before the final value was computed.

Noted while fooling around with Amit Langote's patch to delay creation
of inheritance child rels.  That didn't break this code, but it made it
even more fragile, IMO.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9fd4de119c609b4110eea74f00f7b9002e14aa38

Modified Files
--------------
src/backend/optimizer/plan/planner.c | 10 ++++++++++
src/backend/optimizer/util/relnode.c | 11 -----------
2 files changed, 10 insertions(+), 11 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Skip redundant anti-wraparound vacuums
Next
From: Tom Lane
Date:
Subject: pgsql: Add test case exercising formerly-unreached code ininheritance_