Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-8952

Query Analytics: No table/indexes information for Views when PostgreSQL server monitored with pg_stat_monitor

Details

    Description

      User impact:

      Tables tab doesn't work correctly for some queries

      Steps to reproduce:

      Run PDPGSQL with pg_stat_monitor 0.9.2-beta1 (perconalab/percona-distribution-postgresql:13.4) *attached docker-compose can be used
      Enable the extension in postgres

      create extension pg_stat_monitor;

      Add PG to monitoring
      Go to QAN and filter your pgmonitor service
      Try to display tables for some queries

      Actual result:

      pmm-client | INFO[2021-10-01T14:34:23.698+00:00] Starting... component=actions-runner id=/action_id/5cd4c66e-10fe-4e69-b9ba-49ac8ead039e type=postgresql-show-create-table
      pmm-client | WARN[2021-10-01T14:34:23.704+00:00] Done with error: Table not found: sql: no rows in result set. component=actions-runner id=/action_id/5cd4c66e-10fe-4e69-b9ba-49ac8ead039e type=postgresql-show-create-table
      pmm-client | INFO[2021-10-01T14:34:23.709+00:00] Starting... component=actions-runner id=/action_id/651e04b3-df7a-4aa0-a191-332ace095205 type=postgresql-show-index
      pmm-client | INFO[2021-10-01T14:34:23.719+00:00] Done without error. component=actions-runner id=/action_id/651e04b3-df7a-4aa0-a191-332ace095205 type=postgresql-show-index
      pmm-client | INFO[2021-10-01T14:35:13.686+00:00] Sending 38 buckets. agentID=/agent_id/56257105-5fe9-4732-a96e-01bcba85416c component=agent-builtin type=qan_postgresql_pgstatmonitor_agent

      Expected result:

      Tables/Indexes displayed

      Workaround:

       

      Suggested implementation:

      Remove the asterisk in ToPgStatMonitor method of 0.9.0 view type. Removing it effectively on the input into the system.

      Details:

      Compared same queries with pg_stat_monitor_version 0.8.0 and the tables/indexes display ok:

      How to test

       Follow steps to reproduce.

      Make sure there are no asterisks in table names in QAN in Tables tab.

      https://github.com/Percona-Lab/pmm-submodules/pull/2076

      Attachments

        Issue Links

          Activity

            People

              jan.prukner Jan Prukner (Inactive)
              beata.handzelova Beata Handzelova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist