~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to src/include/access/genam.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8
8
 * Portions Copyright (c) 1994, Regents of the University of California
9
9
 *
10
 
 * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.76 2009/03/24 20:17:14 tgl Exp $
 
10
 * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.78 2009/06/11 14:49:08 momjian Exp $
11
11
 *
12
12
 *-------------------------------------------------------------------------
13
13
 */
34
34
/*
35
35
 * Struct for input arguments passed to ambulkdelete and amvacuumcleanup
36
36
 *
37
 
 * Note that num_heap_tuples will not be valid during ambulkdelete,
38
 
 * only amvacuumcleanup.
 
37
 * num_heap_tuples is accurate only when estimated_count is false;
 
38
 * otherwise it's just an estimate (currently, the estimate is the
 
39
 * prior value of the relation's pg_class.reltuples field).  It will
 
40
 * always just be an estimate during ambulkdelete.
39
41
 */
40
42
typedef struct IndexVacuumInfo
41
43
{
42
44
        Relation        index;                  /* the index being vacuumed */
43
45
        bool            vacuum_full;    /* VACUUM FULL (we have exclusive lock) */
44
46
        bool            analyze_only;   /* ANALYZE (without any actual vacuum) */
 
47
        bool            estimated_count;        /* num_heap_tuples is an estimate */
45
48
        int                     message_level;  /* ereport level for progress messages */
46
49
        double          num_heap_tuples;        /* tuples remaining in heap */
47
50
        BufferAccessStrategy strategy;          /* access strategy for reads */
60
63
 *
61
64
 * Note: pages_removed is the amount by which the index physically shrank,
62
65
 * if any (ie the change in its total size on disk).  pages_deleted and
63
 
 * pages_free refer to free space within the index file.
 
66
 * pages_free refer to free space within the index file.  Some index AMs
 
67
 * may compute num_index_tuples by reference to num_heap_tuples, in which
 
68
 * case they should copy the estimated_count field from IndexVacuumInfo.
64
69
 */
65
70
typedef struct IndexBulkDeleteResult
66
71
{
67
72
        BlockNumber num_pages;          /* pages remaining in index */
68
73
        BlockNumber pages_removed;      /* # removed during vacuum operation */
 
74
        bool            estimated_count;        /* num_index_tuples is an estimate */
69
75
        double          num_index_tuples;               /* tuples remaining */
70
76
        double          tuples_removed; /* # removed during vacuum operation */
71
77
        BlockNumber pages_deleted;      /* # unused pages in index */
104
110
                                Snapshot snapshot,
105
111
                                int nkeys, ScanKey key);
106
112
extern IndexScanDesc index_beginscan_bitmap(Relation indexRelation,
107
 
                                          Snapshot snapshot,
108
 
                                          int nkeys, ScanKey key);
 
113
                                           Snapshot snapshot,
 
114
                                           int nkeys, ScanKey key);
109
115
extern void index_rescan(IndexScanDesc scan, ScanKey key);
110
116
extern void index_endscan(IndexScanDesc scan);
111
117
extern void index_markpos(IndexScanDesc scan);
143
149
extern bool systable_recheck_tuple(SysScanDesc sysscan, HeapTuple tup);
144
150
extern void systable_endscan(SysScanDesc sysscan);
145
151
extern SysScanDesc systable_beginscan_ordered(Relation heapRelation,
146
 
                                                                                          Relation indexRelation,
147
 
                                                                                          Snapshot snapshot,
148
 
                                                                                          int nkeys, ScanKey key);
 
152
                                                   Relation indexRelation,
 
153
                                                   Snapshot snapshot,
 
154
                                                   int nkeys, ScanKey key);
149
155
extern HeapTuple systable_getnext_ordered(SysScanDesc sysscan,
150
 
                                                                                  ScanDirection direction);
 
156
                                                 ScanDirection direction);
151
157
extern void systable_endscan_ordered(SysScanDesc sysscan);
152
158
 
153
159
#endif   /* GENAM_H */