diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/heapam.h | 4 | ||||
| -rw-r--r-- | src/include/access/relscan.h | 7 | ||||
| -rw-r--r-- | src/include/pgstat.h | 8 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 206159bdad..cade6a26aa 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.125 2007/06/08 18:23:53 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.126 2007/06/09 18:49:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -141,6 +141,8 @@ extern Relation heap_openrv(const RangeVar *relation, LOCKMODE lockmode); extern HeapScanDesc heap_beginscan(Relation relation, Snapshot snapshot, int nkeys, ScanKey key); +extern HeapScanDesc heap_beginscan_bm(Relation relation, Snapshot snapshot, + int nkeys, ScanKey key); extern void heap_rescan(HeapScanDesc scan, ScanKey key); extern void heap_endscan(HeapScanDesc scan); extern HeapTuple heap_getnext(HeapScanDesc scan, ScanDirection direction); diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index b45b2caabf..15b9b8a337 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/relscan.h,v 1.55 2007/06/08 18:23:53 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/relscan.h,v 1.56 2007/06/09 18:49:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -26,12 +26,13 @@ typedef struct HeapScanDescData Snapshot rs_snapshot; /* snapshot to see */ int rs_nkeys; /* number of scan keys */ ScanKey rs_key; /* array of scan key descriptors */ + bool rs_bitmapscan; /* true if this is really a bitmap scan */ + bool rs_pageatatime; /* verify visibility page-at-a-time? */ /* state set up at initscan time */ BlockNumber rs_nblocks; /* number of blocks to scan */ BlockNumber rs_startblock; /* block # to start at */ BufferAccessStrategy rs_strategy; /* access strategy for reads */ - bool rs_pageatatime; /* verify visibility page-at-a-time? */ bool rs_syncscan; /* report location to syncscan logic? */ /* scan current state */ @@ -42,7 +43,7 @@ typedef struct HeapScanDescData /* NB: if rs_cbuf is not InvalidBuffer, we hold a pin on that buffer */ ItemPointerData rs_mctid; /* marked scan position, if any */ - /* these fields only used in page-at-a-time mode */ + /* these fields only used in page-at-a-time mode and for bitmap scans */ int rs_cindex; /* current tuple's index in vistuples */ int rs_mindex; /* marked tuple's saved index */ int rs_ntuples; /* number of visible tuples on page */ diff --git a/src/include/pgstat.h b/src/include/pgstat.h index ff050e6e45..da91033353 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -5,7 +5,7 @@ * * Copyright (c) 2001-2007, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.61 2007/05/27 17:28:36 tgl Exp $ + * $PostgreSQL: pgsql/src/include/pgstat.h,v 1.62 2007/06/09 18:49:55 tgl Exp $ * ---------- */ #ifndef PGSTAT_H @@ -518,12 +518,6 @@ extern void pgstat_initstats(Relation rel); if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ (rel)->pgstat_info->t_counts.t_numscans++; \ } while (0) -/* kluge for bitmap scans: */ -#define pgstat_discount_heap_scan(rel) \ - do { \ - if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ - (rel)->pgstat_info->t_counts.t_numscans--; \ - } while (0) #define pgstat_count_heap_getnext(rel) \ do { \ if (pgstat_collect_tuplelevel && (rel)->pgstat_info != NULL) \ |
