From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Table : Bloat grow high
Date: Sat, 12 Nov 2022 08:24:23 -0600
Message-ID: <7fdd711a-508f-6583-f077-fce96619b2c4@gmail.com> (raw)
In-Reply-To: <17e33debb7ec47f662cb7281718d8446544d29f0.camel@cybertec.at>
References: <BLAPR19MB4626534A9D173ECE0F0A9521A1009@BLAPR19MB4626.namprd19.prod.outlook.com>
<17e33debb7ec47f662cb7281718d8446544d29f0.camel@cybertec.at>
On 11/12/22 08:05, Laurenz Albe wrote:
> 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/
To clarify: do HOT updates /automatically/ happen if there's enough space on
the page AND you don't update an indexed field (which should be minimized
anyway)?
If that is true, what happens if someone then updates an indexed field?
Does PG keep doing HOT updates on the /other/ tuples, or does it stop HOT
updates altogether until you recluster or full vacuum it?
--
Angular momentum makes the world go 'round.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: Table : Bloat grow high
In-Reply-To: <7fdd711a-508f-6583-f077-fce96619b2c4@gmail.com>
References: <BLAPR19MB4626534A9D173ECE0F0A9521A1009@BLAPR19MB4626.namprd19.prod.outlook.com> <17e33debb7ec47f662cb7281718d8446544d29f0.camel@cybertec.at> <7fdd711a-508f-6583-f077-fce96619b2c4@gmail.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