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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Compute root->qual_security_level in a less random place.
Date: 2019-03-31 17:47:49
Message-ID: E1hAeYf-0000lM-JM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-03-31 19:49:12 pgsql: Add test case exercising formerly-unreached code in inheritance_
Previous Message Michael Paquier 2019-03-31 14:04:22 Re: pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru