aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-03-03 17:47:56 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-03-03 17:47:56 +0000
commit26ac2171735f288a1380e173ffbb6af1a50183d8 (patch)
treee2604a289c8065884497475e46b1b2731b867267 /src/backend/access
parent592caa089756d1b9ddf2675e9027d0c8635a6918 (diff)
downloadpostgresql-26ac2171735f288a1380e173ffbb6af1a50183d8.tar.gz
postgresql-26ac2171735f288a1380e173ffbb6af1a50183d8.zip
Catcaches can now store negative entries as well as positive ones, to
speed up repetitive failed searches; per pghackers discussion in late January. inval.c logic substantially simplified, since we can now treat inserts and deletes alike as far as inval events are concerned. Some repair work needed in heap_create_with_catalog, which turns out to have been doing CommandCounterIncrement at a point where the new relation has non-self-consistent catalog entries. With the new inval code, that resulted in assert failures during a relcache entry rebuild.
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/heap/heapam.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 51f1c63d704..adcf9bc6cb6 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.130 2002/03/02 21:39:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.131 2002/03/03 17:47:53 tgl Exp $
*
*
* INTERFACE ROUTINES
@@ -1131,12 +1131,12 @@ heap_insert(Relation relation, HeapTuple tup)
WriteBuffer(buffer);
/*
- * If tuple is cachable, mark it for rollback from the caches in case
+ * If tuple is cachable, mark it for invalidation from the caches in case
* we abort. Note it is OK to do this after WriteBuffer releases the
* buffer, because the "tup" data structure is all in local memory,
* not in the shared buffer.
*/
- RelationMark4RollbackHeapTuple(relation, tup);
+ CacheInvalidateHeapTuple(relation, tup);
return tup->t_data->t_oid;
}
@@ -1278,7 +1278,7 @@ l1:
* look at the contents of the tuple, so we need to hold our refcount
* on the buffer.
*/
- RelationInvalidateHeapTuple(relation, &tp);
+ CacheInvalidateHeapTuple(relation, &tp);
WriteBuffer(buffer);
@@ -1585,19 +1585,19 @@ l2:
* boundary. We have to do this before WriteBuffer because we need to
* look at the contents of the tuple, so we need to hold our refcount.
*/
- RelationInvalidateHeapTuple(relation, &oldtup);
+ CacheInvalidateHeapTuple(relation, &oldtup);
if (newbuf != buffer)
WriteBuffer(newbuf);
WriteBuffer(buffer);
/*
- * If new tuple is cachable, mark it for rollback from the caches in
+ * If new tuple is cachable, mark it for invalidation from the caches in
* case we abort. Note it is OK to do this after WriteBuffer releases
* the buffer, because the "newtup" data structure is all in local
* memory, not in the shared buffer.
*/
- RelationMark4RollbackHeapTuple(relation, newtup);
+ CacheInvalidateHeapTuple(relation, newtup);
return HeapTupleMayBeUpdated;
}