Overview
This page is the atomic definition. Table partitioning as a hot/cold mechanism lives at postgres.
Definition
Hot/cold storage is an architectural pattern that separates data by access frequency into storage tiers with different performance and cost profiles. Hot data, accessed many times per second, lives on fast NVMe SSD or in-memory caches. Cold data, accessed rarely (audits, compliance archives, historical analytics), lives on slower, cheaper storage such as HDD, object storage (S3, GCS), or compressed columnar formats. The separation reduces the working set size on hot storage, improving cache hit rates and reducing write-amplification from index maintenance on infrequently updated data. In PostgreSQL, the typical implementation uses table partitioning: recent partitions live on primary storage, old partitions are ATTACHed from a tablespace backed by slower disks or are dumped to Parquet in object storage. TimescaleDB automates this via its compression and tiered storage features. Applications must route queries to the right tier; a query that scans cold partitions will be slow regardless of how fast the hot tier is.
When it applies
Implement hot/cold storage when: a table grows without bound (logs, events, time-series), old rows are never or rarely updated, query patterns are strongly recency-biased, or storage costs for the primary tier are significant. Start with partitioning by time and manually moving old partitions before investing in automated tiering.
Example
An audit log table has 500 M rows. The last 30 days of rows are queried daily (hot). The remainder is queried only for compliance (cold). Partitioning by month lets the hot partition fit in memory; cold partitions can be compressed or archived to S3 with pg_partman.
Related concepts
- partition-key - the column used to route rows to the correct partition defines the hot/cold boundary.
- sharding - sharding routes data across nodes; hot/cold routing directs data across storage tiers.
- write-amplification - cold tiers avoid index overhead on data that is written once and rarely read.
- sequential-scan - cold partitions benefit from sequential scan on compressed columnar storage.
- postgres - PostgreSQL table partitioning and tablespaces implement hot/cold separation natively.
Citing this term
See Cold Storage (llmbestpractices.com/glossary/hot-cold-storage).