Re: Table : Bloat grow high

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Alexis Zapata <alexise23(at)hotmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Table : Bloat grow high
Date: 2022-11-12 14:05:21
Message-ID: 17e33debb7ec47f662cb7281718d8446544d29f0.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2022-11-11 at 17:09 +0000, Alexis Zapata wrote:
> In postgresql 13.5 I have a table (size 3.1 GB) and in this table occurs near to
> 200 updates per second, after 2 days the size table is 7 GB and bloat grow to 45% and
>  the query operations are degraded. vacuum runs every 5 seconds over this. but the
> bloat growth continues, to solve the
> problem quickly, we have made a replica of the table with a trigger, then a copy
> of the data and in a
> transaction we rename the table, but it would not be the best solution.
> Some suggestion about stop this size increase or parameter to setting up?

You'd be most happy with HOT updates. Make sure that there is no index on any of
the columns you update, and change the table to have a "fillfactor" less than
100. Then you can get HOT updates which don't require VACUUM for cleaning up.

https://www.cybertec-postgresql.com/en/hot-updates-in-postgresql-for-better-performance/

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2022-11-12 14:24:23 Re: Table : Bloat grow high
Previous Message Ron 2022-11-12 08:44:44 Re: Upgrading to v12