On 2020-06-09 21:48, Wells Oliver wrote:
Is there documentation that lays out how JSONB columns are stored? I
have a Rather Large Table with 37m+ rows with large JSONB objects, its
size is about 300mb, but there's an associated TOAST table with a 28GB size.
Curious how/why PSQL would store JSONB stuff this way.
TOAST is documented here:
https://www.postgresql.org/docs/current/storage-toast.html. JSONB is
handled like any other (variable-size) data type. You can use the
per-column storage settings mentioned on that page to perhaps achieve
different storage outcomes.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services