From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Delete empty pages during GiST VACUUM.
Date: Fri, 22 Mar 2019 11:26:41 +0000
Message-ID: <E1h7IJt-000238-Ci@gemulon.postgresql.org> (raw)
Delete empty pages during GiST VACUUM.
To do this, we scan GiST two times. In the first pass we make note of
empty leaf pages and internal pages. At second pass we scan through
internal pages, looking for downlinks to the empty pages.
Deleting internal pages is still not supported, like in nbtree, the last
child of an internal page is never deleted. That means that if you have a
workload where new keys are always inserted to different area than where
old keys are removed, the index will still grow without bound. But the rate
of growth will be an order of magnitude slower than before.
Author: Andrey Borodin
Discussion: https://www.postgresql.org/message-id/B1E4DF12-6CD3-4706-BDBD-BF3283328F60@yandex-team.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7df159a620b760e289f1795b13542ed1b3e13b87
Modified Files
--------------
src/backend/access/gist/README | 48 +++++
src/backend/access/gist/gist.c | 15 ++
src/backend/access/gist/gistutil.c | 34 ++-
src/backend/access/gist/gistvacuum.c | 378 ++++++++++++++++++++++++++++++---
src/backend/access/gist/gistxlog.c | 115 ++++++++++
src/backend/access/rmgrdesc/gistdesc.c | 28 +++
src/include/access/gist.h | 4 +
src/include/access/gist_private.h | 11 +-
src/include/access/gistxlog.h | 30 ++-
src/test/regress/expected/gist.out | 6 +-
src/test/regress/sql/gist.sql | 6 +-
11 files changed, 626 insertions(+), 49 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: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Delete empty pages during GiST VACUUM.
In-Reply-To: <E1h7IJt-000238-Ci@gemulon.postgresql.org>
References: <E1h7IJt-000238-Ci@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