Housekeeping

Geordi does not clean up old sensor data, so the database can grow and consume quite some space over the years.

The only table that needs cleanup is the sample table. This example query deletes all sample data that is older than a year:

DELETE FROM sample WHERE time < now() - interval '1 year';

After deleting a large number of records, the table should be vacuumed to return the emptied space to the operating system:

VACUUM FULL sample;

To keep the database tidy, the DELETE query can be executed in a cronjob. Future releases of Geordi might have a feature that cleans up the database automatically.