Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vp6N7-001EKr-1c for pgsql-general@arkaria.postgresql.org; Sun, 08 Feb 2026 15:06:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vp6N5-0084uK-0t for pgsql-general@arkaria.postgresql.org; Sun, 08 Feb 2026 15:06:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vp6N4-0084uA-33 for pgsql-general@lists.postgresql.org; Sun, 08 Feb 2026 15:06:46 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vp6N1-000000018vb-3XTY for pgsql-general@lists.postgresql.org; Sun, 08 Feb 2026 15:06:45 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id C21F71C4C2; Sun, 08 Feb 2026 16:06:40 +0100 (CET) Date: Sun, 8 Feb 2026 16:06:40 +0100 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Table bloat threshold limit to trigger repack Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lvm4fl7jejru2qai" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --lvm4fl7jejru2qai Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: Table bloat threshold limit to trigger repack MIME-Version: 1.0 On 2026-02-08 15:14:37 +0530, Durgamahesh Manne wrote: > On Sun, 8 Feb, 2026, 13:15 Ron Johnson, wrote: > On Sun, Feb 8, 2026 at 12:43=E2=80=AFAM Durgamahesh Manne < > maheshpostgres9@gmail.com> wrote: > On Sun, 8 Feb, 2026, 10:59 Ron Johnson, > wrote: > On Sat, Feb 7, 2026 at 11:19=E2=80=AFPM Durgamahesh Manne < > maheshpostgres9@gmail.com> wrote: > How much table bloat is acceptable before it affects > performance in PostgreSQL?=C2=A0 >=20 > How big is the table? (For small tables, it doesn't matter.) = How > active is it?=C2=A0 How frequently are records updated? >=20 > Table size 100gb > I use pgstattuple_approx to get Table bloat is about 16gb as of n= ow > since after repack is done on 27th of January=C2=A0 > Fillfactor already in place > It's very critical application with updates on non partitioned ta= ble=C2=A0 >=20 >=20 > What did you set the fillfactor=C2=A0to? > Have you minimized the number of indexes?=C2=A0 (That lets HOT work b= etter.) > How long does it take to VACUUM the table? >=20 > Fillfactor 80 With a fillfactor of 80 you should expect at least 20% of unused space, or a "bloat" of (100 / 80) - 100 =3D 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 =3D 84 GB, but have 100 GB instead), that may be worth investigating but isn't terribly concerning if you have many inserts. hjp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --lvm4fl7jejru2qai Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmmIpncACgkQ8g5IURL+ KF1jLhAAoe7BWJJz/9rCKGO31Xj5ilh1eGCCqjV775Gu1zqdNuzQ/OOqSYQpxWLd WqtC1LI/FpBvwOlgaEz0CAfHH6dyHBhihIJCmuAktokvvank3HmljnxuKzNpFH/W Quoy5T7Xrp/KTl6tDxs4cUTR9ofmR3a1bz0j7JMIdI0jJ6z8TpQzcquE66qLMDzW cCoZ7v5ylfFJR5fmCmKZDS+bTL23NCysJomn1KXFaLZ8D9oV67x2IlYZhWMphWVq 4aeVE2dccHwilXz+4HbSoaQCvxwSnMT2OQ8UFM88XcgAzLRzpcG3qRcCreZsEOcF 01Di31gb5NEO6EwhfkxXzJ0yYdeTs/JfajYJx9YYPuoNg+jACNI46U71XrIfIyF+ EIZMZ6CyhHPjzzos8WZd94VpJIHwoKKLf+5vFWOlj+i0pIQfUs410sMAeZtOUxNn MVwSjrQVEZwWN5Czxb9ClDJycfBn2nxWXUtvobvK/NuhFTc447Z0bO2sj/r1OVCQ vhgIcQEz3exj+stcs3o3Vb8dp21IpH9qbNu9p1S7+LbbqBUBs4T4iF7qSu3Y0RpS XyV21ikwC+6P1P7GFWfzfgJ0itNdXS0R4nIZyNu2t4+p5UV7ZnXgJGWnQVu2/GMC QiHUVtsk2mHuiQtJYlkZaXyRpNwtO79PtmYZa4PxwiJAayD0k8E= =OuRM -----END PGP SIGNATURE----- --lvm4fl7jejru2qai--