From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Delete empty pages during GiST VACUUM. |
Date: | 2019-03-22 11:26:41 |
Message-ID: | E1h7IJt-000238-Ci@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2019-03-22 12:15:02 | pgsql: Fix bug in the GiST vacuum's 2nd stage. |
Previous Message | Peter Eisentraut | 2019-03-22 11:19:54 | pgsql: Collations with nondeterministic comparison |