promscale icon indicating copy to clipboard operation
promscale copied to clipboard

Tags garbage collecting

Open Yamakaky opened this issue 3 years ago • 3 comments

Is the tag table cleaned at some point or will it only ever grow? I couldn't find information about that in the doc. That could be a problem when adding tags with dynamic values.

Yamakaky avatar Aug 22 '22 08:08 Yamakaky

The tag table (tracing) only ever grows. At this time, there is no job that attempts to identify tags that are no longer in use to remove them.

Can you give me some examples of the kinds of tag values that worry you?

jgpruitt avatar Aug 22 '22 16:08 jgpruitt

I don't hit a limitation myself since I'm pretty early in instrumenting my code. It could become a problem if you add for example a session id, user IP...

In any case, I think this limitation should be documented.

As for how to fix that, maybe something like the autovacuum does (I think?), where it will regularly get a small sample, check if they are used, delete the unused, and repeat until the percent of unused is under a threshold.

Yamakaky avatar Aug 22 '22 22:08 Yamakaky

Implementing the tags cleanup is dependent on productionizing the cache invalidation. more details here

VineethReddy02 avatar Sep 13 '22 15:09 VineethReddy02