1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

heap_fetch requires buffer pointer, must be released; heap_getnext

no longer returns buffer pointer, can be gotten from scan;
	descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;
This commit is contained in:
Bruce Momjian
1998-08-19 02:04:17 +00:00
parent 31de2c9461
commit 7971539020
123 changed files with 2139 additions and 3134 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.31 1998/07/27 19:38:22 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.32 1998/08/19 02:03:08 momjian Exp $
*
* Notes:
* XXX This needs to use exception.h to handle recovery when
@@ -36,11 +36,9 @@
static void CatCacheRemoveCTup(CatCache *cache, Dlelem *e);
static Index CatalogCacheComputeHashIndex(struct catcache * cacheInP);
static Index
CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP,
static Index CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP,
Relation relation, HeapTuple tuple);
static void
CatalogCacheInitializeCache(struct catcache * cache,
static void CatalogCacheInitializeCache(struct catcache * cache,
Relation relation);
static long comphash(long l, char *v);
@@ -182,7 +180,7 @@ CatalogCacheInitializeCache(struct catcache * cache,
* ----------------
*/
Assert(RelationIsValid(relation));
cache->relationId = RelationGetRelationId(relation);
cache->relationId = RelationGetRelid(relation);
tupdesc = cache->cc_tupdesc = RelationGetTupleDescriptor(relation);
CACHE3_elog(DEBUG, "CatalogCacheInitializeCache: relid %d, %d keys",
@@ -250,7 +248,7 @@ CatalogCacheInitializeCache(struct catcache * cache,
*/
relation = index_openr(cache->cc_indname);
Assert(relation);
cache->indexId = RelationGetRelationId(relation);
cache->indexId = RelationGetRelid(relation);
index_close(relation);
}
else
@@ -827,7 +825,6 @@ SearchSysCache(struct catcache * cache,
CatCTup *nct2;
Dlelem *elt;
HeapTuple ntp = 0;
Buffer buffer;
Relation relation;
MemoryContext oldcxt;
@@ -997,8 +994,7 @@ SearchSysCache(struct catcache * cache,
sd = heap_beginscan(relation, 0, SnapshotNow,
cache->cc_nkeys, cache->cc_skey);
/* should this buffer be ReleaseBuffer'd? --djm 8/20/96 */
ntp = heap_getnext(sd, 0, &buffer);
ntp = heap_getnext(sd, 0);
MemoryContextSwitchTo((MemoryContext) CacheCxt);
@@ -1129,7 +1125,7 @@ RelationInvalidateCatalogCacheTuple(Relation relation,
* in the proper hash bucket
* ----------------
*/
relationId = RelationGetRelationId(relation);
relationId = RelationGetRelid(relation);
for (ccp = Caches; ccp; ccp = ccp->cc_next)
{