user3658578
user3658578

Reputation: 1

timescaledb's retention policy not working

We have set a retention policy of 72 hours on a table which has column with definition as timestamp without time zone.

When we check after 72 hours, data was not deleted from table.

Update 26 Aug 2021

Added sample data for analysis

enter image description here

Upvotes: 0

Views: 800

Answers (1)

jonatasdp
jonatasdp

Reputation: 1412

The retention policy runs on a schedule in the background jobs. You can also check the background jobs and see the details:

SELECT * FROM timescaledb_information.jobs where application_name like 'Compression%';

Then, with the job_id it's possible to check the job_stats:

SELECT job_id, total_runs, total_failures, total_successes 
  FROM timescaledb_information.job_stats
  WHERE job_id IN (
    SELECT job_id 
      FROM timescaledb_information.jobs
      WHERE application_name like 'Compression%');

Upvotes: 2

Related Questions