|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.27 1999/07/15 23:03:00 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.28 1999/08/08 20:12:51 tgl Exp $ |
11 | 11 | *
|
12 | 12 | *
|
13 | 13 | * NOTES
|
@@ -43,6 +43,28 @@ static BTScanList BTScans = (BTScanList) NULL;
|
43 | 43 |
|
44 | 44 | staticvoid_bt_scandel(IndexScanDescscan,BlockNumberblkno,OffsetNumberoffno);
|
45 | 45 |
|
| 46 | +/* |
| 47 | + * AtEOXact_nbtree() --- clean up nbtree subsystem at xact abort or commit. |
| 48 | + * |
| 49 | + * This is here because it needs to touch this module's static var BTScans. |
| 50 | + */ |
| 51 | +void |
| 52 | +AtEOXact_nbtree(void) |
| 53 | +{ |
| 54 | +/* Note: these actions should only be necessary during xact abort; |
| 55 | + * but they can't hurt during a commit. |
| 56 | + */ |
| 57 | + |
| 58 | +/* Reset the active-scans list to empty. |
| 59 | + * We do not need to free the list elements, because they're all |
| 60 | + * palloc()'d, so they'll go away at end of transaction anyway. |
| 61 | + */ |
| 62 | +BTScans=NULL; |
| 63 | + |
| 64 | +/* If we were building a btree, we ain't anymore. */ |
| 65 | +BuildingBtree= false; |
| 66 | +} |
| 67 | + |
46 | 68 | /*
|
47 | 69 | *_bt_regscan() -- register a new scan.
|
48 | 70 | */
|
|