From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Revert "Avoid the creation of the free space map for small heap
Date: Tue, 07 May 2019 04:11:29 +0000
Message-ID: <E1hNrRx-0008JU-UJ@gemulon.postgresql.org> (raw)
Revert "Avoid the creation of the free space map for small heap relations".
This feature was using a process local map to track the first few blocks
in the relation. The map was reset each time we get the block with enough
freespace. It was discussed that it would be better to track this map on
a per-relation basis in relcache and then invalidate the same whenever
vacuum frees up some space in the page or when FSM is created. The new
design would be better both in terms of API design and performance.
List of commits reverted, in reverse chronological order:
06c8a5090e Improve code comments in b0eaa4c51b.
13e8643bfc During pg_upgrade, conditionally skip transfer of FSMs.
6f918159a9 Add more tests for FSM.
9c32e4c350 Clear the local map when not used.
29d108cdec Update the documentation for FSM behavior..
08ecdfe7e5 Make FSM test portable.
b0eaa4c51b Avoid creation of the free space map for small heap relations.
Discussion: https://postgr.es/m/20190416180452.3pm6uegx54iitbt5@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7db0cde6b58eef2ba0c70437324cbc7622230320
Modified Files
--------------
contrib/pageinspect/expected/page.out | 64 ++++---
contrib/pageinspect/sql/page.sql | 34 ++--
contrib/pgstattuple/pgstatapprox.c | 3 -
doc/src/sgml/pgfreespacemap.sgml | 2 -
doc/src/sgml/pgstattuple.sgml | 4 +-
doc/src/sgml/ref/pgupgrade.sgml | 7 -
doc/src/sgml/storage.sgml | 13 +-
src/backend/access/brin/brin.c | 2 +-
src/backend/access/brin/brin_pageops.c | 10 +-
src/backend/access/heap/hio.c | 42 ++---
src/backend/access/heap/vacuumlazy.c | 17 +-
src/backend/access/transam/xact.c | 14 --
src/backend/storage/freespace/README | 38 +---
src/backend/storage/freespace/freespace.c | 301 +-----------------------------
src/backend/storage/freespace/indexfsm.c | 6 +-
src/bin/pg_upgrade/info.c | 16 +-
src/bin/pg_upgrade/pg_upgrade.h | 6 -
src/bin/pg_upgrade/relfilenode.c | 63 +------
src/include/storage/freespace.h | 9 +-
src/test/regress/expected/fsm.out | 73 --------
src/test/regress/parallel_schedule | 2 +-
src/test/regress/serial_schedule | 1 -
src/test/regress/sql/fsm.sql | 66 -------
23 files changed, 107 insertions(+), 686 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org
Subject: Re: pgsql: Revert "Avoid the creation of the free space map for small heap
In-Reply-To: <E1hNrRx-0008JU-UJ@gemulon.postgresql.org>
References: <E1hNrRx-0008JU-UJ@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox