public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter J. Holzer <[email protected]>
To: [email protected]
Subject: Re: Table bloat threshold limit to trigger repack
Date: Sun, 8 Feb 2026 16:06:40 +0100
Message-ID: <ncmz2o6ia4dmd7up7uyfjerm5jdldkgbbtmdn5pp2couhkqj74@dcxzipl44bxi> (raw)
In-Reply-To: <CAJCZkoLc=YXc4H2-aGbp2e-R+WsaLRxiAoj2acLP4=A7z+7xAg@mail.gmail.com>
References: <CAJCZkoJF-97BatLoVf1SUBTAX8BrSeX0dgZS+tBOM2imNnGRFQ@mail.gmail.com>
<CANzqJaCoH2My0YU9cKDDAtSx5vsTyXcpVH9y7WxZCddNmRPU8w@mail.gmail.com>
<CAJCZkoK-ipKCuiLuc=S=nrNVCPnbsKAUOs6cS9=1kdftcBQFPw@mail.gmail.com>
<CANzqJaAO4AbdceTA=4bmSA4sCG6viP28hDeeYjYOUe=jzLVbmg@mail.gmail.com>
<CAJCZkoLc=YXc4H2-aGbp2e-R+WsaLRxiAoj2acLP4=A7z+7xAg@mail.gmail.com>
On 2026-02-08 15:14:37 +0530, Durgamahesh Manne wrote:
> On Sun, 8 Feb, 2026, 13:15 Ron Johnson, <[email protected]> wrote:
> On Sun, Feb 8, 2026 at 12:43 AM Durgamahesh Manne <
> [email protected]> wrote:
> On Sun, 8 Feb, 2026, 10:59 Ron Johnson, <[email protected]>
> wrote:
> On Sat, Feb 7, 2026 at 11:19 PM Durgamahesh Manne <
> [email protected]> wrote:
> How much table bloat is acceptable before it affects
> performance in PostgreSQL?
>
> How big is the table? (For small tables, it doesn't matter.) How
> active is it? How frequently are records updated?
>
> Table size 100gb
> I use pgstattuple_approx to get Table bloat is about 16gb as of now
> since after repack is done on 27th of January
> Fillfactor already in place
> It's very critical application with updates on non partitioned table
>
>
> What did you set the fillfactor to?
> Have you minimized the number of indexes? (That lets HOT work better.)
> How long does it take to VACUUM the table?
>
> Fillfactor 80
With a fillfactor of 80 you should expect at least 20% of unused space,
or a "bloat" of (100 / 80) - 100 = 25 %.
Your 16 GB seem to be less than that which is a bit unexpected, but
might happen if you have an update-heavy workload. If you have 16 GB
more bloat than expected (i.e. you have 67 GB of data and therefore
expected a table size of 67 * 100 / 80 = 84 GB, but have 100 GB
instead), that may be worth investigating but isn't terribly concerning
if you have many inserts.
hjp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | [email protected] | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (5+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Table bloat threshold limit to trigger repack
In-Reply-To: <ncmz2o6ia4dmd7up7uyfjerm5jdldkgbbtmdn5pp2couhkqj74@dcxzipl44bxi>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox