git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: bc0021e) | patch
Remove UpdateFreeSpaceMap(), use FreeSpaceMapVacuumRange() instead.
2018年3月29日 16:22:37 +0000 (12:22 -0400)
2018年3月29日 16:22:44 +0000 (12:22 -0400)
commit a063baaced273e955e088ba5979dcc6ec5cd92e6
Remove UpdateFreeSpaceMap(), use FreeSpaceMapVacuumRange() instead.

FreeSpaceMapVacuumRange has the same effect, is more efficient if many
pages are involved, and makes fewer assumptions about how it's used.
Notably, Claudio Freire pointed out that UpdateFreeSpaceMap could fail
if the specified freespace value isn't the maximum possible. This isn't
a problem for the single existing user, but the function represents an
attractive nuisance IMO, because it's named as though it were a
general-purpose update function and its limitations are undocumented.
In any case we don't need multiple ways to get the same result.

In passing, do some code review and cleanup in RelationAddExtraBlocks.
In particular, I see no excuse for it to omit the PageIsNew safety check
that's done in the mainline extension path in RelationGetBufferForTuple.

Discussion: https://postgr.es/m/CAGTBQpYR0uJCNTt3M5GOzBRHo+-GccNO1nCaQ8yEJmZKSW5q1A@mail.gmail.com
src/backend/access/heap/hio.c diff | blob | blame | history
src/backend/storage/freespace/freespace.c diff | blob | blame | history
src/include/storage/freespace.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /