mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/indexam.sgml,v 2.10 2006/05/02 22:25:09 tgl Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/indexam.sgml,v 2.11 2006/05/10 23:18:38 tgl Exp $ -->
|
||||
|
||||
<chapter id="indexam">
|
||||
<title>Index Access Method Interface Definition</title>
|
||||
@ -144,7 +144,7 @@
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
void
|
||||
IndexBuildResult *
|
||||
ambuild (Relation heapRelation,
|
||||
Relation indexRelation,
|
||||
IndexInfo *indexInfo);
|
||||
@ -155,6 +155,8 @@ ambuild (Relation heapRelation,
|
||||
in the table. Ordinarily the <function>ambuild</> function will call
|
||||
<function>IndexBuildHeapScan()</> to scan the table for existing tuples
|
||||
and compute the keys that need to be inserted into the index.
|
||||
The function must return a palloc'd struct containing statistics about
|
||||
the new index.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
Reference in New Issue
Block a user