1 個回答
- 最新
- 最多得票
- 最多評論
3
Postgres does not have any out of the box solution to define TTL for a table. The recommended approach would be to convert the table as range partitioned table based of day/hour and schedule a purge script to drop the older partitions.. Here's a blog to convert a table into partitioned table : https://aws.amazon.com/blogs/database/partition-existing-tables-using-native-commands-in-amazon-rds-for-postgresql-and-amazon-aurora-postgresql/.
pg_partman extension can be used to create/maintain partitions as documented here : https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL_Partitions.html
已回答 5 個月前
相關內容
- 已提問 6 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前