I have a ThingsBoard PE setup using AWS EC2 instance, with postgreSQL-12 as the database.
There is a table ts_kv_2020_10
which stores all telemetry data for the month of October.
Is there a way I can enable FIFO on this ts_kv_2020_10
table to keep storage at a fixed capacity of example 1GB? (i.e. When limit is reached, data that was first stored onto the table will automatically be replaced by the lastest incoming data.)
No, there is no built-in feature in Postgres for that.
You will either need to roll your own (e.g. using triggers) or use partitioning to get rid of an entire month once it's not needed any longer.