Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add first/last timestamps to expire tables
This adds two timestamp (with timezone) columns to all expire tables called "first" and "last". When an entry is added, both are set to the current (transaction) timestamp. When an entry already exists a new insert will result in the "last" timestamp being updated. Having these two timestamps allows various expire/updating strategies, for instance: * update oldest entry * update entry that didn't change for the longest time * update older entries but only if there are no recent changes, which indicates that there might be more changes coming For backwards compatibility the code detects which table format is used and falls back to the old behaviour if the timestamp columns aren't there.
- Loading branch information