{
  "annotations":{"list":[{"builtIn":1,"datasource":{"type":"datasource","uid":"grafana"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations & Alerts","target":{"limit":100,"matchAny":false,"tags":[],"type":"dashboard"},"type":"dashboard"}]},
  "author":"Ruohang Feng (rh@vonng.com)",
  "description":"PostgreSQL Catalog Explorer for Single Database",
  "editable":true,
  "fiscalYearStartMonth":0,
  "graphTooltip":0,
  "id":null,
  "license":"https://pigsty.io/docs/about/license/",
  "links":[
    { "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Overview"],"targetBlank":false,"title":"Overview","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Cluster"] ,"targetBlank":false,"title":"Cluster" ,"tooltip":"","type":"dashboards","url":"" },
    { "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Instance"],"targetBlank":false,"title":"Instance","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Database"],"targetBlank":false,"title":"Database","tooltip":"","type":"dashboards","url":"" }
  ],
  "panels":[
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":201,"panels":[],"title":"Overview","type":"row"},
    {
      "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"title":"PGCAT Instance : ${ins}","url":"/d/pgcat-instance?var-dsn=${dsn:text}&${__url_time_range}"}]}]                          },
          { "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster : ${cls}","url":"/d/pgsql-cluster?var-cls=${cls}&${__url_time_range}"}]}]                                 },
          { "matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"links","value":[{"title":"PGSQL Database : ${ins}.${datname}","url":"/d/pgsql-database?var-ins=$ins&var-datname=$datname&${__url_time_range}"}]}] }
        ]
      },
      "gridPos":{"h":6,"w":6,"x":0,"y":1},
      "id":225,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"titleSize":16,"valueSize":16},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.1",
      "targets":[
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Database","type":"string","values":["${datname}"]}],"meta":{},"name":""},"hide":false,"refId":"C" },
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Instance","type":"string","values":["$ins"]}],"meta":{},"name":""}      ,"hide":false,"refId":"A" },
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Cluster","type":"string","values":["${cls}"]}],"meta":{},"name":""}     ,"hide":false,"refId":"B" }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"max":1.2,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
        "overrides":[
          {"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGCAT Database : ${__data.fields.Instance}.${datname}","url":"/d/pgcat-database?var-dsn=${__data.fields.Instance}.${datname}&${__url_time_range}"}]},{"id":"custom.width"}]},
          {"matcher":{"id":"byName","options":"IP"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"Node Instance : ${__data.fields.IP}","url":"/d/node-instance?var-id=${__data.fields.IP}&${__url_time_range}"}]}]},
          {
            "matcher":{"id":"byName","options":"Role"},
            "properties":[
              { "id":"custom.width"      ,"value":80                                                                                                                                             },{ "id":"mappings"          ,"value":[{"options":{"0":{"color":"#3e668f","index":0,"text":"primary"},"1":{"color":"#346f36cc","index":1,"text":"replica"}},"type":"value"}]         },
              { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                  },{ "id":"links"             ,"value":[{"title":"PGSQL Service for ${cls}-${__data.fields.Role}","url":"/d/pgsql-service?var-svc=${cls}-${__data.fields.Role}&${__url_time_range}"}] }
            ]
          },{
            "matcher":{"id":"byName","options":"Load"},
            "properties":[
              { "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"}                                                                                                                                                                                                                   },
              { "id":"color"             ,"value":{"mode":"thresholds"}                                                                                                                                                                                                                                },
              { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                                        },
              { "id":"custom.width"      ,"value":120                                                                                                                                                                                                                                                  },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]} },
              { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                    },
              { "id":"mappings"          ,"value":[{"options":{"-1":{"color":"transparent","index":0,"text":"N/A"}},"type":"value"}]                                                                                                                                                                   }
            ]
          },
          {"matcher":{"id":"byName","options":"Cluster"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster for ${__data.fields.Cluster}","url":"/d/pgsql-cluster?var-cls=${__data.fields.Cluster}&${__url_time_range}"}]}]},
          {"matcher":{"id":"byName","options":"TPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {"matcher":{"id":"byName","options":"QPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {
            "matcher":{"id":"byName","options":"Conn"},
            "properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#EAB839","value":20},{"color":"#EF843C","value":40},{"color":"#E24D42","value":80},{"color":"#b783af","value":100},{"color":"text","value":400}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
          },{
            "matcher":{"id":"byName","options":"RT"},
            "properties":[
              { "id":"custom.width"      ,"value":80                                                                                                                                                                                                            },
              { "id":"unit"              ,"value":"s"                                                                                                                                                                                                           },
              { "id":"mappings"          ,"value":[{"options":{"match":"nan","result":{"index":1,"text":"-"}},"type":"special"}]                                                                                                                                },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]} },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                         }
            ]
          },
          {"matcher":{"id":"byName","options":"Queue"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {"matcher":{"id":"byName","options":"HAProxy"},"properties":[{"id":"links","value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}"}]}]},
          {"matcher":{"id":"byName","options":"Up"},"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Dead"},"1":{"color":"#346f36cc","index":1,"text":"Alive"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}}]}
        ]
      },
      "gridPos":{"h":6,"w":8,"x":6,"y":1},
      "id":199,
      "links":[{"title":"PGSQL Instance : ${primary}","url":"/d/pgsql-instance?var-ins=${primary}&${__url_time_range}"}],
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Instance"}]},
      "pluginVersion":"12.3.1",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (up{job=\"pgsql\", cls=\"$cls\"})"                                       ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"A" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (pg:ins:load1{cls=\"$cls\"})"                                               ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"B" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},                    "exemplar":false,"expr":"sum by (ins) (pg:ins:xact_total_rate1m{cls=\"$cls\"})"                                   ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"C" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (pg_in_recovery{cls=\"$cls\"})"                                          ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"D" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},                    "exemplar":false,"expr":"max by (ins) (pg:ins:num_backends{cls=\"$cls\"})"                                        ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"E" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},                    "exemplar":false,"expr":"max by (ins) (pgbouncer:ins:xact_rt_1m{cls=\"$cls\"})"                                   ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"F" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},                    "exemplar":false,"expr":"sum by (ins,instance) (haproxy_backend_current_sessions{cls=\"$cls\", proxy!=\"stats\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"G" }
      ],
      "transformations":[
        {"id":"seriesToColumns","options":{"byField":"ins"}},
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "Time":true,
              "Time 1":true,
              "Time 10":true,
              "Time 2":true,
              "Time 3":true,
              "Time 4":true,
              "Time 6":true,
              "Time 8":true,
              "Time 9":true,
              "Value #A":false,
              "Value #B":false,
              "Value #C":false,
              "Value #E":false,
              "Value #F":true,
              "Value #G":true,
              "Value #H":false,
              "__name__":true,
              "__name__ 1":true,
              "__name__ 2":true,
              "__name__ 3":true,
              "__name__ 5":true,
              "__name__ 7":true,
              "cls":true,
              "cls 1":true,
              "cls 2":true,
              "cls 3":true,
              "cls 4":true,
              "cls 5":true,
              "cls 6":true,
              "cls 7":true,
              "instance":true,
              "instance 1":true,
              "instance 2":false,
              "instance 3":true,
              "instance 4":true,
              "instance 5":true,
              "instance 6":true,
              "ip 2":true,
              "ip 3":true,
              "ip 4":true,
              "ip 5":true,
              "ip 6":true,
              "ip 7":true,
              "job":true,
              "job 1":true,
              "job 2":true,
              "job 3":true,
              "job 4":true,
              "job 5":true,
              "job 6":true,
              "job 7":true
            },
            "indexByName":{"Time 1":8,"Time 2":9,"Time 3":10,"Time 4":11,"Time 5":12,"Time 6":14,"Value #A":0,"Value #B":4,"Value #C":5,"Value #D":1,"Value #E":6,"Value #F":7,"ins":2,"ip 1":3,"ip 2":13},
            "renameByName":{"Time 4":"","Value #A":"Up","Value #B":"Load","Value #C":"TPS","Value #D":"Role","Value #E":"Conn","Value #F":"RT","Value #G":"LB Conn","Value #H":"LB","Value #I":"QPS","Value #J":"LB Clients","Value #K":"Lag","cls 1":"","cls 2":"","ins":"Instance","instance":"HAProxy","instance 2":"","ip":"IP","ip 1":"IP"}
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"Databases of this instance\nTmpl: is this database a template?\nConn: is this database connectable?",
      "fieldConfig":{
        "defaults":{"color":{"mode":"fixed"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Database"},
            "properties":[
              { "id":"links"             ,"value":[]                                                                                                                                                              },{ "id":"mappings"          ,"value":[{"options":{"postgres":{"color":"#808080","index":2},"template0":{"color":"#c0c0c0e0","index":0},"template1":{"color":"#a8a8a8e0","index":1}},"type":"value"}] },
              { "id":"custom.cellOptions","value":{"type":"auto"}                                                                                                                                                 },{ "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                         },
              { "id":"links"             ,"value":[{"title":"PGSQL Database for ${ins}.${__data.fields.Database}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${__data.fields.Database}"}]                },{ "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                           }
            ]
          },{
            "matcher":{"id":"byName","options":"Size"},
            "properties":[
              { "id":"custom.width"      ,"value":75                                                                                                                                                                                                                  },
              { "id":"unit"              ,"value":"decbytes"                                                                                                                                                                                                          },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"red","value":0},{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1000000000},{"color":"#fcdb72","value":1000000000000},{"color":"#f79f64","value":10000000000000}]} },
              { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                          },
              { "id":"color"             ,"value":{"mode":"thresholds"}                                                                                                                                                                                               }
            ]
          },{
            "matcher":{"id":"byName","options":"Age"},
            "properties":[
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":60000000},{"color":"#EAB839","value":200000000},{"color":"#f79f64","value":600000000},{"color":"red","value":1000000000},{"color":"#b783af","value":2000000000},{"color":"text","value":2137483647}]} },
              { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                   },
              { "id":"unit"              ,"value":"short"                                                                                                                                                                                                                                                                                      },
              { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                           },
              { "id":"color"             ,"value":{"mode":"thresholds"}                                                                                                                                                                                                                                                                        },
              { "id":"decimals"          ,"value":2                                                                                                                                                                                                                                                                                            }
            ]
          },{
            "matcher":{"id":"byName","options":"Status"},
            "properties":[
              { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                                                                                                              },
              { "id":"mappings"          ,"value":[{"options":{"0":{"color":"#f79f64","index":1,"text":"Template0"},"1":{"color":"red","index":2,"text":"RejectConn"},"2":{"color":"#3e668f","index":3,"text":"Template"},"3":{"color":"#346f36cc","index":4,"text":"Normal"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"N/A"}},"type":"special"}] },
              { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                       }
            ]
          },{
            "matcher":{"id":"byName","options":"ConnLimit"},
            "properties":[
              { "id":"custom.width"      ,"value":85                                                                                                                                                                                                                                                                                },
              { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                                                     },
              { "id":"color"                                                                                                                                                                                                                                                                                                        },
              { "id":"mappings"          ,"value":[{"options":{"-1":{"color":"#3e668f","index":1,"text":"NO LIMIT"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"N/A"}},"type":"special"},{"options":{"from":0,"result":{"color":"#f79f64","index":2},"to":99999999},"type":"range"}] }
            ]
          },
          {"matcher":{"id":"byName","options":"Collate"},"properties":[{"id":"custom.width","value":65}]},{"matcher":{"id":"byName","options":"Encoding"},"properties":[{"id":"custom.width","value":75}]},
          {
            "matcher":{"id":"byName","options":"Owner"},
            "properties":[
              { "id":"custom.align"      ,"value":"center"                                                                                                                                                                                                                                                              },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                                 },
              { "id":"color"             ,"value":{"fixedColor":"#999999","mode":"fixed"}                                                                                                                                                                                                                               },
              { "id":"mappings"          ,"value":[{"options":{"dbuser_dba":{"color":"light-blue","index":1,"text":"dbuser_dba"},"postgres":{"color":"#3e668f","index":0,"text":"postgres"}},"type":"value"},{"options":{"pattern":"(dbuser_.*)","result":{"color":"#346f36cc","index":2,"text":"$1"}},"type":"regex"}] }
            ]
          },
          {"matcher":{"id":"byName","options":"Tablespace"},"properties":[{"id":"custom.width","value":90}]},{"matcher":{"id":"byName","options":"Privileges"},"properties":[{"id":"custom.cellOptions","value":{"type":"json-view"}}]},
          {"matcher":{"id":"byName","options":"AllowConn"},"properties":[{"id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}},{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":1,"text":"N"},"true":{"color":"#346f36cc","index":0,"text":"Y"}},"type":"value"}]},{"id":"custom.width","value":90}]},
          {
            "matcher":{"id":"byName","options":"OID"},
            "properties":[
              { "id":"custom.width"      ,"value":80                                                                                                                                 },{ "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                              },
              { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                            },{ "id":"links"             ,"value":[{"title":"PGCAT Database : ${ins}.${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}] },
              { "id":"mappings"          ,"value":[{"options":{"from":0,"result":{"color":"#bfbfbf33","index":0},"to":10},"type":"range"}]                                           }
            ]
          },
          {"matcher":{"id":"byName","options":"IsTemplate"},"properties":[{"id":"custom.width","value":90},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"mappings","value":[{"options":{"false":{"color":"#3e668f","index":0,"text":"F"},"true":{"color":"#f79f64","index":1,"text":"T"}},"type":"value"}]}]}
        ]
      },
      "gridPos":{"h":6,"w":10,"x":14,"y":1},
      "id":164,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"OID"}]},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"cc8a3615-9c82-44d7-be42-07d8aa1cac68"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT d.datname, d.oid::INTEGER, d.datconnlimit, d.datfrozenxid, age(d.datfrozenxid) AS age, datistemplate,datallowconn,  1 - (datistemplate)::INTEGER + 2 * d.datallowconn::INTEGER AS status, psd.numbackends AS sessions,\n       pg_catalog.pg_get_userbyid(d.datdba) as owner, pg_catalog.pg_encoding_to_char(d.encoding) as encoding,\n       d.datcollate, d.datctype,  pg_catalog.array_to_string(d.datacl, E'\\n') AS acl,\n       CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catalog.pg_database_size(d.datname) ELSE -1 END AS size,\n       t.spcname as tablespace,\n       pg_catalog.shobj_description(d.oid, 'pg_database') as description\nFROM pg_catalog.pg_database d JOIN pg_catalog.pg_tablespace t on d.dattablespace = t.oid JOIN pg_stat_database psd on d.oid = psd.datid\nORDER BY 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "transformations":[
        {"id":"seriesToColumns","options":{"byField":"datname"}},
        {
          "id":"organize",
          "options":{
            "excludeByName":{"Time 1":true,"Time 10":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"acl":true,"age":true,"datallowconn":false,"datcollate":true,"datconnlimit":true,"datctype":true,"datfrozenxid":true,"description":true,"encoding":true,"sessions":true,"size":true,"status":true,"tablespace":true},
            "indexByName":{"acl":14,"age":5,"datallowconn":4,"datcollate":10,"datconnlimit":8,"datctype":11,"datfrozenxid":12,"datistemplate":3,"datname":0,"description":15,"encoding":9,"oid":1,"owner":2,"sessions":7,"size":6,"status":16,"tablespace":13},
            "renameByName":{
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "datallowconn":"AllowConn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datistemplate":"IsTemplate",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "host":"Target",
              "oid":"OID",
              "owner":"Owner",
              "real_datname":"Datname",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "tablespace":"Tablespace"
            }
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"uid":"${dsn}"},
      "description":"",
      "fieldConfig":{"defaults":{"color":{"fixedColor":"#3e668f","mode":"fixed"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},"overrides":[]},
      "gridPos":{"h":1,"w":14,"x":0,"y":7},
      "id":149,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":false},"showPercentChange":false,"text":{},"textMode":"value","wideLayout":true},
      "pluginVersion":"12.3.1",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT pg_catalog.shobj_description(d.oid, 'pg_database') as description FROM pg_database d WHERE datname = '$datname';","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "transformations":[
        {"id":"seriesToColumns","options":{"byField":"datname"}},
        {
          "id":"organize",
          "options":{
            "excludeByName":{"Time 1":true,"Time 10":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"age":true,"datconnlimit":true,"datfrozenxid":true,"datname":false,"sessions":true,"size":true,"status":true},
            "indexByName":{"acl":12,"age":3,"datcollate":8,"datconnlimit":6,"datctype":9,"datfrozenxid":10,"datname":0,"description":13,"encoding":7,"owner":1,"sessions":5,"size":4,"status":2,"tablespace":11},
            "renameByName":{
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "datallowconn":"AllowConn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "host":"Target",
              "owner":"Owner",
              "real_datname":"Datname",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "tablespace":"Tablespace"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"${dsn}"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"fixedColor":"#3e668f","mode":"fixed"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
        "overrides":[{"matcher":{"id":"byName","options":"Is Template"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#3e668f","index":1},"true":{"color":"#f79f64","index":0}},"type":"value"}]}]},{"matcher":{"id":"byName","options":"Allow Conn"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":1},"true":{"color":"#3e668f","index":0}},"type":"value"}]}]}]
      },
      "gridPos":{"h":4,"w":5,"x":14,"y":7},
      "id":62,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":12},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT d.datname, d.datconnlimit, d.datfrozenxid, age(d.datfrozenxid) AS age, datistemplate, datallowconn,\n       pg_catalog.pg_get_userbyid(d.datdba) as owner, pg_catalog.pg_encoding_to_char(d.encoding) as encoding,\n       d.datcollate, d.datctype,\n       t.spcname as tablespace\nFROM pg_catalog.pg_database d JOIN pg_catalog.pg_tablespace t on d.dattablespace = t.oid JOIN pg_stat_database psd on d.oid = psd.datid\nWHERE d.datname = '$datname'\nORDER BY 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "transformations":[
        {"id":"seriesToColumns","options":{"byField":"datname"}},
        {
          "id":"organize",
          "options":{
            "excludeByName":{"Time 1":true,"Time 10":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"age":true,"datallowconn":true,"datconnlimit":true,"datfrozenxid":true,"datname":false,"sessions":true,"size":true,"status":true},
            "indexByName":{"acl":12,"age":3,"datcollate":8,"datconnlimit":6,"datctype":9,"datfrozenxid":10,"datname":0,"description":13,"encoding":7,"owner":1,"sessions":5,"size":4,"status":2,"tablespace":11},
            "renameByName":{
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "datallowconn":"Allow Conn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datistemplate":"Is Template",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "host":"Target",
              "owner":"Owner",
              "real_datname":"Datname",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "tablespace":"Tablespace"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"${dsn}"},
      "description":"",
      "fieldConfig":{"defaults":{"color":{"fixedColor":"#3e668f","mode":"fixed"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},"overrides":[]},
      "gridPos":{"h":4,"w":5,"x":19,"y":7},
      "id":150,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":true},"showPercentChange":false,"text":{},"textMode":"value","wideLayout":true},
      "pluginVersion":"12.3.1",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT unnest(datacl) AS name FROM pg_database WHERE datname = '$datname';","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "transformations":[
        {"id":"seriesToColumns","options":{"byField":"datname"}},
        {
          "id":"organize",
          "options":{
            "excludeByName":{"Time 1":true,"Time 10":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"age":true,"datconnlimit":true,"datfrozenxid":true,"datname":false,"sessions":true,"size":true,"status":true},
            "indexByName":{"acl":12,"age":3,"datcollate":8,"datconnlimit":6,"datctype":9,"datfrozenxid":10,"datname":0,"description":13,"encoding":7,"owner":1,"sessions":5,"size":4,"status":2,"tablespace":11},
            "renameByName":{
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "datallowconn":"AllowConn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "host":"Target",
              "owner":"Owner",
              "real_datname":"Datname",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "tablespace":"Tablespace"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"color":"#6c6c6ce0","index":0}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},"overrides":[]},
      "gridPos":{"h":3,"w":14,"x":0,"y":8},
      "id":53,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"titleSize":12},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "editorMode":"code",
          "format":"table",
          "hide":false,
          "rawQuery":true,
          "rawSql":"SELECT coalesce((data ->> 'r')::INTEGER, 0) AS \"r\",\n       coalesce((data ->> 'i')::INTEGER, 0) AS \"i\",\n       coalesce((data ->> 'S')::INTEGER, 0) AS \"S\",\n       coalesce((data ->> 't')::INTEGER, 0) AS \"t\",\n       coalesce((data ->> 'v')::INTEGER, 0) AS \"v\",\n       coalesce((data ->> 'm')::INTEGER, 0) AS \"m\",\n       coalesce((data ->> 'c')::INTEGER, 0) AS \"c\",\n       coalesce((data ->> 'f')::INTEGER, 0) AS \"f\",\n       coalesce((data ->> 'p')::INTEGER, 0) AS \"p\",\n       coalesce((data ->> 'I')::INTEGER, 0) AS \"I\"\nFROM (\n         SELECT json_object_agg(kind, count) AS data\n         FROM (SELECT relkind::TEXT AS kind, count(*) AS count FROM pg_class GROUP BY relkind) d\n     ) j;",
          "refId":"A",
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50}
        }
      ],
      "transformations":[{"id":"organize","options":{"excludeByName":{},"indexByName":{"I":9,"S":2,"c":5,"f":7,"i":1,"m":4,"p":8,"r":0,"t":6,"v":3},"renameByName":{"I":"P Index","S":"Seq","c":"C Type","f":"F Table","i":"Index","m":"M View","p":"P Table","r":"Table","t":"Toast","v":"View"}}}],
      "type":"stat"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":11},"id":200,"panels":[],"title":"Schema","type":"row"},
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"Schemas of current database ${datname}",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"mode":"gradient","type":"color-background"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Schema"},
            "properties":[
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                         },
              { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#5b9cd5","index":0},"repack":{"color":"#b783af","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
              { "id":"custom.cellOptions","value":{"type":"auto"}                                                                                                                                                                                                                            },
              { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                    },
              { "id":"links"             ,"value":[{"title":"PGCAT Schema : ${ins}.${datname}.${__data.fields.Schema}","url":"/d/pgcat-schema?var-dsn=${ins}.${datname}&var-schema=${__data.fields.Schema}"}]                                                                                },
              { "id":"custom.minWidth"   ,"value":200                                                                                                                                                                                                                                        },
              { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                       }
            ]
          },{
            "matcher":{"id":"byName","options":"Owner"},
            "properties":[
              {"id":"custom.align","value":"center"},{"id":"custom.cellOptions","value":{"type":"color-text"}},
              {
                "id":"mappings",
                "value":[
                  { "options":{"dbuser_dba":{"color":"#cc4637d9","index":1},"postgres":{"color":"#b783af","index":0}},"type":"value" },{ "options":{"pattern":"replicator","result":{"color":"#fcdb72","index":2}}                        ,"type":"regex" },{ "options":{"pattern":"dbuser_monitor","result":{"color":"#f79f64","index":3}}                    ,"type":"regex" },
                  { "options":{"pattern":"dbrole.*","result":{"color":"#3e668f","index":4}}                          ,"type":"regex" },{ "options":{"pattern":"dbuser.*","result":{"color":"#346f36cc","index":5}}                        ,"type":"regex" },{ "options":{"pattern":"pg_database_owner","result":{"color":"#5b9cd5","index":6}}                 ,"type":"regex" }
                ]
              },
              {"id":"custom.width","value":200},{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}},{"id":"custom.filterable","value":true}
            ]
          },
          {"matcher":{"id":"byName","options":"Objects"},"properties":[{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"OID"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},
          {"matcher":{"id":"byType","options":"number"},"properties":[{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7a7a7a40","value":0},{"color":"#3e668f","value":1}]}}]},{"matcher":{"id":"byRegexp","options":"/Table|Index|Toast|View/"},"properties":[{"id":"custom.width","value":80}]},
          {"matcher":{"id":"byName","options":"Sequence"},"properties":[{"id":"custom.width","value":90}]},{"matcher":{"id":"byName","options":"Materialized View"},"properties":[{"id":"custom.width","value":145}]},{"matcher":{"id":"byName","options":"Compose Type"},"properties":[{"id":"custom.width","value":140}]},
          {"matcher":{"id":"byName","options":"Partitioned Table"},"properties":[{"id":"custom.width","value":145}]},{"matcher":{"id":"byName","options":"Partitioned Index"},"properties":[{"id":"custom.width","value":145}]},{"matcher":{"id":"byName","options":"Foreign Table"},"properties":[{"id":"custom.width","value":120}]}
        ]
      },
      "gridPos":{"h":10,"w":24,"x":0,"y":12},
      "id":79,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Schema"}]},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"cc8a3615-9c82-44d7-be42-07d8aa1cac68"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT\n       relnamespace AS \"OID\", nspname AS \"Schema\", nspowner::RegRole::TEXT AS \"Owner\",\n       coalesce((data ->> 'r')::INTEGER, 0) AS \"r\",\n       coalesce((data ->> 'i')::INTEGER, 0) AS \"i\",\n       coalesce((data ->> 'S')::INTEGER, 0) AS \"S\",\n       coalesce((data ->> 't')::INTEGER, 0) AS \"t\",\n       coalesce((data ->> 'v')::INTEGER, 0) AS \"v\",\n       coalesce((data ->> 'm')::INTEGER, 0) AS \"m\",\n       coalesce((data ->> 'c')::INTEGER, 0) AS \"c\",\n       coalesce((data ->> 'f')::INTEGER, 0) AS \"f\",\n       coalesce((data ->> 'p')::INTEGER, 0) AS \"p\",\n       coalesce((data ->> 'I')::INTEGER, 0) AS \"I\"\nFROM (\n         SELECT relnamespace, json_object_agg(kind, count) AS data\n         FROM (SELECT relnamespace, relkind::TEXT AS kind, count(*) AS count FROM pg_class GROUP BY relnamespace,relkind) d\n         GROUP BY relnamespace\n     ) j LEFT JOIN pg_namespace nsp ON j.relnamespace = nsp.oid\nWHERE nspname NOT IN ('pg_toast', 'information_schema', 'pg_catalog');",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Schemas",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"Time 1":true,"Time 10":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"acl":true,"datcollate":true,"datctype":true,"datfrozenxid":true,"description":true,"encoding":true,"tablespace":true},
            "indexByName":{"I":12,"OID":0,"Owner":2,"S":5,"Schema":1,"c":9,"f":10,"i":4,"m":8,"p":11,"r":3,"t":6,"v":7},
            "renameByName":{
              "I":"Partitioned Index",
              "OID":"OID",
              "Owner":"Owner",
              "S":"Sequence",
              "Schema":"Schema",
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "c":"Compose Type",
              "datallowconn":"Conn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datistemplate":"Tmpl",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "f":"Foreign Table",
              "host":"Target",
              "i":"Index",
              "m":"Materialized View",
              "owner":"Owner",
              "p":"Partitioned Table",
              "r":"Table",
              "real_datname":"Datname",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "t":"Toast",
              "tablespace":"Tablespace",
              "v":"View"
            }
          }
        }
      ],
      "type":"table"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":22},"id":221,"panels":[],"title":"Extension","type":"row"},
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "description":"Installed Exension in the Database",
      "fieldConfig":{
        "defaults":{"color":{"fixedColor":"#3e668f","mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"color-text"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"text","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Schema"},
            "properties":[
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#3e668f","index":0},"repack":{"color":"#cc4637d9","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                        },
              { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                      },
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"custom.minWidth"   ,"value":180                                                                                                                                                                                                                                          },
              { "id":"links"             ,"value":[{"title":"PGCAT Schema : ${schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]                                                                                                    },
              { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                         },
              { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                          },
              { "id":"custom.align"      ,"value":"left"                                                                                                                                                                                                                                       }
            ]
          },
          {"matcher":{"id":"byName","options":"Extension"},"properties":[{"id":"custom.align","value":"left"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":150},{"id":"links","value":[{"targetBlank":true,"title":"Extension ${__data.fields.Extension}","url":"https://pgext.cloud/e/${__data.fields.Extension}"}]}]},
          {"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":80}]},{"matcher":{"id":"byName","options":"Description"},"properties":[{"id":"custom.align","value":"left"}]}
        ]
      },
      "gridPos":{"h":17,"w":12,"x":0,"y":23},
      "id":223,
      "links":[{"targetBlank":true,"title":"Extension Catalog","url":"https://pgext.cloud/list"}],
      "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[]},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "exemplar":false,
          "expr":"SELECT * FROM pg_class;",
          "format":"table",
          "group":[],
          "instant":true,
          "interval":"",
          "legendFormat":"",
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT e.extname , e.extversion, n.nspname, c.description\nFROM pg_catalog.pg_extension e LEFT JOIN pg_catalog.pg_namespace n\nON n.oid = e.extnamespace LEFT JOIN pg_catalog.pg_description c\nON c.objoid = e.oid AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass\nORDER BY 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Installed Extensions",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "Time 1":true,
              "Time 10":true,
              "Time 2":true,
              "Time 3":true,
              "Time 4":true,
              "Time 5":true,
              "Time 6":true,
              "Time 7":true,
              "Time 8":true,
              "Time 9":true,
              "acl":true,
              "analyze_count":false,
              "autoanalyze_count":false,
              "autovacuum_count":false,
              "datcollate":true,
              "datctype":true,
              "datfrozenxid":true,
              "description":false,
              "encoding":true,
              "idx_tup_fetch":false,
              "n_ins_since_vacuum":false,
              "n_mod_since_analyze":false,
              "n_tup_hot_upd":false,
              "relam":true,
              "relfilenode":false,
              "relid":true,
              "relname":true,
              "relnamespace":true,
              "reloftype":true,
              "relpages":true,
              "reltype":true,
              "schemaname":true,
              "seq_tup_read":false,
              "tablespace":true,
              "vacuum_count":false
            },
            "includeByName":{},
            "indexByName":{"description":3,"extname":0,"extversion":1,"nspname":2},
            "renameByName":{
              "I":"Partitioned Index",
              "Kind":"Kind",
              "S":"Sequence",
              "Size":"Size",
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "analyze_count":"Analyze Count",
              "autoanalyze_count":"AutoAnalyze Count",
              "autovacuum_count":"AutoVacuum Count",
              "c":"Compose Type",
              "datallowconn":"Conn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datistemplate":"Tmpl",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "extname":"Extension",
              "extversion":"Version",
              "f":"Foreign Table",
              "host":"Target",
              "i":"Index",
              "idx_scan":"Idx Scan",
              "idx_tup_fetch":"Index Rows",
              "kind":"Kind",
              "last_analyze":"Last Analyze",
              "last_autoanalyze":"Last AutoAnalyze",
              "last_autovacuum":"Last AutoVacuum",
              "last_vacuum":"Last Vacuum",
              "m":"Materialized View",
              "n_dead_tup":"Dead",
              "n_ins_since_vacuum":"nInsSinceVacuum",
              "n_live_tup":"Live",
              "n_mod_since_analyze":"nModSinceAnalyze",
              "n_tup_del":"Deleted",
              "n_tup_hot_upd":"HOT Update",
              "n_tup_ins":"Inserted",
              "n_tup_mod":"Modified",
              "n_tup_upd":"Updated",
              "name":"Name",
              "nspname":"Schema",
              "oid":"OID",
              "owner":"Owner",
              "p":"Partitioned Table",
              "pg_table_size":"Size",
              "r":"Table",
              "real_datname":"Datname",
              "rel":"Table",
              "relage":"Age",
              "relfilenode":"Filenode",
              "relhasindex":"",
              "relid":"",
              "relkind":"Kind",
              "relname":"",
              "relnatts":"nAttr",
              "relpages":"Pages",
              "relpersistence":"Persist",
              "reltuples":"Tuples",
              "seq_scan":"Seq Scan",
              "seq_tup_read":"Scan Rows",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "t":"Toast",
              "tablespace":"Tablespace",
              "tbl_scan":"Scan",
              "tup_read":"Scanned",
              "v":"View",
              "vacuum_count":"Vacuum Count"
            }
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "description":"Available Exensions (not yet installed) in the Database",
      "fieldConfig":{
        "defaults":{"color":{"fixedColor":"#3e668f","mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"color-text"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"text","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Schema"},
            "properties":[
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#3e668f","index":0},"repack":{"color":"#cc4637d9","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                        },
              { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                      },
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"custom.minWidth"   ,"value":180                                                                                                                                                                                                                                          },
              { "id":"links"             ,"value":[{"title":"PGCAT Schema : ${schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]                                                                                                    },
              { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                         },
              { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                          },
              { "id":"custom.align"      ,"value":"left"                                                                                                                                                                                                                                       }
            ]
          },
          {"matcher":{"id":"byName","options":"Extension"},"properties":[{"id":"custom.align","value":"left"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":150},{"id":"links","value":[{"targetBlank":true,"title":"Extension ${__data.fields.Extension}","url":"https://pgext.cloud/e/${__data.fields.Extension}"}]}]},
          {"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":80}]},{"matcher":{"id":"byName","options":"Description"},"properties":[{"id":"custom.align","value":"left"}]}
        ]
      },
      "gridPos":{"h":17,"w":12,"x":12,"y":23},
      "id":224,
      "links":[{"targetBlank":true,"title":"PG Extension Catalog","url":"https://pgext.cloud/list"}],
      "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[]},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "exemplar":false,
          "expr":"SELECT * FROM pg_class;",
          "format":"table",
          "group":[],
          "instant":true,
          "interval":"",
          "legendFormat":"",
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT * FROM pg_available_extensions WHERE installed_version IS NULL ORDER BY 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Available Extensions",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "Time 1":true,
              "Time 10":true,
              "Time 2":true,
              "Time 3":true,
              "Time 4":true,
              "Time 5":true,
              "Time 6":true,
              "Time 7":true,
              "Time 8":true,
              "Time 9":true,
              "acl":true,
              "analyze_count":false,
              "autoanalyze_count":false,
              "autovacuum_count":false,
              "datcollate":true,
              "datctype":true,
              "datfrozenxid":true,
              "description":false,
              "encoding":true,
              "idx_tup_fetch":false,
              "installed_version":true,
              "n_ins_since_vacuum":false,
              "n_mod_since_analyze":false,
              "n_tup_hot_upd":false,
              "relam":true,
              "relfilenode":false,
              "relid":true,
              "relname":true,
              "relnamespace":true,
              "reloftype":true,
              "relpages":true,
              "reltype":true,
              "schemaname":true,
              "seq_tup_read":false,
              "tablespace":true,
              "vacuum_count":false
            },
            "includeByName":{},
            "indexByName":{"description":3,"extname":0,"extversion":1,"nspname":2},
            "renameByName":{
              "I":"Partitioned Index",
              "Kind":"Kind",
              "S":"Sequence",
              "Size":"Size",
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "analyze_count":"Analyze Count",
              "autoanalyze_count":"AutoAnalyze Count",
              "autovacuum_count":"AutoVacuum Count",
              "c":"Compose Type",
              "comment":"Description",
              "datallowconn":"Conn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datistemplate":"Tmpl",
              "datname":"Database",
              "default_version":"Version",
              "description":"Description",
              "encoding":"Encoding",
              "extname":"Extension",
              "extversion":"Version",
              "f":"Foreign Table",
              "host":"Target",
              "i":"Index",
              "idx_scan":"Idx Scan",
              "idx_tup_fetch":"Index Rows",
              "installed_version":"",
              "kind":"Kind",
              "last_analyze":"Last Analyze",
              "last_autoanalyze":"Last AutoAnalyze",
              "last_autovacuum":"Last AutoVacuum",
              "last_vacuum":"Last Vacuum",
              "m":"Materialized View",
              "n_dead_tup":"Dead",
              "n_ins_since_vacuum":"nInsSinceVacuum",
              "n_live_tup":"Live",
              "n_mod_since_analyze":"nModSinceAnalyze",
              "n_tup_del":"Deleted",
              "n_tup_hot_upd":"HOT Update",
              "n_tup_ins":"Inserted",
              "n_tup_mod":"Modified",
              "n_tup_upd":"Updated",
              "name":"Extension",
              "nspname":"Schema",
              "oid":"OID",
              "owner":"Owner",
              "p":"Partitioned Table",
              "pg_table_size":"Size",
              "r":"Table",
              "real_datname":"Datname",
              "rel":"Table",
              "relage":"Age",
              "relfilenode":"Filenode",
              "relhasindex":"",
              "relid":"",
              "relkind":"Kind",
              "relname":"",
              "relnatts":"nAttr",
              "relpages":"Pages",
              "relpersistence":"Persist",
              "reltuples":"Tuples",
              "seq_scan":"Seq Scan",
              "seq_tup_read":"Scan Rows",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "t":"Toast",
              "tablespace":"Tablespace",
              "tbl_scan":"Scan",
              "tup_read":"Scanned",
              "v":"View",
              "vacuum_count":"Vacuum Count"
            }
          }
        }
      ],
      "type":"table"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":40},
      "id":217,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"Block by : Which pid are blocked by this PID ?\n\nBlock N: how many process are blocked by this process?",
          "fieldConfig":{
            "defaults":{
              "custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},
              "mappings":[],
              "thresholds":{
                "mode":"absolute",
                "steps":[{"color":"#346f36cc","value":0},{"color":"super-light-green","value":0.0001},{"color":"#346f36cc","value":0.01},{"color":"light-yellow","value":0.1},{"color":"#fcdb72","value":1},{"color":"super-light-orange","value":10},{"color":"#f79f64","value":60},{"color":"super-light-red","value":600},{"color":"red","value":1800},{"color":"super-light-purple","value":3600},{"color":"#b783af","value":7200}]
              }
            },
            "overrides":[
              {
                "matcher":{"id":"byName","options":"Database"},
                "properties":[
                  { "id":"custom.width"      ,"value":130                                                                                                                                                                                                                                                      },
                  { "id":"mappings"          ,"value":[{"options":{"postgres":{"color":"#f79f64","index":0},"template0":{"color":"#808080e0","index":1},"template1":{"color":"#787878e0","index":2}},"type":"value"},{"options":{"match":"null","result":{"color":"transparent","index":3}},"type":"special"}] },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                            },
                  { "id":"links"             ,"value":[{"title":"PGCAT Database : ${dsn:text}","url":"/d/pgcat-database?var-dsn=${dsn:text}"}]                                                                                                                                                                 },
                  { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                                  },
                  { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                                     }
                ]
              },{
                "matcher":{"id":"byName","options":"User"},
                "properties":[
                  {"id":"custom.width","value":120},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"dbuser_dba":{"color":"#cc4637d9","index":1},"dbuser_monitor":{"color":"#f79f64","index":3},"postgres":{"color":"#b783af","index":0},"replicator":{"color":"#fcdb72","index":2}},"type":"value"   },
                      { "options":{"pattern":"dbrole.*","result":{"color":"#3e668f","index":4}}                                                                                                                    ,"type":"regex"   },
                      { "options":{"pattern":"dbuser.*","result":{"color":"#346f36cc","index":5}}                                                                                                                  ,"type":"regex"   },
                      { "options":{"match":"null","result":{"color":"transparent","index":6}}                                                                                                                      ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"App"},
                "properties":[
                  {"id":"custom.width","value":220},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"Patroni":{"color":"#fcdb72","index":0},"Postgres JDBC Driver":{"color":"#b783af","index":2},"pg_exporter":{"color":"#f79f64","index":3},"psql":{"color":"#cc4637d9","index":1}},"type":"value"   },
                      { "options":{"pattern":"pgbench.*","result":{"color":"#5b9cd5","index":4}}                                                                                                                   ,"type":"regex"   },
                      { "options":{"pattern":"(citus|Timescale|Citus).*","result":{"color":"#7771a4","index":5}}                                                                                                   ,"type":"regex"   },
                      { "options":{"match":"null","result":{"color":"transparent","index":6}}                                                                                                                      ,"type":"special" },
                      { "options":{"match":"empty","result":{"color":"transparent","index":7}}                                                                                                                     ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"IP"},
                "properties":[
                  { "id":"custom.width"      ,"value":120                                                                                                                                                               },{ "id":"mappings"          ,"value":[{"options":{"127.0.0.1":{"color":"#8b8b8b","index":1}},"type":"value"},{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}] },
                  { "id":"custom.cellOptions","value":{"type":"auto"}                                                                                                                                                   },{ "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                           },
                  { "id":"links"             ,"value":[{"title":"Node Instance : ${__data.fields.IP}","url":"/d/node-instance?var-ip=${__data.fields.IP}&${__url_time_range}"}]                                         },{ "id":"custom.filterable" ,"value":true                                                                                                                                                              }
                ]
              },{
                "matcher":{"id":"byName","options":"Port"},
                "properties":[{"id":"custom.width","value":66},{"id":"mappings","value":[{"options":{"-1":{"color":"#808080e0","index":1,"text":"Socket"}},"type":"value"},{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]
              },{
                "matcher":{"id":"byName","options":"Type"},
                "properties":[
                  {"id":"custom.width","value":160},
                  {
                    "id":"mappings",
                    "value":[
                      {
                        "options":{
                          " autovacuum worker"          :{ "color":"#346f36cc","index":12,"text":"Vacuum Worker"    },
                          "archiver"                    :{ "color":"#cc4637d9","index": 5,"text":"Archiver"         },
                          "autovacuum launcher"         :{ "color":"#346f36cc","index":11,"text":"Vacuum Main"      },
                          "background writer"           :{ "color":"#cc4637d9","index": 4,"text":"BGWriter"         },
                          "checkpointer"                :{ "color":"#cc4637d9","index": 3,"text":"Checkpointer"     },
                          "client backend"              :{ "color":"#3e668f"  ,"index": 0,"text":"Client"           },
                          "logical replication launcher":{ "color":"#f79f64"  ,"index": 9,"text":"Logical Launcher" },
                          "logical replication worker"  :{ "color":"#f79f64"  ,"index":10,"text":"Logical Worker"   },
                          "parallel worker"             :{ "color":"#5b9cd5"  ,"index": 1,"text":"Worker"           },
                          "startup"                     :{ "color":"#fcdb72"  ,"index": 8,"text":"Startup"          },
                          "walreceiver"                 :{ "color":"#fcdb72"  ,"index": 7,"text":"WAL Receiver"     },
                          "walsender"                   :{ "color":"#fcdb72"  ,"index": 6,"text":"WAL Sender"       },
                          "walwriter"                   :{ "color":"#cc4637d9","index": 2,"text":"WAL Writer"       }
                        },
                        "type":"value"
                      },
                      {"options":{"pattern":"(Citus|TimescaleDB).*","result":{"color":"#7771a4","index":13}},"type":"regex"}
                    ]
                  },
                  {"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#80808080","value":0}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"State"},
                "properties":[
                  {"id":"custom.width","value":150},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"active":{"color":"#346f36cc","index":0},"disabled":{"color":"#7f7f7fe0","index":6},"fastpath function call":{"color":"#fcdb72","index":5},"idle":{"color":"#3d668f33","index":1},"idle in transaction":{"color":"#cc4637d9","index":3},"idle in transaction (aborted)":{"color":"#b783af","index":4},"waiting":{"color":"#f79f64","index":2}},"type":"value"   },
                      { "options":{"match":"null","result":{"color":"transparent","index":7}}                                                                                                                                                                                                                                                                                    ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"Wait"},
                "properties":[
                  {"id":"custom.width","value":80},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"Activity":{"color":"#346f36cc","index":0},"BufferPin":{"color":"#f79f64","index":4},"Client":{"color":"#3e668f","index":1},"Extension":{"color":"#7771a4","index":8},"IO":{"color":"#f7cb67","index":3},"IPC":{"color":"#5b9cd5","index":2},"LWLock":{"color":"#cc4637d9","index":6},"Lock":{"color":"red","index":5},"Timeout":{"color":"#7f7f7f9e","index":7}},"type":"value"   },
                      { "options":{"match":"null","result":{"color":"super-light-green","index":9,"text":"Running"}}                                                                                                                                                                                                                                                                                ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}
                ]
              },
              {"matcher":{"id":"byName","options":"Event"},"properties":[{"id":"custom.width","value":180},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}}]},
              {"matcher":{"id":"byName","options":"PID"},"properties":[{"id":"custom.width","value":70},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {
                "matcher":{"id":"byName","options":"ConnTime"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                     },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                     },
                  { "id":"custom.cellOptions","value":{"type":"color-background"}                                                                                                                                                                             },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                              },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":60},{"color":"#fcdb72","value":3600},{"color":"#cc4637d9","value":86400},{"color":"#f79f64","value":183131175}]} }
                ]
              },{
                "matcher":{"id":"byName","options":"Xact Wait"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                         },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                                                                         },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                               },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                                                                                  },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.001},{"color":"#fcdb72","value":0.01},{"color":"#f79f64","value":0.1},{"color":"#cc4637d9","value":1},{"color":"#b783af","value":10},{"color":"text","value":60}]} },
                  { "id":"color"                                                                                                                                                                                                                                                                                  }
                ]
              },{
                "matcher":{"id":"byName","options":"Lock Wait"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                         },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                                                                         },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                       },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                                                                                  },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.001},{"color":"#fcdb72","value":0.01},{"color":"#f79f64","value":0.1},{"color":"#cc4637d9","value":1},{"color":"#b783af","value":10},{"color":"text","value":60}]} },
                  { "id":"custom.cellOptions","value":{"type":"color-background"}                                                                                                                                                                                                                                 }
                ]
              },{
                "matcher":{"id":"byName","options":"StateTime"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                           },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                                           },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                         },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                                                    },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":60},{"color":"#cc4637d9","value":600},{"color":"#b783af","value":86400}]} }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"unit","value":"string"}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"custom.inspect","value":true},{"id":"custom.minWidth","value":500},{"id":"custom.align","value":"left"}]},{"matcher":{"id":"byName","options":"Start"},"properties":[{"id":"custom.width","value":200},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {"matcher":{"id":"byRegexp","options":"/XID|XMIN|LeaderPID|UID|DBID/"},"properties":[{"id":"custom.width","value":80},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},{"matcher":{"id":"byRegexp","options":"/^(Type|State|Database|User|App|IP|Wait|Event)$/"},"properties":[{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"Block By"},"properties":[{"id":"mappings","value":[{"options":{"{}":{"color":"#346f36cc","index":0}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#f79f64","value":0}]}},{"id":"custom.width","value":110}]},
              {"matcher":{"id":"byName","options":"Level"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#f79f64","value":1},{"color":"#cc4637d9","value":2},{"color":"#b783af","value":3},{"color":"#7771a4","value":4},{"color":"text","value":5}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Block N"},"properties":[{"id":"custom.width","value":70},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#f79f64","value":1},{"color":"#cc4637d9","value":2}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"XMin"},"properties":[{"id":"custom.width","value":110}]},
              {
                "matcher":{"id":"byName","options":"XID Age"},
                "properties":[
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":8},{"color":"#f79f64","value":32},{"color":"#EAB839","value":32},{"color":"#cc4637d9","value":128},{"color":"#7771a4","value":1000000000},{"color":"text","value":2000000000}]} },
                  { "id":"custom.cellOptions","value":{"type":"color-background"}                                                                                                                                                                                                                                            },
                  { "id":"color"                                                                                                                                                                                                                                                                                             }
                ]
              }
            ]
          },
          "gridPos":{"h":12,"w":24,"x":0,"y":169},
          "id":220,
          "links":[{"title":"PGCAT Locks : ${dsn:text}","url":"/d/pgcat-locks?var-dsn=${dsn:text}&viewPanel=218&refresh=1s"}],
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"with recursive\n    activity as (select pg_blocking_pids(pid) blocked_by, *,\n                        extract(seconds FROM age(clock_timestamp(), xact_start)) as xact_wait,\n                        extract(seconds FROM age(clock_timestamp(),\n                            -- (select max(l.waitstart) from pg_locks l where a.pid = l.pid)    -- PG 14 and newer\n                             state_change       -- PG 13 and below\n                            )) as lock_wait\n                 from pg_stat_activity a\n                 where state is distinct from 'idle'),\n    blockers as (select array_agg(distinct c order by c) as pids\n                 from (select unnest(blocked_by)\n                       from activity) as dt(c)),\n    tree as (select activity.*,\n                    1                           as level,\n                    activity.pid                as top_blocker_pid,\n                    array [activity.pid]        as path,\n                    array [activity.pid]::int[] as all_blockers_above\n             from activity, blockers\n             where array [pid] <@ blockers.pids and blocked_by = '{}'::int[]\n             union all\n             select activity.*,\n                    tree.level + 1 as level,\n                    tree.top_blocker_pid,\n                    path || array [activity.pid] as path,\n                    tree.all_blockers_above || array_agg(activity.pid) over () as all_blockers_above\n             from activity,\n                  tree\n             where not array [activity.pid] <@ tree.all_blockers_above\n               and activity.blocked_by <> '{}'::int[]\n               and activity.blocked_by <@ tree.all_blockers_above)\nselect pid,\n       blocked_by,\n       case when wait_event_type = 'Lock' then 'waiting' else state end                                      as state,\n       wait_event_type,\n       wait_event,\n       xact_wait,\n       lock_wait,\n       age(backend_xid) AS xid_age,\n       -- 2147483647 - age(backend_xmin) as xmin_ttf,\n       datname, usename, level - 1 AS level,\n       (select count(distinct t1.pid) from tree t1 where array [tree.pid] <@ t1.path and t1.pid <> tree.pid) as blkd,\n       format('%s %s%s', lpad('[' || pid::text || ']', 9, ' '), repeat('.', level - 1) || case when level > 1 then ' ' end, left(query, 1000) ) as query\nfrom tree\nWHERE datname = CURRENT_DATABASE()\norder by top_blocker_pid, level, pid;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Locks for ${datname}",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{"backend_start":false,"backend_xid":false,"backend_xmin":false,"client_hostname":true,"datid":false,"leader_pid":false,"query_id":true,"query_start":true,"state_change":true,"usesysid":false,"xact_start":true},
                "indexByName":{"blkd":5,"blocked_by":4,"datname":0,"level":8,"lock_wait":9,"pid":3,"query":10,"state":2,"usename":1,"wait_event":7,"wait_event_type":6,"xact_wait":11,"xid_age":12,"xmin_ttf":13},
                "renameByName":{
                  "application_name":"App",
                  "backend_start":"Start",
                  "backend_type":"Type",
                  "backend_xid":"XID",
                  "backend_xmin":"XMIN",
                  "blkd":"Block N",
                  "blocked_by":"Block By",
                  "blocking_pids":"Blocking PIDs",
                  "client_addr":"IP",
                  "client_hostname":"ClientHostname",
                  "client_port":"Port",
                  "conn_time":"ConnTime",
                  "datid":"DBID",
                  "datname":"Database",
                  "leader_pid":"LeaderPID",
                  "level":"Level",
                  "lock_wait":"Lock Wait",
                  "pid":"PID",
                  "qid":"Query",
                  "query":"SQL",
                  "query_id":"QueryID",
                  "query_start":"Query Start",
                  "query_time":"QueryTime",
                  "state":"State",
                  "state_change":"Stage Change",
                  "state_time":"StateTime",
                  "usename":"User",
                  "usesysid":"UID",
                  "wait_event":"Event",
                  "wait_event_type":"Wait",
                  "xact_start":"Xact Start",
                  "xact_time":"XactTime",
                  "xact_wait":"Xact Wait",
                  "xid_age":"XID Age",
                  "xmin_ttf":"XMin"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Locks",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":41},
      "id":196,
      "panels":[
        {
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "fieldConfig":{
            "defaults":{
              "custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},
              "mappings":[],
              "thresholds":{
                "mode":"absolute",
                "steps":[{"color":"#346f36cc","value":0},{"color":"super-light-green","value":0.0001},{"color":"#346f36cc","value":0.01},{"color":"light-yellow","value":0.1},{"color":"#fcdb72","value":1},{"color":"super-light-orange","value":10},{"color":"#f79f64","value":60},{"color":"super-light-red","value":600},{"color":"red","value":1800},{"color":"super-light-purple","value":3600},{"color":"#b783af","value":7200}]
              }
            },
            "overrides":[
              {
                "matcher":{"id":"byName","options":"Database"},
                "properties":[
                  { "id":"custom.width"      ,"value":130                                                                                                                                                                                                                                                      },
                  { "id":"mappings"          ,"value":[{"options":{"postgres":{"color":"#f79f64","index":0},"template0":{"color":"#808080e0","index":1},"template1":{"color":"#787878e0","index":2}},"type":"value"},{"options":{"match":"null","result":{"color":"transparent","index":3}},"type":"special"}] },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                            },
                  { "id":"links"             ,"value":[{"title":"PGCAT Database : ${dsn:text}","url":"/d/pgcat-database?var-dsn=${dsn:text}"}]                                                                                                                                                                 },
                  { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                                  },
                  { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                                     }
                ]
              },{
                "matcher":{"id":"byName","options":"User"},
                "properties":[
                  {"id":"custom.width","value":120},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"dbuser_dba":{"color":"#cc4637d9","index":1},"dbuser_monitor":{"color":"#f79f64","index":3},"postgres":{"color":"#b783af","index":0},"replicator":{"color":"#fcdb72","index":2}},"type":"value"   },
                      { "options":{"pattern":"dbrole.*","result":{"color":"#3e668f","index":4}}                                                                                                                    ,"type":"regex"   },
                      { "options":{"pattern":"dbuser.*","result":{"color":"#346f36cc","index":5}}                                                                                                                  ,"type":"regex"   },
                      { "options":{"match":"null","result":{"color":"transparent","index":6}}                                                                                                                      ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"App"},
                "properties":[
                  {"id":"custom.width","value":220},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"Patroni":{"color":"#fcdb72","index":0},"Postgres JDBC Driver":{"color":"#b783af","index":2},"pg_exporter":{"color":"#f79f64","index":3},"psql":{"color":"#cc4637d9","index":1}},"type":"value"   },
                      { "options":{"pattern":"pgbench.*","result":{"color":"#5b9cd5","index":4}}                                                                                                                   ,"type":"regex"   },
                      { "options":{"pattern":"(citus|Timescale|Citus).*","result":{"color":"#7771a4","index":5}}                                                                                                   ,"type":"regex"   },
                      { "options":{"match":"null","result":{"color":"transparent","index":6}}                                                                                                                      ,"type":"special" },
                      { "options":{"match":"empty","result":{"color":"transparent","index":7}}                                                                                                                     ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"IP"},
                "properties":[
                  { "id":"custom.width"      ,"value":120                                                                                                                                                               },{ "id":"mappings"          ,"value":[{"options":{"127.0.0.1":{"color":"#8b8b8b","index":1}},"type":"value"},{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}] },
                  { "id":"custom.cellOptions","value":{"type":"auto"}                                                                                                                                                   },{ "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                           },
                  { "id":"links"             ,"value":[{"title":"Node Instance : ${__data.fields.IP}","url":"/d/node-instance?var-ip=${__data.fields.IP}&${__url_time_range}"}]                                         },{ "id":"custom.filterable" ,"value":true                                                                                                                                                              }
                ]
              },{
                "matcher":{"id":"byName","options":"Port"},
                "properties":[{"id":"custom.width","value":66},{"id":"mappings","value":[{"options":{"-1":{"color":"#808080e0","index":1,"text":"Socket"}},"type":"value"},{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]
              },{
                "matcher":{"id":"byName","options":"Type"},
                "properties":[
                  {"id":"custom.width","value":160},
                  {
                    "id":"mappings",
                    "value":[
                      {
                        "options":{
                          " autovacuum worker"          :{ "color":"#346f36cc","index":12,"text":"Vacuum Worker"    },
                          "archiver"                    :{ "color":"#cc4637d9","index": 5,"text":"Archiver"         },
                          "autovacuum launcher"         :{ "color":"#346f36cc","index":11,"text":"Vacuum Main"      },
                          "background writer"           :{ "color":"#cc4637d9","index": 4,"text":"BGWriter"         },
                          "checkpointer"                :{ "color":"#cc4637d9","index": 3,"text":"Checkpointer"     },
                          "client backend"              :{ "color":"#3e668f"  ,"index": 0,"text":"Client"           },
                          "logical replication launcher":{ "color":"#f79f64"  ,"index": 9,"text":"Logical Launcher" },
                          "logical replication worker"  :{ "color":"#f79f64"  ,"index":10,"text":"Logical Worker"   },
                          "parallel worker"             :{ "color":"#5b9cd5"  ,"index": 1,"text":"Worker"           },
                          "startup"                     :{ "color":"#fcdb72"  ,"index": 8,"text":"Startup"          },
                          "walreceiver"                 :{ "color":"#fcdb72"  ,"index": 7,"text":"WAL Receiver"     },
                          "walsender"                   :{ "color":"#fcdb72"  ,"index": 6,"text":"WAL Sender"       },
                          "walwriter"                   :{ "color":"#cc4637d9","index": 2,"text":"WAL Writer"       }
                        },
                        "type":"value"
                      },
                      {"options":{"pattern":"(Citus|TimescaleDB).*","result":{"color":"#7771a4","index":13}},"type":"regex"}
                    ]
                  },
                  {"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#80808080","value":0}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"State"},
                "properties":[
                  {"id":"custom.width","value":150},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"active":{"color":"#346f36cc","index":0},"disabled":{"color":"#7f7f7fe0","index":5},"fastpath function call":{"color":"#fcdb72","index":4},"idle":{"color":"#3d668f33","index":1},"idle in transaction":{"color":"#cc4637d9","index":2},"idle in transaction (aborted)":{"color":"#b783af","index":3}},"type":"value"   },
                      { "options":{"match":"null","result":{"color":"transparent","index":6}}                                                                                                                                                                                                                                            ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"custom.filterable","value":true}
                ]
              },{
                "matcher":{"id":"byName","options":"Wait"},
                "properties":[
                  {"id":"custom.width","value":80},
                  {
                    "id":"mappings",
                    "value":[
                      { "options":{"Activity":{"color":"#346f36cc","index":0},"BufferPin":{"color":"#f79f64","index":4},"Client":{"color":"#3e668f","index":1},"Extension":{"color":"#7771a4","index":8},"IO":{"color":"#f7cb67","index":3},"IPC":{"color":"#5b9cd5","index":2},"LWLock":{"color":"#cc4637d9","index":6},"Lock":{"color":"red","index":5},"Timeout":{"color":"#7f7f7f9e","index":7}},"type":"value"   },
                      { "options":{"match":"null","result":{"color":"super-light-green","index":9,"text":"Running"}}                                                                                                                                                                                                                                                                                ,"type":"special" }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}
                ]
              },
              {"matcher":{"id":"byName","options":"Event"},"properties":[{"id":"custom.width","value":180},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}}]},
              {"matcher":{"id":"byName","options":"PID"},"properties":[{"id":"custom.width","value":70},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {
                "matcher":{"id":"byName","options":"ConnTime"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                     },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                     },
                  { "id":"custom.cellOptions","value":{"type":"color-background"}                                                                                                                                                                             },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                              },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":60},{"color":"#fcdb72","value":3600},{"color":"#cc4637d9","value":86400},{"color":"#f79f64","value":183131175}]} }
                ]
              },{
                "matcher":{"id":"byName","options":"XactTime"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                           },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                                           },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                 },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                                                    },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":60},{"color":"#cc4637d9","value":600},{"color":"#b783af","value":86400}]} }
                ]
              },{
                "matcher":{"id":"byName","options":"QueryTime"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                           },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                                           },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                         },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                                                    },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":60},{"color":"#cc4637d9","value":600},{"color":"#b783af","value":86400}]} }
                ]
              },{
                "matcher":{"id":"byName","options":"StateTime"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                           },
                  { "id":"unit"              ,"value":"s"                                                                                                                                                                                                                           },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                         },
                  { "id":"mappings"          ,"value":[{"options":{"match":"null","result":{"color":"transparent","index":0}},"type":"special"}]                                                                                                                                    },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":60},{"color":"#cc4637d9","value":600},{"color":"#b783af","value":86400}]} }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"unit","value":"string"}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"custom.inspect","value":true},{"id":"custom.minWidth","value":240},{"id":"custom.align","value":"left"}]},{"matcher":{"id":"byName","options":"Start"},"properties":[{"id":"custom.width","value":200},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {"matcher":{"id":"byRegexp","options":"/XID|XMIN|LeaderPID|UID|DBID/"},"properties":[{"id":"custom.width","value":80},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},{"matcher":{"id":"byRegexp","options":"/^(Type|State|Database|User|App|IP|Wait|Event)$/"},"properties":[{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"Blocking PIDs"},"properties":[{"id":"mappings","value":[{"options":{"{}":{"color":"transparent","index":0}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#f79f64","value":0}]}},{"id":"custom.width","value":110}]}
            ]
          },
          "gridPos":{"h":16,"w":24,"x":0,"y":305},
          "id":216,
          "links":[{"title":"PGCAT Locks : ${dsn:text}","url":"/d/pgcat-locks?var-dsn=${dsn:text}&viewPanel=216&refresh=1s"}],
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"State"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT pg_blocking_pids(pid) AS blocking_pids,\n       datid,\n       datname,\n       pid,\n       leader_pid,\n       usesysid,\n       usename,\n       application_name,\n       client_addr,\n       client_hostname,\n       client_port,\n       extract(epoch from now() - backend_start) AS conn_time,\n       extract(epoch from now() - xact_start)    AS xact_time,\n       extract(epoch from now() - query_start)   AS query_time,\n       extract(epoch from now() - state_change)  AS state_time,\n       wait_event_type,\n       wait_event,\n       state,\n       backend_xid,\n       backend_xmin,\n       query_id,\n       query,\n       backend_type,\n       query_id::TEXT AS qid -- 14 has query_id, comment this for PG 13 and below \nFROM pg_stat_activity;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Activity",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{"backend_start":false,"backend_xid":false,"backend_xmin":false,"client_hostname":true,"datid":false,"leader_pid":false,"query_id":true,"query_start":true,"state_change":true,"usesysid":false,"xact_start":true},
                "indexByName":{
                  "application_name":6,
                  "backend_start":14,
                  "backend_type":1,
                  "backend_xid":22,
                  "backend_xmin":23,
                  "blocking_pids":3,
                  "client_addr":7,
                  "client_hostname":27,
                  "client_port":8,
                  "conn_time":15,
                  "datid":26,
                  "datname":4,
                  "leader_pid":24,
                  "pid":0,
                  "qid":9,
                  "query":11,
                  "query_id":10,
                  "query_start":20,
                  "query_time":17,
                  "state":2,
                  "state_change":21,
                  "state_time":16,
                  "usename":5,
                  "usesysid":25,
                  "wait_event":13,
                  "wait_event_type":12,
                  "xact_start":19,
                  "xact_time":18
                },
                "renameByName":{
                  "application_name":"App",
                  "backend_start":"Start",
                  "backend_type":"Type",
                  "backend_xid":"XID",
                  "backend_xmin":"XMIN",
                  "blocking_pids":"Blocking PIDs",
                  "client_addr":"IP",
                  "client_hostname":"ClientHostname",
                  "client_port":"Port",
                  "conn_time":"ConnTime",
                  "datid":"DBID",
                  "datname":"Database",
                  "leader_pid":"LeaderPID",
                  "pid":"PID",
                  "qid":"Query",
                  "query":"SQL",
                  "query_id":"QueryID",
                  "query_start":"Query Start",
                  "query_time":"QueryTime",
                  "state":"State",
                  "state_change":"Stage Change",
                  "state_time":"StateTime",
                  "usename":"User",
                  "usesysid":"UID",
                  "wait_event":"Event",
                  "wait_event_type":"Wait",
                  "xact_start":"Xact Start",
                  "xact_time":"XactTime"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Activity",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":42},
      "id":152,
      "panels":[
        {
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "description":"Tables of current database ${datname}",
          "fieldConfig":{
            "defaults":{"color":{"fixedColor":"#3e668f","mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"color-text"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byName","options":"Schema"},
                "properties":[
                  { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
                  { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#3e668f","index":0},"repack":{"color":"#cc4637d9","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                        },
                  { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                      },
                  { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
                  { "id":"custom.minWidth"   ,"value":180                                                                                                                                                                                                                                          },
                  { "id":"links"             ,"value":[{"title":"PGCAT Schema : ${schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]                                                                                                    },
                  { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                         }
                ]
              },
              {"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.align","value":"left"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":300},{"id":"links","value":[{"title":"PGCAT Table : ${__data.fields.Name}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Name}"}]}]},
              {"matcher":{"id":"byName","options":"OID"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"thresholds"}}]},
              {"matcher":{"id":"byType","options":"number"},"properties":[{"id":"custom.width","value":70},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {
                "matcher":{"id":"byName","options":"Age"},
                "properties":[
                  { "id":"custom.width"      ,"value":70                                                                                                                                                                                                                                },
                  { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":0.05},{"color":"#f79f64","value":0.1},{"color":"#cc4637d9","value":0.3},{"color":"#b783af","value":0.9},{"color":"#000000","value":0.99}]} },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                             },
                  { "id":"color"                                                                                                                                                                                                                                                        },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                 },
                  { "id":"color"             ,"value":{"mode":"thresholds"}                                                                                                                                                                                                             }
                ]
              },{
                "matcher":{"id":"byName","options":"Tuples"},
                "properties":[
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                    },
                  { "id":"unit"              ,"value":"short"                                                                                                                                                                                                                                               },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":10000},{"color":"#fcdb72","value":1000000},{"color":"#f79f64","value":100000000},{"color":"#cc4637d9","value":10000000000}]} },
                  { "id":"mappings"          ,"value":[{"options":{"-1":{"color":"transparent","index":0,"text":"N/A"},"0":{"color":"#00000000","index":1,"text":"0"}},"type":"value"}]                                                                                                                     },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                 }
                ]
              },{
                "matcher":{"id":"byName","options":"Size"},
                "properties":[
                  { "id":"custom.width"      ,"value":110                                                                                                                                                                                                                                                           },
                  { "id":"unit"              ,"value":"bytes"                                                                                                                                                                                                                                                       },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":8193},{"color":"#fcdb72","value":10000000000},{"color":"#f79f64","value":100000000000},{"color":"#cc4637d9","value":1000000000000}]} },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                         },
                  { "id":"color"                                                                                                                                                                                                                                                                                    }
                ]
              },
              {"matcher":{"id":"byName","options":"nAttr"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#f79f64","value":16},{"color":"#cc4637d9","value":32}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {"matcher":{"id":"byType","options":"time"},"properties":[{"id":"unit","value":"dateTimeFromNow"},{"id":"custom.width","value":160},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Seq Scan"},"properties":[{"id":"custom.width","value":110},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#FF780A","value":1},{"color":"#cc4637d9","value":1000},{"color":"#b783af","value":1000000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {
                "matcher":{"id":"byName","options":"Kind"},
                "properties":[
                  {"id":"custom.width","value":150},
                  {
                    "id":"mappings",
                    "value":[
                      {
                        "options":{
                          "I":{ "color":"super-light-green" ,"index": 9,"text":"Partitioned Index" },
                          "P":{ "color":"#3274D9"           ,"index":10,"text":"Partition Table"   },
                          "S":{ "color":"#fcdb72"           ,"index": 2,"text":"Sequence"          },
                          "c":{ "color":"super-light-orange","index": 6,"text":"Componse Type"     },
                          "f":{ "color":"#f79f64"           ,"index": 7,"text":"Foreign table"     },
                          "i":{ "color":"#346f36cc"         ,"index": 1,"text":"Index"             },
                          "m":{ "color":"dark-blue"         ,"index": 5,"text":"Materialized View" },
                          "p":{ "color":"#284766"           ,"index": 8,"text":"Partitioned Table" },
                          "r":{ "color":"#3e668f"           ,"index": 0,"text":"Table"             },
                          "t":{ "color":"#808080"           ,"index": 3,"text":"Toast Table"       },
                          "v":{ "color":"red"               ,"index": 4,"text":"View"              }
                        },
                        "type":"value"
                      }
                    ]
                  },
                  {"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.filterable","value":true}
                ]
              },
              {"matcher":{"id":"byName","options":"Insert"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"locale"}]},{"matcher":{"id":"byName","options":"Update"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"locale"}]},{"matcher":{"id":"byName","options":"Delete"},"properties":[{"id":"custom.width","value":63}]},
              {
                "matcher":{"id":"byName","options":"Live"},
                "properties":[{"id":"custom.width","value":128},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":10000},{"color":"#fcdb72","value":1000000},{"color":"#f79f64","value":100000000},{"color":"#cc4637d9","value":10000000000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
              },
              {"matcher":{"id":"byName","options":"Dead"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#3e668f","value":1},{"color":"#f79f64","value":10000}]}}]},
              {"matcher":{"id":"byRegexp","options":"/Scan|Seq ScanIdx Scan|Inserted|Updated|Deleted|Scan Rows|Index Rows|HOT Update|Modified/"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {"matcher":{"id":"byName","options":"Deleted"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#cc4637d9","value":1}]}}]},{"matcher":{"id":"byName","options":"Updated"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#b783af","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Scan Rows"},"properties":[{"id":"custom.width","value":120}]},{"matcher":{"id":"byName","options":"Index Rows"},"properties":[{"id":"custom.width","value":120}]},{"matcher":{"id":"byName","options":"Filenode"},"properties":[{"id":"custom.width","value":80},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},
              {"matcher":{"id":"byRegexp","options":"/(.*Analyze|Vacuum).*Count/"},"properties":[{"id":"custom.width","value":160},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {"matcher":{"id":"byName","options":"nInsSinceVacuum"},"properties":[{"id":"custom.width","value":140},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#cc4637d9","value":80}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {"matcher":{"id":"byName","options":"nModSinceAnalyze"},"properties":[{"id":"custom.width","value":140},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#cc4637d9","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
              {"matcher":{"id":"byRegexp","options":"/Last.*/"},"properties":[{"id":"custom.width","value":160},{"id":"unit","value":"dateTimeFromNow"}]}
            ]
          },
          "gridPos":{"h":10,"w":24,"x":0,"y":322},
          "id":189,
          "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"Size"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "exemplar":false,
              "expr":"SELECT * FROM pg_class;",
              "format":"table",
              "group":[],
              "instant":true,
              "interval":"",
              "legendFormat":"",
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT c.oid,\n       n.nspname,\n       n.nspname || '.' || c.relname                        AS name,\n       CASE WHEN relispartition THEN 'P' ELSE c.relkind END AS kind,\n       age(c.relfrozenxid)::FLOAT / 2147483648              AS relage,\n       (n_tup_ins + n_tup_upd + n_tup_del)                  AS n_tup_mod,\n       seq_scan + idx_scan                                  AS tbl_scan,\n       seq_tup_read + idx_tup_fetch                         AS tup_read,\n       reltuples,\n       relpages,\n       relfilenode,\n       pg_table_size(c.oid)                                 AS size,\n       relnatts,\n       s.seq_scan,\n       s.seq_tup_read,\n       s.idx_scan,\n       s.idx_tup_fetch,\n       s.n_tup_ins,\n       s.n_tup_upd,\n       s.n_tup_del,\n       s.n_tup_hot_upd,\n       -- s.n_tup_newpage_upd, -- PG16\n       s.n_live_tup,\n       s.n_dead_tup,\n       s.n_mod_since_analyze,\n       -- s.n_ins_since_vacuum, -- PG13\n       extract(EPOCH FROM s.last_vacuum) * 1000             AS last_vacuum,\n       extract(EPOCH FROM s.last_autovacuum) * 1000         AS last_autovacuum,\n       extract(EPOCH FROM s.last_analyze) * 1000            AS last_analyze,\n       extract(EPOCH FROM s.last_autoanalyze) * 1000        AS last_autoanalyze,\n       s.vacuum_count,\n       s.autovacuum_count,\n       s.analyze_count,\n       s.autoanalyze_count\nFROM pg_catalog.pg_class c\n         LEFT JOIN pg_namespace n ON n.oid = c.relnamespace\n         LEFT JOIN pg_stat_user_tables s ON c.oid = s.relid\nWHERE c.relkind IN ('r', 'p', '')\nAND schemaname !~ '^pg_' AND schemaname !~ '^_' AND schemaname !~ '^timescaledb' AND schemaname !~ '^citus' AND schemaname !~ '^columnar' \nAND schemaname NOT IN ('pg_catalog','information_schema')\nORDER BY c.oid, n.nspname;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Tables",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "Time 1":true,
                  "Time 10":true,
                  "Time 2":true,
                  "Time 3":true,
                  "Time 4":true,
                  "Time 5":true,
                  "Time 6":true,
                  "Time 7":true,
                  "Time 8":true,
                  "Time 9":true,
                  "acl":true,
                  "analyze_count":false,
                  "autoanalyze_count":false,
                  "autovacuum_count":false,
                  "datcollate":true,
                  "datctype":true,
                  "datfrozenxid":true,
                  "description":true,
                  "encoding":true,
                  "idx_tup_fetch":false,
                  "n_ins_since_vacuum":false,
                  "n_mod_since_analyze":false,
                  "n_tup_hot_upd":false,
                  "relam":true,
                  "relfilenode":false,
                  "relid":true,
                  "relname":true,
                  "relnamespace":true,
                  "reloftype":true,
                  "relpages":true,
                  "reltype":true,
                  "schemaname":true,
                  "seq_tup_read":false,
                  "tablespace":true,
                  "vacuum_count":false
                },
                "indexByName":{
                  "analyze_count":32,
                  "autoanalyze_count":34,
                  "autovacuum_count":29,
                  "idx_scan":14,
                  "idx_tup_fetch":16,
                  "kind":3,
                  "last_analyze":33,
                  "last_autoanalyze":35,
                  "last_autovacuum":30,
                  "last_vacuum":28,
                  "n_dead_tup":10,
                  "n_ins_since_vacuum":26,
                  "n_live_tup":9,
                  "n_mod_since_analyze":31,
                  "n_tup_del":20,
                  "n_tup_hot_upd":22,
                  "n_tup_ins":19,
                  "n_tup_mod":18,
                  "n_tup_upd":21,
                  "name":1,
                  "nspname":2,
                  "oid":0,
                  "relage":7,
                  "relfilenode":5,
                  "relid":23,
                  "relname":25,
                  "relnatts":6,
                  "relpages":11,
                  "reltuples":8,
                  "schemaname":24,
                  "seq_scan":13,
                  "seq_tup_read":15,
                  "size":4,
                  "tbl_scan":12,
                  "tup_read":17,
                  "vacuum_count":27
                },
                "renameByName":{
                  "I":"Partitioned Index",
                  "Kind":"Kind",
                  "S":"Sequence",
                  "Size":"Size",
                  "Time 1":"",
                  "Time 7":"",
                  "Value #A":"Size",
                  "Value #B":"Age",
                  "Value #C":"Status",
                  "Value #D":"Session",
                  "Value #E":"TPS",
                  "Value #F":"ConnLimit",
                  "Value #G":"Reserve",
                  "Value #H":"Current",
                  "Value #I":"Disable",
                  "Value #J":"Pause",
                  "acl":"Privileges",
                  "age":"Age",
                  "analyze_count":"Analyze Count",
                  "autoanalyze_count":"AutoAnalyze Count",
                  "autovacuum_count":"AutoVacuum Count",
                  "c":"Compose Type",
                  "datallowconn":"Conn",
                  "datcollate":"Collate",
                  "datconnlimit":"ConnLimit",
                  "datctype":"Ctype",
                  "datfrozenxid":"FronzenXID",
                  "datistemplate":"Tmpl",
                  "datname":"Database",
                  "description":"Description",
                  "encoding":"Encoding",
                  "f":"Foreign Table",
                  "host":"Target",
                  "i":"Index",
                  "idx_scan":"Idx Scan",
                  "idx_tup_fetch":"Index Rows",
                  "kind":"Kind",
                  "last_analyze":"Last Analyze",
                  "last_autoanalyze":"Last AutoAnalyze",
                  "last_autovacuum":"Last AutoVacuum",
                  "last_vacuum":"Last Vacuum",
                  "m":"Materialized View",
                  "n_dead_tup":"Dead",
                  "n_ins_since_vacuum":"nInsSinceVacuum",
                  "n_live_tup":"Live",
                  "n_mod_since_analyze":"nModSinceAnalyze",
                  "n_tup_del":"Deleted",
                  "n_tup_hot_upd":"HOT Update",
                  "n_tup_ins":"Inserted",
                  "n_tup_mod":"Modified",
                  "n_tup_upd":"Updated",
                  "name":"Name",
                  "nspname":"Schema",
                  "oid":"OID",
                  "owner":"Owner",
                  "p":"Partitioned Table",
                  "pg_table_size":"Size",
                  "r":"Table",
                  "real_datname":"Datname",
                  "rel":"Table",
                  "relage":"Age",
                  "relfilenode":"Filenode",
                  "relhasindex":"",
                  "relid":"",
                  "relkind":"Kind",
                  "relname":"",
                  "relnatts":"nAttr",
                  "relpages":"Pages",
                  "relpersistence":"Persist",
                  "reltuples":"Tuples",
                  "seq_scan":"Seq Scan",
                  "seq_tup_read":"Scan Rows",
                  "sessions":"Session",
                  "size":"Size",
                  "status":"Status",
                  "t":"Toast",
                  "tablespace":"Tablespace",
                  "tbl_scan":"Scan",
                  "tup_read":"Scanned",
                  "v":"View",
                  "vacuum_count":"Vacuum Count"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Table",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":43},
      "id":154,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"Read = Returned Rows\n\nFetch = Scanned Rows",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              { "matcher":{"id":"byName","options":"Table ID"}                   ,"properties":[{"id":"custom.width","value":90},{"id":"custom.filterable","value":true}]                                                                                                                                                                           },
              { "matcher":{"id":"byName","options":"Index ID"}                   ,"properties":[{"id":"custom.width","value":90}]                                                                                                                                                                                                                   },
              { "matcher":{"id":"byName","options":"Schema"}                     ,"properties":[{"id":"custom.width","value":100}]                                                                                                                                                                                                                  },
              { "matcher":{"id":"byName","options":"Table"}                      ,"properties":[{"id":"links","value":[{"title":"Relation detail for ${__data.fields.Table}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Table}"}]},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]         },
              { "matcher":{"id":"byName","options":"Index"}                      ,"properties":[{"id":"links","value":[{"title":"${__data.fields.Define}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Index}"}]},{"id":"custom.minWidth","value":300},{"id":"custom.align","value":"left"}]                               },
              { "matcher":{"id":"byName","options":"Define"}                     ,"properties":[{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.minWidth","value":300},{"id":"custom.inspect","value":true}]                                                                                 },
              { "matcher":{"id":"byRegexp","options":"/Scan|Tup Read|Tup Fetch/"},"properties":[{"id":"custom.width","value":110},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#747474b3","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}] },
              { "matcher":{"id":"byName","options":"Last Scan"}                  ,"properties":[{"id":"custom.width","value":200}]                                                                                                                                                                                                                  }
            ]
          },
          "gridPos":{"h":11,"w":24,"x":0,"y":333},
          "id":184,
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Scan"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT schemaname || '.' || indexrelname AS \"Index\", \n       schemaname || '.' || relname AS \"Table\", \n       *,\n       pg_get_indexdef(indexrelid) AS def\nFROM pg_stat_user_indexes\nWHERE schemaname !~ '^pg_' AND schemaname !~ '^_' AND schemaname !~ '^timescaledb' AND schemaname !~ '^citus' AND schemaname !~ '^columnar' \nAND schemaname NOT IN ('pg_catalog','information_schema');",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Indexes",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{"indexrelname":true,"relname":true,"schemaname":true},
                "includeByName":{},
                "indexByName":{"Index":1,"Table":0,"def":2,"idx_scan":8,"idx_tup_fetch":10,"idx_tup_read":9,"indexrelid":6,"indexrelname":5,"relid":7,"relname":3,"schemaname":4},
                "renameByName":{"Index":"Index","Name":"Name","Table":"Table","def":"Define","idx_scan":"Scan","idx_tup_fetch":"Tup Fetch","idx_tup_read":"Tup Read","indexrelid":"Index ID","indexrelname":"","last_idx_scan":"Last Scan","relid":"Table ID","relname":"","schemaname":""}
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Index",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":44},
      "id":197,
      "panels":[
        {
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "description":"Bloat ratio & wasted bytes estimation of all heap tables",
          "fieldConfig":{
            "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}},
            "overrides":[
              {"matcher":{"id":"byName","options":"Relation"},"properties":[{"id":"custom.align","value":"left"},{"id":"links","value":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}]}]},{"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":160}]},
              {"matcher":{"id":"byName","options":"Size"},"properties":[{"id":"custom.width","value":80},{"id":"unit","value":"decbytes"}]},
              {
                "matcher":{"id":"byName","options":"Ratio"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                              },
                  { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                                                    },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#EAB839","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"rgb(0, 0, 0)","value":0.999}]} },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                                    }
                ]
              },{
                "matcher":{"id":"byName","options":"Waste"},
                "properties":[
                  { "id":"unit"              ,"value":"decbytes"                                                                                                                                                                                                                                                  },
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                         },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                               },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]} }
                ]
              },
              {"matcher":{"id":"byName","options":"Schema"},"properties":[{"id":"custom.align","value":"left"},{"id":"links","value":[{"title":"PGCAT Schema : ${dsn:text} ${__data.fields.Schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]}]},{"matcher":{"id":"byName","options":"TableID"},"properties":[{"id":"custom.width","value":80}]}
            ]
          },
          "gridPos":{"h":12,"w":12,"x":0,"y":45},
          "id":190,
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Waste"}]},
          "pluginVersion":"12.3.1",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_table_bloat;",
              "refId":"A",
              "select":[[{"params":["probability"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "table":"auto_suspicious_matches",
              "timeColumn":"created_time",
              "timeColumnType":"timestamp",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Table Bloat",
          "transformations":[{"id":"organize","options":{"excludeByName":{"datname":true},"includeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","tblid":"TableID","waste":"Waste"}}}],
          "type":"table"
        },{
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "fieldConfig":{
            "defaults":{"color":{"mode":"thresholds"},"links":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
            "overrides":[
              { "matcher":{"id":"byName","options":"Waste"},"properties":[{"id":"unit","value":"decbytes"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]}}] },
              { "matcher":{"id":"byName","options":"Ratio"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":0.999}]}}]                                     }
            ]
          },
          "gridPos":{"h":12,"w":12,"x":12,"y":45},
          "id":191,
          "options":{"colorByField":"ratio","colorField":"ratio","groupByField":"nspname","sizeField":"waste","textField":"relname","tiling":"treemapBinary"},
          "pluginVersion":"2.1.1",
          "targets":[{"datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},"editorMode":"code","format":"table","hide":false,"rawQuery":true,"rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_table_bloat;","refId":"A","sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50}}],
          "title":"Table Wasted Bytes",
          "transformations":[{"id":"organize","options":{"excludeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","waste":"Waste"}}}],
          "type":"marcusolsson-treemap-panel"
        },{
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "description":"Bloat ratio & wasted bytes estimation of all btree indexes",
          "fieldConfig":{
            "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}},
            "overrides":[
              {"matcher":{"id":"byName","options":"Relation"},"properties":[{"id":"custom.align","value":"left"},{"id":"links","value":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}]}]},{"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":160}]},
              {"matcher":{"id":"byName","options":"Size"},"properties":[{"id":"custom.width","value":80},{"id":"unit","value":"decbytes"}]},
              {
                "matcher":{"id":"byName","options":"Ratio"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                              },
                  { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                                                    },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#EAB839","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"rgb(0, 0, 0)","value":0.999}]} },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                                    }
                ]
              },{
                "matcher":{"id":"byName","options":"Waste"},
                "properties":[
                  { "id":"unit"              ,"value":"decbytes"                                                                                                                                                                                                                                                  },
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                         },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                               },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]} }
                ]
              },
              {"matcher":{"id":"byName","options":"TableID"},"properties":[{"id":"custom.width","value":80}]},{"matcher":{"id":"byName","options":"IndexID"},"properties":[{"id":"custom.width","value":80}]},
              {"matcher":{"id":"byName","options":"Schema"},"properties":[{"id":"custom.width","value":100},{"id":"links","value":[{"title":"PGCAT Schema : ${dsn:text} ${__data.fields.Schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]}]}
            ]
          },
          "gridPos":{"h":13,"w":12,"x":0,"y":57},
          "id":192,
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Waste"}]},
          "pluginVersion":"12.3.1",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_index_bloat;",
              "refId":"A",
              "select":[[{"params":["probability"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "table":"auto_suspicious_matches",
              "timeColumn":"created_time",
              "timeColumnType":"timestamp",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Index Bloat",
          "transformations":[{"id":"organize","options":{"excludeByName":{"datname":true},"includeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","idxid":"IndexID","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","tblid":"TableID","waste":"Waste"}}}],
          "type":"table"
        },{
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "fieldConfig":{
            "defaults":{"color":{"mode":"thresholds"},"links":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
            "overrides":[
              { "matcher":{"id":"byName","options":"Waste"},"properties":[{"id":"unit","value":"decbytes"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]}}] },
              { "matcher":{"id":"byName","options":"Ratio"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":0.999}]}}]                                     }
            ]
          },
          "gridPos":{"h":13,"w":12,"x":12,"y":57},
          "id":193,
          "options":{"colorByField":"ratio","colorField":"ratio","groupByField":"nspname","sizeField":"waste","textField":"relname","tiling":"treemapBinary"},
          "pluginVersion":"2.1.1",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_index_bloat;",
              "refId":"A",
              "select":[[{"params":["probability"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "table":"auto_suspicious_matches",
              "timeColumn":"created_time",
              "timeColumnType":"timestamp",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Index Wasted Bytes",
          "transformations":[{"id":"organize","options":{"excludeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","waste":"Waste"}}}],
          "type":"marcusolsson-treemap-panel"
        }
      ],
      "title":"Bloat",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":45},
      "id":156,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              { "matcher":{"id":"byName","options":"Schema"}    ,"properties":[{"id":"links","value":[{"title":"PGCAT Schema : ${schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]},{"id":"custom.align","value":"left"},{"id":"custom.minWidth","value":180},{"id":"custom.filterable","value":true}]                                                         },
              { "matcher":{"id":"byName","options":"Sequence"}  ,"properties":[{"id":"links","value":[{"title":"PGCAT Seqeuence : ${__data.fields.Sequence}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Sequence}"}]},{"id":"custom.minWidth","value":360},{"id":"custom.align","value":"left"}]                                                                                                },
              { "matcher":{"id":"byName","options":"Last Value"},"properties":[{"id":"mappings","value":[{"options":{"match":"null+nan","result":{"color":"#80808080","index":0}},"type":"special"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]                                                                   },
              { "matcher":{"id":"byName","options":"Cycle"}     ,"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"false":{"color":"#346f36cc","index":0,"text":"F"},"true":{"color":"#f79f64","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.filterable","value":true}]                                             },
              { "matcher":{"id":"byType","options":"number"}    ,"properties":[{"id":"custom.width","value":120}]                                                                                                                                                                                                                                                                                                          },
              { "matcher":{"id":"byName","options":"Owner"}     ,"properties":[{"id":"custom.width","value":120},{"id":"custom.filterable","value":true}]                                                                                                                                                                                                                                                                  },
              { "matcher":{"id":"byName","options":"Type"}      ,"properties":[{"id":"custom.width","value":110},{"id":"mappings","value":[{"options":{"bigint":{"color":"#346f36cc","index":2,"text":"BIGINT(8)"},"integer":{"color":"#5b9cd5","index":0,"text":"INTEGER(4)"},"smallint":{"color":"#3e668f","index":1,"text":"SMALLINT(2)"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}}] }
            ]
          },
          "gridPos":{"h":11,"w":24,"x":0,"y":371},
          "id":194,
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Sequence"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT schemaname || '.' || sequencename AS \"Sequence\", *\nFROM pg_sequences;\n-- WHERE schemaname !~ '^pg_' AND schemaname !~ '^_' AND schemaname !~ '^timescaledb' AND schemaname !~ '^citus' AND schemaname !~ '^columnar' \n-- AND schemaname NOT IN ('pg_catalog','information_schema');",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{"indexrelname":true,"max_value":true,"min_value":true,"relname":true,"schemaname":false,"sequencename":true},
                "indexByName":{"Sequence":0,"cache_size":11,"cycle":10,"data_type":4,"increment_by":9,"last_value":5,"max_value":8,"min_value":7,"schemaname":2,"sequencename":1,"sequenceowner":3,"start_value":6},
                "renameByName":{
                  "Index":"Index",
                  "Name":"Name",
                  "Sequence":"Sequence",
                  "Table":"Table",
                  "cache_size":"Cache Size",
                  "cycle":"Cycle",
                  "data_type":"Type",
                  "def":"Define",
                  "idx_scan":"Scan",
                  "idx_tup_fetch":"Tup Fetch",
                  "idx_tup_read":"Tup Read",
                  "increment_by":"Increment By",
                  "indexrelid":"Index ID",
                  "indexrelname":"",
                  "last_value":"Last Value",
                  "max_value":"Max",
                  "min_value":"Min",
                  "relid":"Table ID",
                  "relname":"",
                  "schemaname":"Schema",
                  "sequenceowner":"Owner",
                  "start_value":"Start"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Sequence",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":46},
      "id":133,
      "panels":[
        {
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "description":"",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byRegexp","options":"(RT:avg)"},
                "properties":[
                  { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
                  { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                                                                                              }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
              {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
            ]
          },
          "gridPos":{"h":18,"w":24,"x":0,"y":175},
          "id":186,
          "options":{"cellHeight":"sm","enablePagination":true,"showHeader":true,"sortBy":[{"desc":true,"displayName":"RT:avg"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "expr":"",
              "format":"table",
              "group":[],
              "legendFormat":"__auto",
              "metricColumn":"none",
              "range":true,
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname'\nORDER BY total_exec_time DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "blk_read_time":false,
                  "blk_write_time":false,
                  "datname":false,
                  "dbid":true,
                  "local_blks_dirtied":false,
                  "local_blks_hit":false,
                  "local_blks_read":false,
                  "local_blks_written":false,
                  "max_plan_time":false,
                  "mean_plan_time":false,
                  "min_plan_time":false,
                  "plans":false,
                  "queryid":true,
                  "shared_blks_dirtied":false,
                  "shared_blks_hit":false,
                  "shared_blks_read":false,
                  "shared_blks_written":false,
                  "stddev_exec_time":false,
                  "stddev_plan_time":false,
                  "temp_blk_read_time":false,
                  "temp_blk_write_time":false,
                  "temp_blks_read":false,
                  "temp_blks_written":false,
                  "total_plan_time":false,
                  "userid":true
                },
                "includeByName":{},
                "indexByName":{
                  "blk_read_time":34,
                  "blk_write_time":35,
                  "calls":8,
                  "datname":1,
                  "dbid":6,
                  "jit_emission_count":44,
                  "jit_emission_time":45,
                  "jit_functions":38,
                  "jit_generation_time":39,
                  "jit_inlining_count":40,
                  "jit_inlining_time":41,
                  "jit_optimization_count":42,
                  "jit_optimization_time":43,
                  "local_blks_dirtied":30,
                  "local_blks_hit":28,
                  "local_blks_read":29,
                  "local_blks_written":31,
                  "max_exec_time":13,
                  "max_plan_time":20,
                  "mean_exec_time":12,
                  "mean_plan_time":18,
                  "min_exec_time":14,
                  "min_plan_time":19,
                  "plans":16,
                  "qid":2,
                  "query":3,
                  "queryid":7,
                  "rolname":4,
                  "rows":9,
                  "shared_blks_dirtied":26,
                  "shared_blks_hit":24,
                  "shared_blks_read":25,
                  "shared_blks_written":27,
                  "stddev_exec_time":15,
                  "stddev_plan_time":21,
                  "temp_blk_read_time":36,
                  "temp_blk_write_time":37,
                  "temp_blks_read":32,
                  "temp_blks_written":33,
                  "toplevel":0,
                  "total_exec_time":11,
                  "total_plan_time":17,
                  "userid":5,
                  "wal_bytes":10,
                  "wal_fpi":23,
                  "wal_records":22
                },
                "renameByName":{
                  "blk_read_time":"Blk RTime",
                  "blk_write_time":"TBlk WTime",
                  "calls":"Calls",
                  "datname":"Database",
                  "dbid":"DBID",
                  "jit_deform_count":"JitDeformCount",
                  "jit_deform_time":"JitDeformTime",
                  "jit_emission_count":"JIT Emission Count",
                  "jit_emission_time":"JIT Emission Time",
                  "jit_functions":"JIT Functions",
                  "jit_generation_time":"JIT Generate Time",
                  "jit_inlining_count":"JIT Inline Count",
                  "jit_inlining_time":"JIT Inline Time",
                  "jit_optimization_count":"JIT Optimize Count",
                  "jit_optimization_time":"JIT Optimize Time",
                  "local_blk_read_time":"LBlk ReadTime",
                  "local_blk_write_time":"LBlk WriteTime",
                  "local_blks_dirtied":"LBlks Dirty",
                  "local_blks_hit":"LBlks Hit",
                  "local_blks_read":"LBlks Read",
                  "local_blks_written":"LBlks Write",
                  "max_exec_time":"RT:max",
                  "max_plan_time":"Plan:max",
                  "mean_exec_time":"RT:avg",
                  "mean_plan_time":"Plan:avg",
                  "min_exec_time":"RT:min",
                  "min_plan_time":"Plan:min",
                  "minmax_stats_since":"MinMax Since",
                  "parallel_workers_launched":"PW Launched",
                  "parallel_workers_to_launch":"PW2Launch",
                  "plans":"Plan",
                  "qid":"Query",
                  "query":"SQL",
                  "queryid":"QID",
                  "rolname":"User",
                  "rows":"Rows",
                  "shared_blk_read_time":"SBlk ReadTime",
                  "shared_blk_write_time":"SBlk WriteTime",
                  "shared_blks_dirtied":"SBlks Dirty",
                  "shared_blks_hit":"SBlks Hit",
                  "shared_blks_read":"SBlks Read",
                  "shared_blks_written":"SBlks Write",
                  "stats_since":"Stat Since",
                  "stddev_exec_time":"RT:\u03c3",
                  "stddev_plan_time":"Plan:\u03c3",
                  "temp_blk_read_time":"TBlk RTime",
                  "temp_blk_write_time":"TBlk WTime",
                  "temp_blks_read":"TBlks Read",
                  "temp_blks_written":"TBlks Write",
                  "toplevel":"Top",
                  "total_exec_time":"Time",
                  "total_plan_time":"Plan:sum",
                  "userid":"UserID",
                  "wal_buffers_full":"WAL BufsFull",
                  "wal_bytes":"WAL",
                  "wal_fpi":"WAL FPIs",
                  "wal_records":"WAL Recs"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Query",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":47},
      "id":206,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"pg_stat_statements of database ${datname}",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byRegexp","options":"(RT:avg)"},
                "properties":[
                  { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
                  { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                                                                                              }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
              {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
              {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
            ]
          },
          "gridPos":{"h":14,"w":15,"x":0,"y":176},
          "id":207,
          "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"Calls"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "expr":"",
              "format":"table",
              "group":[],
              "legendFormat":"__auto",
              "metricColumn":"none",
              "range":true,
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND calls > 0\nORDER BY calls DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by Calls",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "blk_read_time":true,
                  "blk_write_time":true,
                  "datname":true,
                  "dbid":true,
                  "jit_deform_count":true,
                  "jit_deform_time":true,
                  "jit_emission_count":true,
                  "jit_emission_time":true,
                  "jit_functions":true,
                  "jit_generation_time":true,
                  "jit_inlining_count":true,
                  "jit_inlining_time":true,
                  "jit_optimization_count":true,
                  "jit_optimization_time":true,
                  "local_blk_read_time":true,
                  "local_blk_write_time":true,
                  "local_blks_dirtied":true,
                  "local_blks_hit":true,
                  "local_blks_read":true,
                  "local_blks_written":true,
                  "max_plan_time":true,
                  "mean_plan_time":true,
                  "min_plan_time":true,
                  "minmax_stats_since":true,
                  "parallel_workers_launched":true,
                  "parallel_workers_to_launch":true,
                  "plans":false,
                  "query":false,
                  "queryid":true,
                  "shared_blk_read_time":true,
                  "shared_blk_write_time":true,
                  "shared_blks_dirtied":true,
                  "shared_blks_hit":true,
                  "shared_blks_read":true,
                  "shared_blks_written":true,
                  "stddev_exec_time":false,
                  "stddev_plan_time":true,
                  "temp_blk_read_time":true,
                  "temp_blk_write_time":true,
                  "temp_blks_read":true,
                  "temp_blks_written":true,
                  "total_plan_time":true,
                  "userid":true,
                  "wal_buffers_full":true,
                  "wal_fpi":false,
                  "wal_records":false
                },
                "includeByName":{},
                "indexByName":{
                  "blk_read_time":34,
                  "blk_write_time":35,
                  "calls":8,
                  "datname":1,
                  "dbid":6,
                  "jit_emission_count":44,
                  "jit_emission_time":45,
                  "jit_functions":38,
                  "jit_generation_time":39,
                  "jit_inlining_count":40,
                  "jit_inlining_time":41,
                  "jit_optimization_count":42,
                  "jit_optimization_time":43,
                  "local_blks_dirtied":30,
                  "local_blks_hit":28,
                  "local_blks_read":29,
                  "local_blks_written":31,
                  "max_exec_time":13,
                  "max_plan_time":20,
                  "mean_exec_time":12,
                  "mean_plan_time":18,
                  "min_exec_time":14,
                  "min_plan_time":19,
                  "plans":16,
                  "qid":2,
                  "query":3,
                  "queryid":7,
                  "rolname":4,
                  "rows":9,
                  "shared_blks_dirtied":26,
                  "shared_blks_hit":24,
                  "shared_blks_read":25,
                  "shared_blks_written":27,
                  "stddev_exec_time":15,
                  "stddev_plan_time":21,
                  "temp_blk_read_time":36,
                  "temp_blk_write_time":37,
                  "temp_blks_read":32,
                  "temp_blks_written":33,
                  "toplevel":0,
                  "total_exec_time":11,
                  "total_plan_time":17,
                  "userid":5,
                  "wal_bytes":10,
                  "wal_fpi":23,
                  "wal_records":22
                },
                "renameByName":{
                  "blk_read_time":"Blk RTime",
                  "blk_write_time":"TBlk WTime",
                  "calls":"Calls",
                  "datname":"Database",
                  "dbid":"DBID",
                  "jit_emission_count":"JIT Emission Count",
                  "jit_emission_time":"JIT Emission Time",
                  "jit_functions":"JIT Functions",
                  "jit_generation_time":"JIT Generate Time",
                  "jit_inlining_count":"JIT Inline Count",
                  "jit_inlining_time":"JIT Inline Time",
                  "jit_optimization_count":"JIT Optimize Count",
                  "jit_optimization_time":"JIT Optimize Time",
                  "local_blks_dirtied":"LBlks Dirty",
                  "local_blks_hit":"LBlks Hit",
                  "local_blks_read":"LBlks Read",
                  "local_blks_written":"LBlks Write",
                  "max_exec_time":"RT:max",
                  "max_plan_time":"Plan:max",
                  "mean_exec_time":"RT:avg",
                  "mean_plan_time":"Plan:avg",
                  "min_exec_time":"RT:min",
                  "min_plan_time":"Plan:min",
                  "plans":"Plan",
                  "qid":"Query",
                  "query":"SQL",
                  "queryid":"QID",
                  "rolname":"User",
                  "rows":"Rows",
                  "shared_blks_dirtied":"SBlks Dirty",
                  "shared_blks_hit":"SBlks Hit",
                  "shared_blks_read":"SBlks Read",
                  "shared_blks_written":"SBlks Write",
                  "stats_since":"Since",
                  "stddev_exec_time":"RT:\u03c3",
                  "stddev_plan_time":"Plan:\u03c3",
                  "temp_blk_read_time":"TBlk RTime",
                  "temp_blk_write_time":"TBlk WTime",
                  "temp_blks_read":"TBlks Read",
                  "temp_blks_written":"TBlks Write",
                  "toplevel":"Top",
                  "total_exec_time":"Time",
                  "total_plan_time":"Plan:sum",
                  "userid":"UserID",
                  "wal_bytes":"WAL",
                  "wal_fpi":"WAL FPIs",
                  "wal_records":"WAL Recs"
                }
              }
            }
          ],
          "type":"table"
        },
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"Colored by RT",
          "fieldConfig":{
            "defaults":{
              "color":{"mode":"thresholds"},
              "links":[{"title":"PGCAT Query : ${__data.fields.qid}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.qid}"},{"title":"PGSQL Query : ${__data.fields.qid}","url":"/d/pgsql-query?var-ins=$ins&var-datname=$datname&var-query=${__data.fields.qid}&${__url_time_range}"}],
              "mappings":[],
              "thresholds":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"super-light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#EAB839","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"text","value":600000}]},
              "unit":"locale"
            },
            "overrides":[{"matcher":{"id":"byName","options":"qid"},"properties":[{"id":"unit","value":"string"}]},{"matcher":{"id":"byName","options":"value"},"properties":[{"id":"unit","value":"short"}]},{"matcher":{"id":"byName","options":"rt"},"properties":[{"id":"unit","value":"ms"}]}]
          },
          "gridPos":{"h":14,"w":9,"x":15,"y":176},
          "id":208,
          "options":{"colorByField":"rt","colorField":"rt","groupByField":"rolname","labelFields":["datname","rolname"],"sizeField":"value","textField":"qid","tiling":"treemapSquarify"},
          "pluginVersion":"2.1.1",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"cc8a3615-9c82-44d7-be42-07d8aa1cac68"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.calls AS value, s.mean_exec_time AS rt\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND calls > 0\nORDER BY calls DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["video_duration"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "table":"predefined_message_translations1",
              "timeColumn":"created_time",
              "timeColumnType":"timestamp",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by Calls",
          "type":"marcusolsson-treemap-panel"
        }
      ],
      "title":"SQL by Calls",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":48},
      "id":205,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"pg_stat_statements of database ${datname}",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byRegexp","options":"(RT:avg)"},
                "properties":[
                  { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
                  { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                                                                                              }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
              {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
              {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
            ]
          },
          "gridPos":{"h":14,"w":15,"x":0,"y":177},
          "id":209,
          "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"Rows"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "expr":"",
              "format":"table",
              "group":[],
              "legendFormat":"__auto",
              "metricColumn":"none",
              "range":true,
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND rows > 0\nORDER BY rows DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by Rows",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "blk_read_time":true,
                  "blk_write_time":true,
                  "datname":true,
                  "dbid":true,
                  "jit_deform_count":true,
                  "jit_deform_time":true,
                  "jit_emission_count":true,
                  "jit_emission_time":true,
                  "jit_functions":true,
                  "jit_generation_time":true,
                  "jit_inlining_count":true,
                  "jit_inlining_time":true,
                  "jit_optimization_count":true,
                  "jit_optimization_time":true,
                  "local_blk_read_time":true,
                  "local_blk_write_time":true,
                  "local_blks_dirtied":true,
                  "local_blks_hit":true,
                  "local_blks_read":true,
                  "local_blks_written":true,
                  "max_plan_time":true,
                  "mean_plan_time":true,
                  "min_plan_time":true,
                  "minmax_stats_since":true,
                  "parallel_workers_launched":true,
                  "parallel_workers_to_launch":true,
                  "plans":false,
                  "query":false,
                  "queryid":true,
                  "shared_blk_read_time":true,
                  "shared_blk_write_time":true,
                  "shared_blks_dirtied":true,
                  "shared_blks_hit":true,
                  "shared_blks_read":true,
                  "shared_blks_written":true,
                  "stddev_exec_time":false,
                  "stddev_plan_time":true,
                  "temp_blk_read_time":true,
                  "temp_blk_write_time":true,
                  "temp_blks_read":true,
                  "temp_blks_written":true,
                  "total_plan_time":true,
                  "userid":true,
                  "wal_buffers_full":true,
                  "wal_fpi":false,
                  "wal_records":false
                },
                "includeByName":{},
                "indexByName":{
                  "blk_read_time":34,
                  "blk_write_time":35,
                  "calls":8,
                  "datname":1,
                  "dbid":6,
                  "jit_emission_count":44,
                  "jit_emission_time":45,
                  "jit_functions":38,
                  "jit_generation_time":39,
                  "jit_inlining_count":40,
                  "jit_inlining_time":41,
                  "jit_optimization_count":42,
                  "jit_optimization_time":43,
                  "local_blks_dirtied":30,
                  "local_blks_hit":28,
                  "local_blks_read":29,
                  "local_blks_written":31,
                  "max_exec_time":13,
                  "max_plan_time":20,
                  "mean_exec_time":12,
                  "mean_plan_time":18,
                  "min_exec_time":14,
                  "min_plan_time":19,
                  "plans":16,
                  "qid":2,
                  "query":3,
                  "queryid":7,
                  "rolname":4,
                  "rows":9,
                  "shared_blks_dirtied":26,
                  "shared_blks_hit":24,
                  "shared_blks_read":25,
                  "shared_blks_written":27,
                  "stddev_exec_time":15,
                  "stddev_plan_time":21,
                  "temp_blk_read_time":36,
                  "temp_blk_write_time":37,
                  "temp_blks_read":32,
                  "temp_blks_written":33,
                  "toplevel":0,
                  "total_exec_time":11,
                  "total_plan_time":17,
                  "userid":5,
                  "wal_bytes":10,
                  "wal_fpi":23,
                  "wal_records":22
                },
                "renameByName":{
                  "blk_read_time":"Blk RTime",
                  "blk_write_time":"TBlk WTime",
                  "calls":"Calls",
                  "datname":"Database",
                  "dbid":"DBID",
                  "jit_emission_count":"JIT Emission Count",
                  "jit_emission_time":"JIT Emission Time",
                  "jit_functions":"JIT Functions",
                  "jit_generation_time":"JIT Generate Time",
                  "jit_inlining_count":"JIT Inline Count",
                  "jit_inlining_time":"JIT Inline Time",
                  "jit_optimization_count":"JIT Optimize Count",
                  "jit_optimization_time":"JIT Optimize Time",
                  "local_blks_dirtied":"LBlks Dirty",
                  "local_blks_hit":"LBlks Hit",
                  "local_blks_read":"LBlks Read",
                  "local_blks_written":"LBlks Write",
                  "max_exec_time":"RT:max",
                  "max_plan_time":"Plan:max",
                  "mean_exec_time":"RT:avg",
                  "mean_plan_time":"Plan:avg",
                  "min_exec_time":"RT:min",
                  "min_plan_time":"Plan:min",
                  "plans":"Plan",
                  "qid":"Query",
                  "query":"SQL",
                  "queryid":"QID",
                  "rolname":"User",
                  "rows":"Rows",
                  "shared_blks_dirtied":"SBlks Dirty",
                  "shared_blks_hit":"SBlks Hit",
                  "shared_blks_read":"SBlks Read",
                  "shared_blks_written":"SBlks Write",
                  "stats_since":"Since",
                  "stddev_exec_time":"RT:\u03c3",
                  "stddev_plan_time":"Plan:\u03c3",
                  "temp_blk_read_time":"TBlk RTime",
                  "temp_blk_write_time":"TBlk WTime",
                  "temp_blks_read":"TBlks Read",
                  "temp_blks_written":"TBlks Write",
                  "toplevel":"Top",
                  "total_exec_time":"Time",
                  "total_plan_time":"Plan:sum",
                  "userid":"UserID",
                  "wal_bytes":"WAL",
                  "wal_fpi":"WAL FPIs",
                  "wal_records":"WAL Recs"
                }
              }
            }
          ],
          "type":"table"
        },
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"Colored by RT",
          "fieldConfig":{
            "defaults":{
              "color":{"mode":"thresholds"},
              "links":[{"title":"PGCAT Query : ${__data.fields.qid}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.qid}"},{"title":"PGSQL Query : ${__data.fields.qid}","url":"/d/pgsql-query?var-ins=$ins&var-datname=$datname&var-query=${__data.fields.qid}&${__url_time_range}"}],
              "mappings":[],
              "thresholds":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"super-light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#EAB839","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"text","value":600000}]},
              "unit":"locale"
            },
            "overrides":[{"matcher":{"id":"byName","options":"qid"},"properties":[{"id":"unit","value":"string"}]},{"matcher":{"id":"byName","options":"value"},"properties":[{"id":"unit","value":"short"}]},{"matcher":{"id":"byName","options":"rt"},"properties":[{"id":"unit","value":"ms"}]}]
          },
          "gridPos":{"h":14,"w":9,"x":15,"y":177},
          "id":210,
          "options":{"colorByField":"rt","colorField":"rt","groupByField":"rolname","labelFields":["datname","rolname"],"sizeField":"value","textField":"qid","tiling":"treemapSquarify"},
          "pluginVersion":"2.1.1",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"cc8a3615-9c82-44d7-be42-07d8aa1cac68"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.rows AS value, s.mean_exec_time AS rt\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND rows > 0\nORDER BY calls DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["video_duration"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "table":"predefined_message_translations1",
              "timeColumn":"created_time",
              "timeColumnType":"timestamp",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by Rows",
          "type":"marcusolsson-treemap-panel"
        }
      ],
      "title":"SQL by Rows",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":49},
      "id":204,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"pg_stat_statements of database ${datname}",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byRegexp","options":"(RT:avg)"},
                "properties":[
                  { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
                  { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                                                                                              }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
              {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
              {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
            ]
          },
          "gridPos":{"h":14,"w":15,"x":0,"y":192},
          "id":211,
          "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"Time"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "expr":"",
              "format":"table",
              "group":[],
              "legendFormat":"__auto",
              "metricColumn":"none",
              "range":true,
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND total_exec_time > 0\nORDER BY total_exec_time DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by Time",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "blk_read_time":true,
                  "blk_write_time":true,
                  "datname":true,
                  "dbid":true,
                  "jit_deform_count":true,
                  "jit_deform_time":true,
                  "jit_emission_count":true,
                  "jit_emission_time":true,
                  "jit_functions":true,
                  "jit_generation_time":true,
                  "jit_inlining_count":true,
                  "jit_inlining_time":true,
                  "jit_optimization_count":true,
                  "jit_optimization_time":true,
                  "local_blk_read_time":true,
                  "local_blk_write_time":true,
                  "local_blks_dirtied":true,
                  "local_blks_hit":true,
                  "local_blks_read":true,
                  "local_blks_written":true,
                  "max_plan_time":true,
                  "mean_plan_time":true,
                  "min_plan_time":true,
                  "minmax_stats_since":true,
                  "parallel_workers_launched":true,
                  "parallel_workers_to_launch":true,
                  "plans":false,
                  "query":false,
                  "queryid":true,
                  "shared_blk_read_time":true,
                  "shared_blk_write_time":true,
                  "shared_blks_dirtied":true,
                  "shared_blks_hit":true,
                  "shared_blks_read":true,
                  "shared_blks_written":true,
                  "stddev_exec_time":false,
                  "stddev_plan_time":true,
                  "temp_blk_read_time":true,
                  "temp_blk_write_time":true,
                  "temp_blks_read":true,
                  "temp_blks_written":true,
                  "total_plan_time":true,
                  "userid":true,
                  "wal_buffers_full":true,
                  "wal_fpi":false,
                  "wal_records":false
                },
                "includeByName":{},
                "indexByName":{
                  "blk_read_time":34,
                  "blk_write_time":35,
                  "calls":8,
                  "datname":1,
                  "dbid":6,
                  "jit_emission_count":44,
                  "jit_emission_time":45,
                  "jit_functions":38,
                  "jit_generation_time":39,
                  "jit_inlining_count":40,
                  "jit_inlining_time":41,
                  "jit_optimization_count":42,
                  "jit_optimization_time":43,
                  "local_blks_dirtied":30,
                  "local_blks_hit":28,
                  "local_blks_read":29,
                  "local_blks_written":31,
                  "max_exec_time":13,
                  "max_plan_time":20,
                  "mean_exec_time":12,
                  "mean_plan_time":18,
                  "min_exec_time":14,
                  "min_plan_time":19,
                  "plans":16,
                  "qid":2,
                  "query":3,
                  "queryid":7,
                  "rolname":4,
                  "rows":9,
                  "shared_blks_dirtied":26,
                  "shared_blks_hit":24,
                  "shared_blks_read":25,
                  "shared_blks_written":27,
                  "stddev_exec_time":15,
                  "stddev_plan_time":21,
                  "temp_blk_read_time":36,
                  "temp_blk_write_time":37,
                  "temp_blks_read":32,
                  "temp_blks_written":33,
                  "toplevel":0,
                  "total_exec_time":11,
                  "total_plan_time":17,
                  "userid":5,
                  "wal_bytes":10,
                  "wal_fpi":23,
                  "wal_records":22
                },
                "renameByName":{
                  "blk_read_time":"Blk RTime",
                  "blk_write_time":"TBlk WTime",
                  "calls":"Calls",
                  "datname":"Database",
                  "dbid":"DBID",
                  "jit_emission_count":"JIT Emission Count",
                  "jit_emission_time":"JIT Emission Time",
                  "jit_functions":"JIT Functions",
                  "jit_generation_time":"JIT Generate Time",
                  "jit_inlining_count":"JIT Inline Count",
                  "jit_inlining_time":"JIT Inline Time",
                  "jit_optimization_count":"JIT Optimize Count",
                  "jit_optimization_time":"JIT Optimize Time",
                  "local_blks_dirtied":"LBlks Dirty",
                  "local_blks_hit":"LBlks Hit",
                  "local_blks_read":"LBlks Read",
                  "local_blks_written":"LBlks Write",
                  "max_exec_time":"RT:max",
                  "max_plan_time":"Plan:max",
                  "mean_exec_time":"RT:avg",
                  "mean_plan_time":"Plan:avg",
                  "min_exec_time":"RT:min",
                  "min_plan_time":"Plan:min",
                  "plans":"Plan",
                  "qid":"Query",
                  "query":"SQL",
                  "queryid":"QID",
                  "rolname":"User",
                  "rows":"Rows",
                  "shared_blks_dirtied":"SBlks Dirty",
                  "shared_blks_hit":"SBlks Hit",
                  "shared_blks_read":"SBlks Read",
                  "shared_blks_written":"SBlks Write",
                  "stats_since":"Since",
                  "stddev_exec_time":"RT:\u03c3",
                  "stddev_plan_time":"Plan:\u03c3",
                  "temp_blk_read_time":"TBlk RTime",
                  "temp_blk_write_time":"TBlk WTime",
                  "temp_blks_read":"TBlks Read",
                  "temp_blks_written":"TBlks Write",
                  "toplevel":"Top",
                  "total_exec_time":"Time",
                  "total_plan_time":"Plan:sum",
                  "userid":"UserID",
                  "wal_bytes":"WAL",
                  "wal_fpi":"WAL FPIs",
                  "wal_records":"WAL Recs"
                }
              }
            }
          ],
          "type":"table"
        },
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"Colored by RT",
          "fieldConfig":{
            "defaults":{
              "color":{"mode":"thresholds"},
              "links":[{"title":"PGCAT Query : ${__data.fields.qid}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.qid}"},{"title":"PGSQL Query : ${__data.fields.qid}","url":"/d/pgsql-query?var-ins=$ins&var-datname=$datname&var-query=${__data.fields.qid}&${__url_time_range}"}],
              "mappings":[],
              "thresholds":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"super-light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#EAB839","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"text","value":600000}]},
              "unit":"locale"
            },
            "overrides":[{"matcher":{"id":"byName","options":"qid"},"properties":[{"id":"unit","value":"string"}]},{"matcher":{"id":"byName","options":"value"},"properties":[{"id":"unit","value":"ms"}]},{"matcher":{"id":"byName","options":"rt"},"properties":[{"id":"unit","value":"ms"}]}]
          },
          "gridPos":{"h":14,"w":9,"x":15,"y":192},
          "id":212,
          "options":{"colorByField":"rt","colorField":"rt","groupByField":"rolname","labelFields":["datname","rolname"],"sizeField":"value","textField":"qid","tiling":"treemapSquarify"},
          "pluginVersion":"2.1.1",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"cc8a3615-9c82-44d7-be42-07d8aa1cac68"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.total_exec_time AS value, s.mean_exec_time AS rt\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND total_exec_time > 0\nORDER BY total_exec_time DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["video_duration"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "table":"predefined_message_translations1",
              "timeColumn":"created_time",
              "timeColumnType":"timestamp",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by Time",
          "type":"marcusolsson-treemap-panel"
        }
      ],
      "title":"SQL by Time",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":50},
      "id":203,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"pg_stat_statements of database ${datname}",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byRegexp","options":"(RT:avg)"},
                "properties":[
                  { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
                  { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                                                                                              }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
              {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
              {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
            ]
          },
          "gridPos":{"h":14,"w":15,"x":0,"y":447},
          "id":213,
          "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"WAL"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "expr":"",
              "format":"table",
              "group":[],
              "legendFormat":"__auto",
              "metricColumn":"none",
              "range":true,
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND wal_bytes > 0\nORDER BY wal_bytes DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by WAL",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "blk_read_time":true,
                  "blk_write_time":true,
                  "datname":true,
                  "dbid":true,
                  "jit_emission_count":true,
                  "jit_emission_time":true,
                  "jit_functions":true,
                  "jit_generation_time":true,
                  "jit_inlining_count":true,
                  "jit_inlining_time":true,
                  "jit_optimization_count":true,
                  "jit_optimization_time":true,
                  "local_blks_dirtied":true,
                  "local_blks_hit":true,
                  "local_blks_read":true,
                  "local_blks_written":true,
                  "max_plan_time":true,
                  "mean_plan_time":true,
                  "min_plan_time":true,
                  "plans":false,
                  "query":false,
                  "queryid":true,
                  "shared_blks_dirtied":true,
                  "shared_blks_hit":true,
                  "shared_blks_read":true,
                  "shared_blks_written":true,
                  "stddev_exec_time":false,
                  "stddev_plan_time":true,
                  "temp_blk_read_time":true,
                  "temp_blk_write_time":true,
                  "temp_blks_read":true,
                  "temp_blks_written":true,
                  "total_plan_time":true,
                  "userid":true,
                  "wal_fpi":false,
                  "wal_records":false
                },
                "indexByName":{
                  "blk_read_time":34,
                  "blk_write_time":35,
                  "calls":11,
                  "datname":1,
                  "dbid":6,
                  "jit_emission_count":44,
                  "jit_emission_time":45,
                  "jit_functions":38,
                  "jit_generation_time":39,
                  "jit_inlining_count":40,
                  "jit_inlining_time":41,
                  "jit_optimization_count":42,
                  "jit_optimization_time":43,
                  "local_blks_dirtied":30,
                  "local_blks_hit":28,
                  "local_blks_read":29,
                  "local_blks_written":31,
                  "max_exec_time":15,
                  "max_plan_time":22,
                  "mean_exec_time":14,
                  "mean_plan_time":20,
                  "min_exec_time":16,
                  "min_plan_time":21,
                  "plans":18,
                  "qid":2,
                  "query":3,
                  "queryid":7,
                  "rolname":4,
                  "rows":12,
                  "shared_blks_dirtied":26,
                  "shared_blks_hit":24,
                  "shared_blks_read":25,
                  "shared_blks_written":27,
                  "stddev_exec_time":17,
                  "stddev_plan_time":23,
                  "temp_blk_read_time":36,
                  "temp_blk_write_time":37,
                  "temp_blks_read":32,
                  "temp_blks_written":33,
                  "toplevel":0,
                  "total_exec_time":13,
                  "total_plan_time":19,
                  "userid":5,
                  "wal_bytes":8,
                  "wal_fpi":9,
                  "wal_records":10
                },
                "renameByName":{
                  "blk_read_time":"Blk RTime",
                  "blk_write_time":"TBlk WTime",
                  "calls":"Calls",
                  "datname":"Database",
                  "dbid":"DBID",
                  "jit_emission_count":"JIT Emission Count",
                  "jit_emission_time":"JIT Emission Time",
                  "jit_functions":"JIT Functions",
                  "jit_generation_time":"JIT Generate Time",
                  "jit_inlining_count":"JIT Inline Count",
                  "jit_inlining_time":"JIT Inline Time",
                  "jit_optimization_count":"JIT Optimize Count",
                  "jit_optimization_time":"JIT Optimize Time",
                  "local_blks_dirtied":"LBlks Dirty",
                  "local_blks_hit":"LBlks Hit",
                  "local_blks_read":"LBlks Read",
                  "local_blks_written":"LBlks Write",
                  "max_exec_time":"RT:max",
                  "max_plan_time":"Plan:max",
                  "mean_exec_time":"RT:avg",
                  "mean_plan_time":"Plan:avg",
                  "min_exec_time":"RT:min",
                  "min_plan_time":"Plan:min",
                  "plans":"Plan",
                  "qid":"Query",
                  "query":"SQL",
                  "queryid":"QID",
                  "rolname":"User",
                  "rows":"Rows",
                  "shared_blks_dirtied":"SBlks Dirty",
                  "shared_blks_hit":"SBlks Hit",
                  "shared_blks_read":"SBlks Read",
                  "shared_blks_written":"SBlks Write",
                  "stddev_exec_time":"RT:\u03c3",
                  "stddev_plan_time":"Plan:\u03c3",
                  "temp_blk_read_time":"TBlk RTime",
                  "temp_blk_write_time":"TBlk WTime",
                  "temp_blks_read":"TBlks Read",
                  "temp_blks_written":"TBlks Write",
                  "toplevel":"Top",
                  "total_exec_time":"Time",
                  "total_plan_time":"Plan:sum",
                  "userid":"UserID",
                  "wal_bytes":"WAL",
                  "wal_fpi":"WAL FPIs",
                  "wal_records":"WAL Recs"
                }
              }
            }
          ],
          "type":"table"
        },
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"Colored by RT",
          "fieldConfig":{
            "defaults":{
              "color":{"mode":"thresholds"},
              "links":[{"title":"PGCAT Query : ${__data.fields.qid}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.qid}"},{"title":"PGSQL Query : ${__data.fields.qid}","url":"/d/pgsql-query?var-ins=$ins&var-datname=$datname&var-query=${__data.fields.qid}&${__url_time_range}"}],
              "mappings":[],
              "thresholds":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"super-light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#EAB839","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"text","value":600000}]},
              "unit":"ms"
            },
            "overrides":[{"matcher":{"id":"byName","options":"qid"},"properties":[{"id":"unit","value":"string"}]},{"matcher":{"id":"byName","options":"value"},"properties":[{"id":"unit","value":"bytes"}]},{"matcher":{"id":"byName","options":"rt"},"properties":[{"id":"unit","value":"ms"}]}]
          },
          "gridPos":{"h":14,"w":9,"x":15,"y":447},
          "id":214,
          "options":{"colorByField":"rt","colorField":"rt","groupByField":"rolname","labelFields":["datname","rolname"],"sizeField":"value","textField":"qid","tiling":"treemapSquarify"},
          "pluginVersion":"2.1.1",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"cc8a3615-9c82-44d7-be42-07d8aa1cac68"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.wal_bytes AS value, s.mean_exec_time AS rt\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' AND wal_bytes > 0\nORDER BY wal_bytes DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["video_duration"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "table":"predefined_message_translations1",
              "timeColumn":"created_time",
              "timeColumnType":"timestamp",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by WAL",
          "type":"marcusolsson-treemap-panel"
        }
      ],
      "title":"SQL by WAL",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":51},
      "id":202,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"pg_stat_statements of database ${datname}",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byRegexp","options":"(RT:avg)"},
                "properties":[
                  { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
                  { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} },
                  { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                                                                                              }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
              {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}}]},
              {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
              {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
            ]
          },
          "gridPos":{"h":14,"w":24,"x":0,"y":129},
          "id":215,
          "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"WAL"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "expr":"",
              "format":"table",
              "group":[],
              "legendFormat":"__auto",
              "metricColumn":"none",
              "range":true,
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE queryid IN (SELECT queryid FROM pg_stat_statements GROUP BY queryid HAVING count(*) > 1)\nLIMIT 100;\n",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"SQL by Duplication",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "blk_read_time":true,
                  "blk_write_time":true,
                  "datname":false,
                  "dbid":true,
                  "jit_deform_count":true,
                  "jit_deform_time":true,
                  "jit_emission_count":true,
                  "jit_emission_time":true,
                  "jit_functions":true,
                  "jit_generation_time":true,
                  "jit_inlining_count":true,
                  "jit_inlining_time":true,
                  "jit_optimization_count":true,
                  "jit_optimization_time":true,
                  "local_blk_read_time":true,
                  "local_blk_write_time":true,
                  "local_blks_dirtied":true,
                  "local_blks_hit":true,
                  "local_blks_read":true,
                  "local_blks_written":true,
                  "max_plan_time":true,
                  "mean_plan_time":true,
                  "min_plan_time":true,
                  "minmax_stats_since":true,
                  "parallel_workers_launched":true,
                  "parallel_workers_to_launch":true,
                  "plans":false,
                  "query":false,
                  "queryid":true,
                  "shared_blk_read_time":true,
                  "shared_blk_write_time":true,
                  "shared_blks_dirtied":true,
                  "shared_blks_hit":true,
                  "shared_blks_read":true,
                  "shared_blks_written":true,
                  "stddev_exec_time":false,
                  "stddev_plan_time":true,
                  "temp_blk_read_time":true,
                  "temp_blk_write_time":true,
                  "temp_blks_read":true,
                  "temp_blks_written":true,
                  "total_plan_time":true,
                  "userid":true,
                  "wal_buffers_full":true,
                  "wal_fpi":false,
                  "wal_records":false
                },
                "includeByName":{},
                "indexByName":{
                  "blk_read_time":34,
                  "blk_write_time":35,
                  "calls":11,
                  "datname":1,
                  "dbid":6,
                  "jit_emission_count":44,
                  "jit_emission_time":45,
                  "jit_functions":38,
                  "jit_generation_time":39,
                  "jit_inlining_count":40,
                  "jit_inlining_time":41,
                  "jit_optimization_count":42,
                  "jit_optimization_time":43,
                  "local_blks_dirtied":30,
                  "local_blks_hit":28,
                  "local_blks_read":29,
                  "local_blks_written":31,
                  "max_exec_time":15,
                  "max_plan_time":22,
                  "mean_exec_time":14,
                  "mean_plan_time":20,
                  "min_exec_time":16,
                  "min_plan_time":21,
                  "plans":18,
                  "qid":2,
                  "query":3,
                  "queryid":7,
                  "rolname":4,
                  "rows":12,
                  "shared_blks_dirtied":26,
                  "shared_blks_hit":24,
                  "shared_blks_read":25,
                  "shared_blks_written":27,
                  "stddev_exec_time":17,
                  "stddev_plan_time":23,
                  "temp_blk_read_time":36,
                  "temp_blk_write_time":37,
                  "temp_blks_read":32,
                  "temp_blks_written":33,
                  "toplevel":0,
                  "total_exec_time":13,
                  "total_plan_time":19,
                  "userid":5,
                  "wal_bytes":8,
                  "wal_fpi":9,
                  "wal_records":10
                },
                "renameByName":{
                  "blk_read_time":"Blk RTime",
                  "blk_write_time":"TBlk WTime",
                  "calls":"Calls",
                  "datname":"Database",
                  "dbid":"DBID",
                  "jit_emission_count":"JIT Emission Count",
                  "jit_emission_time":"JIT Emission Time",
                  "jit_functions":"JIT Functions",
                  "jit_generation_time":"JIT Generate Time",
                  "jit_inlining_count":"JIT Inline Count",
                  "jit_inlining_time":"JIT Inline Time",
                  "jit_optimization_count":"JIT Optimize Count",
                  "jit_optimization_time":"JIT Optimize Time",
                  "local_blks_dirtied":"LBlks Dirty",
                  "local_blks_hit":"LBlks Hit",
                  "local_blks_read":"LBlks Read",
                  "local_blks_written":"LBlks Write",
                  "max_exec_time":"RT:max",
                  "max_plan_time":"Plan:max",
                  "mean_exec_time":"RT:avg",
                  "mean_plan_time":"Plan:avg",
                  "min_exec_time":"RT:min",
                  "min_plan_time":"Plan:min",
                  "plans":"Plan",
                  "qid":"Query",
                  "query":"SQL",
                  "queryid":"QID",
                  "rolname":"User",
                  "rows":"Rows",
                  "shared_blks_dirtied":"SBlks Dirty",
                  "shared_blks_hit":"SBlks Hit",
                  "shared_blks_read":"SBlks Read",
                  "shared_blks_written":"SBlks Write",
                  "stats_since":"Since",
                  "stddev_exec_time":"RT:\u03c3",
                  "stddev_plan_time":"Plan:\u03c3",
                  "temp_blk_read_time":"TBlk RTime",
                  "temp_blk_write_time":"TBlk WTime",
                  "temp_blks_read":"TBlks Read",
                  "temp_blks_written":"TBlks Write",
                  "toplevel":"Top",
                  "total_exec_time":"Time",
                  "total_plan_time":"Plan:sum",
                  "userid":"UserID",
                  "wal_bytes":"WAL",
                  "wal_fpi":"WAL FPIs",
                  "wal_records":"WAL Recs"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"SQL by Dupe",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":52},
      "id":98,
      "panels":[
        {
          "datasource":{"uid":"${dsn}"},
          "fieldConfig":{
            "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byName","options":"Retained"},
                "properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#f79f64","value":1000000000},{"color":"red","value":100000000000}]}},{"id":"unit","value":"decbytes"},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
              },
              {"matcher":{"id":"byName","options":"Active"},"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"Inactive"},"true":{"color":"#346f36cc","index":1,"text":"Active"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Temporary"},"properties":[{"id":"custom.width","value":100},{"id":"mappings","value":[{"options":{"false":{"color":"#346f36cc","index":0,"text":"Permanent"},"true":{"color":"#f79f64","index":1,"text":"Temporary"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {
                "matcher":{"id":"byName","options":"Status"},
                "properties":[
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                                                                           },
                  { "id":"mappings"          ,"value":[{"options":{"-1":{"color":"rgba(128, 128, 128, 1)","index":4,"text":"Unknown"},"0":{"color":"#346f36cc","index":0,"text":"Reserved"},"1":{"color":"#fcdb72","index":1,"text":"Extended"},"2":{"color":"#f79f64","index":2,"text":"Unreserved"},"3":{"color":"red","index":3,"text":"Lost"}},"type":"value"}] },
                  { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                                                                                 }
                ]
              },
              {"matcher":{"id":"byName","options":"Restart LSN"},"properties":[{"id":"unit","value":"hex"},{"id":"custom.width","value":126}]},{"matcher":{"id":"byName","options":"PID"},"properties":[{"id":"custom.width","value":70}]},{"matcher":{"id":"byName","options":"XMIN"},"properties":[{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byName","options":"Cat XMIN"},"properties":[{"id":"custom.width","value":100}]},{"matcher":{"id":"byName","options":"Restart LSN"},"properties":[{"id":"custom.width","value":130}]},{"matcher":{"id":"byName","options":"Confirmed"},"properties":[{"id":"custom.width","value":130}]},
              {"matcher":{"id":"byName","options":"Safe Size"},"properties":[{"id":"custom.width","value":75},{"id":"unit","value":"decbytes"}]}
            ]
          },
          "gridPos":{"h":6,"w":24,"x":0,"y":477},
          "id":144,
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT *, \nCASE WHEN pg_is_in_recovery() THEN pg_last_wal_replay_lsn() ELSE pg_current_wal_lsn() END - restart_lsn AS retain \nFROM pg_replication_slots \nWHERE slot_type = 'logical';",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Replication Slots (Logical)",
          "transformations":[
            {"id":"seriesToColumns","options":{"byField":"slot_name"}},
            {
              "id":"organize",
              "options":{
                "excludeByName":{"Time 1":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"datoid":true,"ins":true,"slot_type":false},
                "indexByName":{"active":5,"active_pid":7,"catalog_xmin":9,"confirmed_flush_lsn":11,"database":2,"datoid":14,"plugin":1,"restart_lsn":10,"retain":6,"safe_wal_size":12,"slot_name":0,"slot_type":13,"temporary":4,"wal_status":3,"xmin":8},
                "renameByName":{
                  "Value #A":"Retained",
                  "Value #B":"Active",
                  "Value #C":"Tmp",
                  "Value #D":"Status",
                  "Value #E":"Restart LSN",
                  "active":"Active",
                  "active_pid":"PID",
                  "catalog_xmin":"Cat XMIN",
                  "confirmed_flush_lsn":"Confirmed",
                  "database":"Database",
                  "datoid":"",
                  "ins":"Instance",
                  "plugin":"Plugin",
                  "restart_lsn":"Restart LSN",
                  "retain":"Retained",
                  "safe_wal_size":"Safe Size",
                  "slot_name":"Slot",
                  "slot_type":"Slot Type",
                  "temporary":"Temporary",
                  "wal_status":"Status",
                  "xmin":"XMIN"
                }
              }
            }
          ],
          "type":"table"
        },
        {
          "datasource":{"uid":"${dsn}"},
          "description":"The pg_stat_wal_receiver view will contain only one row, showing statistics about the WAL receiver from that receiver's connected server.",
          "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},"overrides":[]},
          "gridPos":{"h":9,"w":12,"x":0,"y":483},
          "id":147,
          "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{},"textMode":"auto","wideLayout":true},
          "pluginVersion":"12.3.0",
          "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT * FROM pg_stat_subscription;","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
          "title":"Subscription",
          "transformations":[{"id":"organize","options":{"excludeByName":{"conninfo":true},"indexByName":{},"renameByName":{}}}],
          "type":"stat"
        },
        {
          "datasource":{"uid":"${dsn}"},
          "description":"Publication Information",
          "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},"overrides":[]},
          "gridPos":{"h":9,"w":12,"x":12,"y":483},
          "id":148,
          "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{},"textMode":"auto","wideLayout":true},
          "pluginVersion":"12.3.0",
          "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT * FROM pg_publication;","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
          "title":"Publication",
          "transformations":[{"id":"organize","options":{"excludeByName":{"conninfo":true},"indexByName":{},"renameByName":{}}}],
          "type":"stat"
        }
      ],
      "title":"Logical Replication",
      "type":"row"
    }
  ],
  "preload":false,
  "refresh":"",
  "schemaVersion":42,
  "tags":["Pigsty","PGSQL","PGCAT","Database"],
  "templating":{
    "list":[
      { "current":{},                                                                                     "description":"Database Instance"          ,         "includeAll":false,"label":"Data Source","name":"dsn"    ,"options":[],"query":"postgres"             ,"refresh":1,"regex":"/.*\\..*/"           ,"type":"datasource"          },
      { "current":{},"datasource":{"type":"postgres","uid":"${dsn}"},"definition":"SELECT '${dsn:text}';","description":"Instance"                   ,"hide":2,"includeAll":false,"label":"Instance"   ,"name":"ins"    ,"options":[],"query":"SELECT '${dsn:text}';","refresh":2,"regex":"/(\\S+)\\.\\S+/"     ,"type":"query"     ,"sort":1 },
      { "current":{},"datasource":{"type":"postgres","uid":"${dsn}"},"definition":"SELECT '${dsn:text}';","description":"Database name of this table","hide":2,"includeAll":false,"label":"Database"   ,"name":"datname","options":[],"query":"SELECT '${dsn:text}';","refresh":1,"regex":"/\\S+\\.(\\S+)/"     ,"type":"query"               },
      { "current":{},"datasource":{"type":"postgres","uid":"${dsn}"},"definition":"SELECT '${dsn:text}';","description":"Cluster"                    ,"hide":2,"includeAll":false,"label":"Cluster"    ,"name":"cls"    ,"options":[],"query":"SELECT '${dsn:text}';","refresh":2,"regex":"/(\\S+)-\\d+\\.\\S+/","type":"query"     ,"sort":1 }
    ]
  },
  "time":{"from":"now-1h","to":"now"},
  "timepicker":{"refresh_intervals":["2s","3s","5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"]},
  "timezone":"browser",
  "title":"PGCAT Database",
  "uid":"pgcat-database",
  "version":1,
  "weekStart":""
}