Automatic compression

I use timescaledb with telegraf. I would like to automatically enable compression of all tables in telegraf schema. The compression policy should be simple: after 7 days, compress the data. I looked thru the compression docs but I don’t know how to do it automatically. Here is how I create tables, https://github.com/influxdata/telegraf/tree/master/plugins/outputs/postgresql#timescaledb

Any advise would be much appreciated.

Hey Rita!

Here’s the part of the docs you’re looking for: Timescale Documentation | Compression

You enable compression for a specific table, and then add a compression policy to make it an automated process.