mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +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:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/genam.h,v 1.59 2006/05/02 22:25:10 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/genam.h,v 1.60 2006/05/10 23:18:39 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -20,6 +20,15 @@
|
||||
#include "nodes/primnodes.h"
|
||||
|
||||
|
||||
/*
|
||||
* Struct for statistics returned by ambuild
|
||||
*/
|
||||
typedef struct IndexBuildResult
|
||||
{
|
||||
double heap_tuples; /* # of tuples seen in parent table */
|
||||
double index_tuples; /* # of tuples inserted into index */
|
||||
} IndexBuildResult;
|
||||
|
||||
/*
|
||||
* Struct for input arguments passed to ambulkdelete and amvacuumcleanup
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user