Automatic deletion of older records in Postgres
We have a Postgres cluster with a database for each user. Each database has a table that records events, and we want this table to only record the last 15 days. If we were on MongoDB, we could use a capped collection, but we are in Postgres, which does not have equivalent functionality. In Postgres, you have to make do with something homemade. My first idea was to install a cron job in the system. It would execute daily, deleting older events in each user database. ...