Hello Team
I noticed a high Disk usage and on running an SQL command, I see that pgq.event_6_0 is taking up a lot of space.
Ran the SQL:
SELECT
table_schema || '.' || table_name AS "Table",
pg_size_pretty(total_bytes) AS "Total Size"
FROM (
SELECT
table_name,
table_schema,
pg_total_relation_size(table_schema || '.' || table_name) AS total_bytes
FROM
information_schema.tables
WHERE
table_schema NOT IN ('pg_catalog', 'information_schema')
) AS sizes
ORDER BY
total_bytes DESC;
Result below:
Table | Total Size
-----------------------------------------------------+------------
pgq.event_6_0 | 1370 GB
cdr.cdr_2024_12_23 | 7273 MB
cdr.cdr_2024_12_24 | 7174 MB
cdr.cdr_2024_12_25 | 7153 MB
cdr.cdr_2024_12_26 | 7044 MB
cdr.cdr_2024_12_22 | 6796 MB
cdr.cdr_2024_12_21 | 6674 MB
cdr.cdr_2024_12_20 | 6491 MB
cdr.cdr_2024_12_19 | 6219 MB
cdr.cdr_2024_12_18 | 6189 MB
cdr.cdr_2024_12_16 | 6029 MB
cdr.cdr_2024_12_14 | 5956 MB
select * from pgq.event_2_0 Limit 10;
This shows recent records with today’s date on the timestamp. Billing is working normally.
Please what can I do to reduce the space taken?