I am looking for exactly the same solution. Keep the real time values for 2 days and then delete it. I am storing the aggregated values for 2 years.
I am using pgAdmin to make a query on the telemetry keys I want to delete after 2 days but am not able to find the right query. Can you point me in the right direction?
Also when I know the query, I can make the pg_cron job. Do you want to share an example of how you solved this?