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

Reduce unnecessary calls of namespace check when run \d

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • backlog
    • Security
    • 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

              hongxu ma Hongxu Ma
              hongxu ma Hongxu Ma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: