Re: table bloat very fast and free space can not be reused - Mailing list pgsql-performance

From Kristjan Mustkivi
Subject Re: table bloat very fast and free space can not be reused
Date
Msg-id CAOQPKatLGcDMJ+tFpRqO-NWfs8xgN3v692CmxrV9MMG=qZn1Hg@mail.gmail.com
Whole thread
In response to Re: table bloat very fast and free space can not be reused  (Rick Otten <rottenwindfish@gmail.com>)
List pgsql-performance
On Mon, Apr 20, 2026 at 5:39 PM Rick Otten <rottenwindfish@gmail.com> wrote:
>
>  Which design is an antipattern?  Using json for volatile data sets or unlogging the table?

For us, a large (i.e spilling over to TOAST) json blob in a table
where this json blob (or text, does not matter) gets very frequent
(hundreds and thousands of) updates per minute.

> Does `pg_repack` help?  I know it probably isn't practical to run it every couple of days.  It also can sometimes
causesheadaches when repacking a table with a ton of logical replication activity, but it might be a tool to consider
ifyou haven't already.   If you can partition the table with the crazy amount of json changes, you don't have to repack
allthe partitions, you might be able to repack just the older ones with the worst bloat. 

This feels like a complexity I personally would like to avoid. Far
more preferable is to get rid of the json. Split the large json into a
normalized table design based on the most useful/frequent patterns.

Br,
--
Kristjan Mustkivi

Email: kristjan.mustkivi@gmail.com



pgsql-performance by date:

Previous
From: Rick Otten
Date:
Subject: Re: table bloat very fast and free space can not be reused
Next
From: Merlin Moncure
Date:
Subject: feature request: index supported REINDEX for partial indexes on needle/haystack tables