mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
ea69a0dead
Since hash indexes typically have very few overflow pages, adding a
new splitpoint essentially doubles the on-disk size of the index,
which can lead to large and abrupt increases in disk usage (and
perhaps long delays on occasion). To mitigate this problem to some
degree, divide larger splitpoints into four equal phases. This means
that, for example, instead of growing from 4GB to 8GB all at once, a
hash index will now grow from 4GB to 5GB to 6GB to 7GB to 8GB, which
is perhaps still not as smooth as we'd like but certainly an
improvement.
This changes the on-disk format of the metapage, so bump HASH_VERSION
from 2 to 3. This will force a REINDEX of all existing hash indexes,
but that's probably a good idea anyway. First, hash indexes from
pre-10 versions of PostgreSQL could easily be corrupted, and we don't
want to confuse corruption carried over from an older release with any
corruption caused despite the new write-ahead logging in v10. Second,
it will let us remove some backward-compatibility code added by commit
|
||
---|---|---|
.. | ||
expected | ||
sql | ||
.gitignore | ||
brinfuncs.c | ||
btreefuncs.c | ||
fsmfuncs.c | ||
ginfuncs.c | ||
hashfuncs.c | ||
heapfuncs.c | ||
Makefile | ||
pageinspect--1.0--1.1.sql | ||
pageinspect--1.1--1.2.sql | ||
pageinspect--1.2--1.3.sql | ||
pageinspect--1.3--1.4.sql | ||
pageinspect--1.4--1.5.sql | ||
pageinspect--1.5--1.6.sql | ||
pageinspect--1.5.sql | ||
pageinspect--unpackaged--1.0.sql | ||
pageinspect.control | ||
pageinspect.h | ||
rawpage.c |