]> granicus.if.org Git - postgresql/commit
Clean up code associated with updating pg_class statistics columns
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 10 May 2006 23:18:39 +0000 (23:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 10 May 2006 23:18:39 +0000 (23:18 +0000)
commit3fdeb189e977ebe29ee658592d07930e016dd031
tree1233c6b5d693bbfb76839b502692465d09d28421
parentc1f39437d0ad38d1f8d76f9ebf904faa9a7aaaf6
Clean up code associated with updating pg_class statistics columns
(relpages/reltuples).  To do this, create formal support in heapam.c for
"overwrite" tuple updates (including xlog replay capability) and use that
instead of the ad-hoc overwrites we'd been using in VACUUM and CREATE INDEX.
Take the responsibility for updating stats during CREATE INDEX out of the
individual index AMs, and do it where it belongs, in catalog/index.c.  Aside
from being more modular, this avoids having to update the same tuple twice in
some paths through CREATE INDEX.  It's probably not measurably faster, but
for sure it's a lot cleaner than before.
17 files changed:
doc/src/sgml/indexam.sgml
src/backend/access/gin/gininsert.c
src/backend/access/gist/gist.c
src/backend/access/hash/hash.c
src/backend/access/heap/heapam.c
src/backend/access/nbtree/nbtree.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/commands/indexcmds.c
src/backend/commands/tablecmds.c
src/backend/commands/vacuum.c
src/include/access/genam.h
src/include/access/heapam.h
src/include/access/htup.h
src/include/catalog/index.h
src/include/catalog/pg_proc.h