diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-05-10 23:18:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-05-10 23:18:39 +0000 |
commit | 3fdeb189e977ebe29ee658592d07930e016dd031 (patch) | |
tree | 1233c6b5d693bbfb76839b502692465d09d28421 /src/backend/commands/tablecmds.c | |
parent | c1f39437d0ad38d1f8d76f9ebf904faa9a7aaaf6 (diff) | |
download | postgresql-3fdeb189e977ebe29ee658592d07930e016dd031.tar.gz postgresql-3fdeb189e977ebe29ee658592d07930e016dd031.zip |
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.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index f670ccf14eb..9da1d86c42c 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.183 2006/04/30 01:08:07 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.184 2006/05/10 23:18:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -6046,14 +6046,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent) BTREE_AM_OID, rel->rd_rel->reltablespace, classObjectId, - true, false, true, false); - - /* - * Update toast rel's pg_class entry to show that it has an index. The - * index OID is stored into the reltoastidxid field for easy access by the - * tuple toaster. - */ - setRelhasindex(toast_relid, true, true, toast_idxid); + true, true, false, true, false); /* * Store the toast table's OID in the parent relation's pg_class row |