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

From Noah Misch
Subject pgsql: Accept slightly-filled pages for tuples larger than fillfactor.
Date
Msg-id E1lRQ4V-0005Gj-Ou@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix comment in parsenodes.h
Next
From: Amit Kapila
Date:
Subject: pgsql: Doc: Use consistent terminology for tablesync slots.