From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Wells Oliver <wells.oliver@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Understanding JSONB and TOAST tables
Date: Wed, 10 Jun 2020 00:59:19 +0200
Message-ID: <f6189da9-09f5-90fe-9d0e-7bdcb7589bbe@2ndquadrant.com> (raw)
In-Reply-To: <CAOC+FBX_Zwu_Ck4hgFGy3O0vz_HT0i7=Y-ozBVSe9n4+-28G+A@mail.gmail.com>
References: <CAOC+FBX_Zwu_Ck4hgFGy3O0vz_HT0i7=Y-ozBVSe9n4+-28G+A@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, wells.oliver@gmail.com
Subject: Re: Understanding JSONB and TOAST tables
In-Reply-To: <f6189da9-09f5-90fe-9d0e-7bdcb7589bbe@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox