Re: Set FILLFACTOR for primary key

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Ed Behn <ed(at)behn(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Set FILLFACTOR for primary key
Date: 2019-10-09 17:16:37
Message-ID: CAH2-WzmHpicUop=yD_e=MeR_MmtVtHciBdDyP-D-beM=LV0+JA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Oct 9, 2019 at 9:37 AM Ed Behn <ed(at)behn(dot)us> wrote:
> I have a table where I INSERT rows and DELETE rows. However, they are UPDATEd. Therefore, I've set FILLFACTOR to 100% for all of the indexes.

I don't recommend it, since concurrent inserts that arrive slightly
out of order (e.g. auto-incrementing sequence values) can now split
pages a second time -- they have no wiggle room.

> However, I can't figure out how to set the FILLFACTOR to 100 for the primary key.

There is an ALTER INDEX for this. It works with primary keys, even
though they're generally though of as constraints, not indexes.

--
Peter Geoghegan

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Alex Williams 2019-10-09 21:32:25 Re: pg_dump compatibility level / use create view instead of create table/rule
Previous Message Ed Behn 2019-10-09 16:36:45 Set FILLFACTOR for primary key