Server: localhost:4000 (http)
Request: GET /dashboard/nonode%40nohost/api_repo_info?nav=outliers
** (exit) an exception was raised:
** (Postgrex.Error) ERROR 42703 (undefined_column) column "total_time" does not exist
query: /* 10 queries that have longest execution time in aggregate */
SELECT query AS query,
interval '1 millisecond' * total_time AS exec_time,
(total_time/sum(total_time) OVER()) AS prop_exec_time,
calls,
interval '1 millisecond' * (blk_read_time + blk_write_time) AS sync_io_time
FROM pg_stat_statements WHERE userid = (SELECT usesysid FROM pg_user WHERE usename = current_user LIMIT 1)
ORDER BY total_time DESC
LIMIT 10;
(ecto_sql 3.5.1) lib/ecto/adapters/sql.ex:751: Ecto.Adapters.SQL.raise_sql_call_error/1
(ecto_psql_extras 0.3.2) lib/ecto_psql_extras.ex:53: EctoPSQLExtras.query/3
I would submit a PR but I'm not sure how to detect the PostgreSQL version during a query so total_time
can still be used for versions 12 and lower.