Uploaded image for project: 'Apache HAWQ'
  1. Apache HAWQ
  2. HAWQ-256 Integrate Security with Apache Ranger
  3. HAWQ-1286

Reduce unnecessary calls of namespace check when run \d

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: backlog
    • Component/s: Security
    • Labels:
      None

      Description

      After HAWQ-1279 is done, current schema is no cached in current session.
      But it cause too many calls of namespace check to send in run \d , most of them are unnecessary (e.g. repeat check usage right of public schema).

      So we should reduce those unnecessary calls.

      \d case

      \d:
          select version()
          SELECT n.nspname as \"Schema\",\n  c.relname as \"Name\",\n  CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as \"Type\",\n  pg_catalog.pg_get_userbyid(c.relowner) as \"Owner\"\nFROM pg_catalog.pg_class c\n     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\nWHERE c.relkind IN ('r','v','S','')\n      AND n.nspname <> 'pg_catalog'\n      AND n.nspname <> 'information_schema'\n      AND n.nspname !~ '^pg_toast'\n  AND pg_catalog.pg_table_is_visible(c.oid)\nORDER BY 1,2;
              recomputeNamespacePath()
              recomputeNamespacePath()
              .... recompute many times in this long select sql
      

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              hongxu ma Hongxu Ma
              Reporter:
              hongxu ma Hongxu Ma

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment