Support pg_stat_statements for Postgres v13 and above
[2023-09-28T19:43:39+0000] === Run on 'host': resources/checks/K000_query_analysis.sh ===
psql:<stdin>:45: ERROR: column "total_time" does not exist
LINE 9: total_time,
^
since pg13 pg_stat_statements changed it's format https://www.postgresql.org/docs/13/pgstatstatements.html
there is no filed total_time anymore, it was replaced by total_plan_time and total_exec_time.
So sql query should be updated for versions pg13+
instead of total_time
total_plan_time + total_exec_time as total_time
Edited by Dmitry Fomin