1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Initial MVCC code.

New code for locking buffer' context.
This commit is contained in:
Vadim B. Mikheev
1998-12-15 12:47:01 +00:00
parent c5a27161a1
commit 3f7fbf85dc
65 changed files with 1391 additions and 1282 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.19 1998/11/27 19:52:23 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.20 1998/12/15 12:46:34 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@ -109,7 +109,7 @@ SetDefine(char *querystr, char *typename)
/* change the pg_proc tuple */
procrel = heap_openr(ProcedureRelationName);
RelationSetLockForWrite(procrel);
LockRelation(procrel, AccessExclusiveLock);
tup = SearchSysCacheTuple(PROOID,
ObjectIdGetDatum(setoid),
@ -123,7 +123,7 @@ SetDefine(char *querystr, char *typename)
repl);
setheapoverride(true);
heap_replace(procrel, &tup->t_self, newtup);
heap_replace(procrel, &tup->t_self, newtup, NULL);
setheapoverride(false);
setoid = newtup->t_data->t_oid;
@ -139,7 +139,7 @@ SetDefine(char *querystr, char *typename)
CatalogIndexInsert(idescs, Num_pg_proc_indices, procrel, newtup);
CatalogCloseIndices(Num_pg_proc_indices, idescs);
}
RelationUnsetLockForWrite(procrel);
UnlockRelation(procrel, AccessExclusiveLock);
heap_close(procrel);
}
return setoid;