pgsql: Use PageIndexTupleOverwrite() within nbtree.

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

pgsql: Use PageIndexTupleOverwrite() within nbtree.

Peter Geoghegan-4
Use PageIndexTupleOverwrite() within nbtree.

Use the PageIndexTupleOverwrite() bufpage.c routine within nbtree
instead of deleting a tuple and re-inserting its replacement.  This
makes the intent of affected code slightly clearer.  It also makes
CREATE INDEX slightly faster, since there is no longer a need to shift
every leaf page's line pointer array back and forth during index builds.

Author: Peter Geoghegan, Anastasia Lubennikova
Reviewed-By: Anastasia Lubennikova



Modified Files
src/backend/access/nbtree/nbtpage.c |  9 ++++-----
src/backend/access/nbtree/nbtsort.c | 21 ++++++---------------
2 files changed, 10 insertions(+), 20 deletions(-)