pgsql: Accept slightly-filled pages for tuples larger than fillfactor.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Accept slightly-filled pages for tuples larger than fillfactor.
Date: 2021-03-31 01:55:03
Message-ID: E1lRQ4V-0005Gj-Ou@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Accept slightly-filled pages for tuples larger than fillfactor.

We always inserted a larger-than-fillfactor tuple into a newly-extended
page, even when existing pages were empty or contained nothing but an
unused line pointer. This was unnecessary relation extension. Start
tolerating page usage up to 1/8 the maximum space that could be taken up
by line pointers. This is somewhat arbitrary, but it should allow more
cases to reuse pages. This has no effect on tables with fillfactor=100
(the default).

John Naylor and Floris van Nee. Reviewed by Matthias van de Meent.
Reported by Floris van Nee.

Discussion: https://postgr.es/m/6e263217180649339720afe2176c50aa@opammb0562.comp.optiver.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0ff8bbdee19a9db2794a95d439c946ab017d0acd

Modified Files
--------------
src/backend/access/heap/hio.c | 43 +++++++++++++++++++++--------------
src/backend/access/heap/rewriteheap.c | 6 ++++-
src/test/regress/expected/insert.out | 21 +++++++++++++++++
src/test/regress/sql/insert.sql | 22 ++++++++++++++++++
4 files changed, 74 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2021-03-31 02:50:17 pgsql: Doc: Use consistent terminology for tablesync slots.
Previous Message Michael Paquier 2021-03-31 00:36:54 pgsql: Fix comment in parsenodes.h