Change default retention policy

Greetings is it possible to change an influx retention policy on the fly without issue ? For example from 30 days to 90 days ?

@bob_monty What do you mean without issue? ALTER RETENTION POLICY should have you.

hi Jack,
i’m just concerned if when i do the policy retention change, can existing data that is being written be affected in a negative way or is it just transparent i’m guessing ?

@bob_monty This post should help explain retention policies a bit better. Can you explain a bit more what you mean by can existing data that is being written be affected in a negative way.

FWIW I’ve changed rps on production databases a number of times and never had any issues with it.

I think what @bob_monty means is that if an existing retention policy (having a measurement and data already) is altered and the (shard) duration is either increased or reduced, what happens to the data that is already stored within the existing shards.

Will the shard’s be renewed/re-created accordingly?

Edit: I meant altering the shard duration of an existing retention policy.

1 Like

Below links will you a complete understanding.

And yes based on the Retention policy it will purge the old/exisiting data.