I had forgotten to send it on hackers list.
---------- Forwarded message ----------
From: Ashutosh Bapat <ash...@en...>
Date: Fri, Feb 15, 2013 at 1:45 PM
Subject: Subqueries and permission checks
To: Postgres-XC core <Pos...@li...>
Hi All,
It seems subqueries FQS or faster planning has many unknown problems. This
one is second in the series,
Permissions on object involved in queries are checked at the time of
executing the query (not planning or parsing). This is done by traversing
the final range table collected in PlannerGlobal during the planning phase.
This final range table contains the RTEs from the subqueries and sublinks
in the query, collected during pull_up_subqueries() and pull_up_sublinks().
While FQSing a query, we need to do the same. We need to collect the RTEs
from the subqueries and sublinks. We need to do it after we have deemed a
query to be FQSable. We can do it while walking the tree for shippability,
but read on.
In very near future, we should be able to use the infrastructure for FQS
for shipping sub-queries without planning at the coordinator, the whole
query is not shippable. If we get there, (which I am hoping to do in this
quarter), we can't rely on the shippability walker to gather the RTEs as
said above, since this collection will be lost once we come out of FQS
planner. Instead we need to do it, after we have decided to FQS a certain
subquery or sublink. To do so, the only way I see is to add yet another
walker just to collect the RTEs.
Does anybody see any other way?
--
Best Wishes,
Ashutosh Bapat
EntepriseDB Corporation
The Enterprise Postgres Company
--
Best Wishes,
Ashutosh Bapat
EntepriseDB Corporation
The Enterprise Postgres Company
|