Home / Companies / Timescale / Blog / Post Details
Content Deep Dive

What Is TOAST (and Why It Isn’t Enough for Data Compression in Postgres)

Blog post from Timescale

Post Details
Company
Date Published
Author
Carlota Soto
Word Count
2,515
Language
English
Hacker News Points
-
Summary

TOAST (The Oversized Attribute Storage Technique) is a mechanism used by PostgreSQL to efficiently store and manage large values within the structural confines of a page, but it's not effective for optimizing database storage use in modern applications. TOAST uses compression as one of its techniques, but its primary role isn't to serve as a traditional data compression mechanism. Instead, it aims to reduce storage space by compressing specific large values. However, accessing TOASTed data can add overhead, and the lack of a high-level mechanism for dictating compression policies is a significant limitation. To overcome these limitations, PostgreSQL users have a better alternative in TimescaleDB, which adds columnar compression functionality to PostgreSQL, allowing for up to 10x reduction in database size through defined time-based compression policies.