Dropping stringvalue column from History DB


I'm saving history of some tags on PostgreSQL is it possible to drop the stringvalue column? It is taking too much space.

If you're not storing any string values, I would be pretty surprised if an empty column takes up much space, or even any.

StackOverflow seems to back that guess up:

That said, you can certainly try dropping the column. I can guarantee that the next partition the historian creates will have it; I don't know for sure whether we'll actively attempt to recreate it outside of partition creation (or just in time before storing a string value if you start historizing one).

This is correct. A bit is flipped in row meta-data to signal a null in a column and that column then takes no space at all.

1 Like

I checked dropping the column. It is like you said there is no advantage to dropping the column when the values are null. Thank you.