diff options
Diffstat (limited to 'src/backend/catalog/heap.c')
| -rw-r--r-- | src/backend/catalog/heap.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index e4514c37ea..a3e6293074 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.298 2006/04/30 01:08:06 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.299 2006/05/10 23:18:39 tgl Exp $ * * * INTERFACE ROUTINES @@ -1921,17 +1921,14 @@ RelationTruncateIndexes(Oid heapId) RelationTruncate(currentIndex, 0); /* Initialize the index and rebuild */ - index_build(heapRelation, currentIndex, indexInfo); + /* Note: we do not need to re-establish pkey or toast settings */ + index_build(heapRelation, currentIndex, indexInfo, false, false); - /* - * index_build will close both the heap and index relations (but not - * give up the locks we hold on them). We're done with this index, - * but we must re-open the heap rel. - */ - heapRelation = heap_open(heapId, NoLock); + /* We're done with this index */ + index_close(currentIndex); } - /* Finish by closing the heap rel again */ + /* And now done with the heap; but keep lock until commit */ heap_close(heapRelation, NoLock); } |
