Temporal History retention period

Hi,

From this article

I learn that

Temporal stores data that is generated from a Workflow, such as Event Histories, per the configured retention period. When the retention period expires the data is deleted to avoid running out of space.

May I know what kind of data to be deleted in this case?
Will it delete also running Workflows that have no activity for more than the retention period?
Also, can I query Completed Workflows that are older than the retention period?

Thanks a lot.

May I know what kind of data to be deleted in this case?

Both workflow execution history as well as visibility data (if you enabled enhanced visibility)

Will it delete also running Workflows that have no activity for more than the retention period?

Retention period does not affect running workflow executions. You can have long-running workflow that execute for years. Retention only affects completed workflow executions.

Also, can I query Completed Workflows that are older than the retention period?

No because after retention period hits for those completed workflow execs, their history is removed.

You can set retention period for a namespace (1 day min, 30 day max) via tctl for example:

tctl namespace update --retention 5

where 5 is number of days

or via the UpdateNamespace api from your SDK used

1 Like

Thanks a lot @tihomir