pgsql: Clean up code associated with updating pg_class statistics

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up code associated with updating pg_class statistics
Date: 2006-05-10 23:18:39
Message-ID: 20060510231839.BBBA29FA3A3@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/doc/src/sgml:
indexam.sgml (r2.10 -> r2.11)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/indexam.sgml.diff?r1=2.10&r2=2.11)
pgsql/src/backend/access/gin:
gininsert.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gin/gininsert.c.diff?r1=1.1&r2=1.2)
pgsql/src/backend/access/gist:
gist.c (r1.133 -> r1.134)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/gist/gist.c.diff?r1=1.133&r2=1.134)
pgsql/src/backend/access/hash:
hash.c (r1.89 -> r1.90)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hash.c.diff?r1=1.89&r2=1.90)
pgsql/src/backend/access/heap:
heapam.c (r1.211 -> r1.212)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c.diff?r1=1.211&r2=1.212)
pgsql/src/backend/access/nbtree:
nbtree.c (r1.148 -> r1.149)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtree.c.diff?r1=1.148&r2=1.149)
pgsql/src/backend/bootstrap:
bootstrap.c (r1.214 -> r1.215)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/bootstrap.c.diff?r1=1.214&r2=1.215)
pgsql/src/backend/catalog:
heap.c (r1.298 -> r1.299)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/heap.c.diff?r1=1.298&r2=1.299)
index.c (r1.265 -> r1.266)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c.diff?r1=1.265&r2=1.266)
pgsql/src/backend/commands:
indexcmds.c (r1.138 -> r1.139)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/indexcmds.c.diff?r1=1.138&r2=1.139)
tablecmds.c (r1.183 -> r1.184)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c.diff?r1=1.183&r2=1.184)
vacuum.c (r1.329 -> r1.330)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c.diff?r1=1.329&r2=1.330)
pgsql/src/include/access:
genam.h (r1.59 -> r1.60)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/genam.h.diff?r1=1.59&r2=1.60)
heapam.h (r1.110 -> r1.111)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/heapam.h.diff?r1=1.110&r2=1.111)
htup.h (r1.81 -> r1.82)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/htup.h.diff?r1=1.81&r2=1.82)
pgsql/src/include/catalog:
index.h (r1.65 -> r1.66)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/index.h.diff?r1=1.65&r2=1.66)
pg_proc.h (r1.410 -> r1.411)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h.diff?r1=1.410&r2=1.411)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message James William Pye 2006-05-11 02:28:55 python - rc: Reference the dbname option for, well, the dbname.
Previous Message User Mha 2006-05-10 17:45:22 pginstaller - pginst: Add property SKIPTSCHECK to remove the check for

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-05-11 00:31:54 Re: [HACKERS] Big IN() clauses etc : feature proposal
Previous Message Joachim Wieland 2006-05-10 22:54:25 .pgpass file and unix domain sockets