Re: Regarding fillfactor use case for only delete ops

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Durgamahesh Manne <maheshpostgres9(at)gmail(dot)com>, Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Regarding fillfactor use case for only delete ops
Date: 2025-06-06 23:14:27
Message-ID: 19c99502-c951-443b-ad53-061553f2d9ed@aklaver.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/6/25 16:04, Durgamahesh Manne wrote:
>

>
> Hi
>
> I believe that fill factor works exclusively for updates of HOT tables
> but not for delete ops

From here:

https://www.postgresql.org/docs/current/sql-createtable.html

"fillfactor (integer)

The fillfactor for a table is a percentage between 10 and 100. 100
(complete packing) is the default. When a smaller fillfactor is
specified, INSERT operations pack table pages only to the indicated
percentage; the remaining space on each page is reserved for updating
rows on that page. This gives UPDATE a chance to place the updated copy
of a row on the same page as the original, which is more efficient than
placing it on a different page, and makes heap-only tuple updates more
likely. For a table whose entries are never updated, complete packing is
the best choice, but in heavily updated tables smaller fillfactors are
appropriate. This parameter cannot be set for TOAST tables.
"

So it increases the chances of HOT updates, but is not restricted to them.

>
> Regards,
> Durga Mahesh
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2025-06-06 23:20:23 Re: Regarding fillfactor use case for only delete ops
Previous Message Durgamahesh Manne 2025-06-06 23:09:20 Re: Regarding fillfactor use case for only delete ops