Thread: pgsql: Create a routine PageIndexMultiDelete() that replaces a loop
pgsql: Create a routine PageIndexMultiDelete() that replaces a loop
From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message: ----------- Create a routine PageIndexMultiDelete() that replaces a loop around PageIndexTupleDelete() with a single pass of compactification --- logic mostly lifted from PageRepairFragmentation. I noticed while profiling that a VACUUM that's cleaning up a whole lot of deleted tuples would spend as much as a third of its CPU time in PageIndexTupleDelete; not too surprising considering the loop method was roughly O(N^2) in the number of tuples involved. Modified Files: -------------- pgsql/src/backend/access/nbtree: nbtpage.c (r1.81 -> r1.82) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtpage.c.diff?r1=1.81&r2=1.82) nbtxlog.c (r1.19 -> r1.20) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtxlog.c.diff?r1=1.19&r2=1.20) pgsql/src/backend/storage/page: bufpage.c (r1.62 -> r1.63) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/page/bufpage.c.diff?r1=1.62&r2=1.63) pgsql/src/include/storage: bufpage.h (r1.63 -> r1.64) (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/bufpage.h.diff?r1=1.63&r2=1.64)