OpenBMP / obmp-docker

Various Docker images
BSD 3-Clause "New" or "Revised" License
21 stars 11 forks source link

Retention on psql-app #19

Open numchucksoe opened 1 year ago

numchucksoe commented 1 year ago

I have the retention in the docker-compose file for 8 weeks but it is only doing 4 weeks. I do not see the old cron job that cleans up and can not find anywhere the dB is being cleaned. Please advise.

TimEvens commented 1 year ago

The cron jobs have moved to postgres and TSDB retention policies. This is a bug that those values are still in the compose file. A doc will be created to detail how to adjust, see, and monitor retention settings.

numchucksoe commented 1 year ago

Thanks a bunch. I was going crazy looking for it. Look forward to the update and keep up good work.

numchucksoe commented 1 year ago

Any update on this?

kbmanseau commented 1 year ago

@numchucksoe are you waiting on the updated docs to get past your issue? I can assist modifying the retention policies if needed

numchucksoe commented 1 year ago

@numchucksoe are you waiting on the updated docs to get past your issue? I can assist modifying the retention policies if needed

Yes I am waiting on a way to increase the retention. Any help will be greatly appreciated.

kbmanseau commented 1 year ago

Sure, you can see how the retention is set in the DB schema: timescaledb retention policy

You can connect to your database using psql.

  1. List current retention policies on hypertables SELECT * FROM timescaledb_information.jobs where proc_name='policy_retention';
  2. Drop whichever ones you want using remove_retention_policy()
  3. You can then replace with a new policy with longer retention to prevent your db from filling up add_retention_policy()