influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Add the ability to rename retention policy

Open edbernier opened this issue 8 years ago • 7 comments

Feature Request

Opening a feature request kicks off a discussion. Requests may be closed if we're not actively planning to work on them.

Proposal: [Description of the feature] Extend the current ALTER RETENTION POLICY command to include the ability to rename a retention policy. See suggested syntax below: ALTER RETENTION POLICY RENAME TO

Current behavior: [What currently happens] Currently there is no way to rename a retention policy. What you have to do to get around this is to create a new retention policy with the name you want. Restart data ingest to flow to the new retention policy. Then SELECT all the records from the existing retention policy INTO the newly created retention policy. Once all the data has been copied over then DROP the old retention policy.

NOTE: This requires that you have enough room to store the current data twice.

Desired behavior: [What you would like to happen]

  1. Pause input traffic
  2. ALTER RETENTION POLICY xyz RENAME TO abc
  3. Change clients that are writing to or reading from the old retention policy to point to the new retention policy
  4. Resume input traffic

Use case: [Why is this important (helps with prioritizing requests)] It allows an easier ability to change to new naming conventions without requiring lots of extra disk space and the time and resources required to copy the data

edbernier avatar May 02 '18 20:05 edbernier

Dupe of #8351

CAFxX avatar May 03 '18 23:05 CAFxX

At Wayfair we have a very large production database where we originally named our default retention policy something like two_week even though in fact we have sinced increased to 30 to 60 days of raw data. It's an awful lot of data to copy, but we really need to be able to update this somehow as it's creating confusion. Also, we want to be able to failover to a standby database with a 7 day retention policy and for queries to work against the standby they'll fail if people use the two_week RP name explicitly.

JimHagan avatar Sep 15 '18 13:09 JimHagan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 24 '19 12:07 stale[bot]

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

stale[bot] avatar Jul 31 '19 13:07 stale[bot]

This is an important production requirement.

amarbs avatar Sep 15 '22 05:09 amarbs

Basic requirement. Bump!

pieter2501 avatar Mar 30 '23 14:03 pieter2501

Bump!

emanuelmanea avatar Dec 14 '23 09:12 emanuelmanea