My question is above. How can I calculate the growth of the database between running the script times if I have text fields as a total_size?
I've made a query but it doesn't show the data:
b.snap_id, b.dttm - a.dttm,
(SELECT NULLIF(regexp_replace(snapshots.snap_pg_size_pretty.total_size,'','MB'), '')::numeric as t_db_growth
a.snap_id = $1
AND b.snap_id = $2