Index: src/backend/commands/prepare.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/backend/commands/prepare.c,v
retrieving revision 1.2
diff -c -r1.2 prepare.c
*** src/backend/commands/prepare.c	4 Sep 2002 20:31:15 -0000	1.2
--- src/backend/commands/prepare.c	13 Sep 2002 18:00:30 -0000
***************
*** 248,254 ****
  		elog(ERROR, "Prepared statement with name \"%s\" already exists",
  			 stmt_name);
  
! 	/* Okay. Make a permanent memory context for the hashtable entry */
  	entrycxt = AllocSetContextCreate(TopMemoryContext,
  									 stmt_name,
  									 1024,
--- 248,254 ----
  		elog(ERROR, "Prepared statement with name \"%s\" already exists",
  			 stmt_name);
  
! 	/* Make a permanent memory context for the hashtable entry */
  	entrycxt = AllocSetContextCreate(TopMemoryContext,
  									 stmt_name,
  									 1024,
***************
*** 399,406 ****
  			 stmt->name);
  
  	/* Flush the context holding the subsidiary data */
! 	if (MemoryContextIsValid(entry->context))
! 		MemoryContextDelete(entry->context);
  
  	/* Now we can remove the hash table entry */
  	hash_search(prepared_queries, key, HASH_REMOVE, NULL);
--- 399,406 ----
  			 stmt->name);
  
  	/* Flush the context holding the subsidiary data */
! 	Assert(MemoryContextIsValid(entry->context));
! 	MemoryContextDelete(entry->context);
  
  	/* Now we can remove the hash table entry */
  	hash_search(prepared_queries, key, HASH_REMOVE, NULL);
Index: src/backend/storage/buffer/bufmgr.c
===================================================================
RCS file: /var/lib/cvs/pgsql-server/src/backend/storage/buffer/bufmgr.c,v
retrieving revision 1.132
diff -c -r1.132 bufmgr.c
*** src/backend/storage/buffer/bufmgr.c	4 Sep 2002 20:31:25 -0000	1.132
--- src/backend/storage/buffer/bufmgr.c	13 Sep 2002 18:00:56 -0000
***************
*** 316,322 ****
  		{
  			/*
  			 * I couldn't understand the following old comment. If there's
! 			 * no IO for the buffer and the buffer is BROKEN,it should be
  			 * read again. So start a new buffer IO here.
  			 *
  			 * wierd race condition:
--- 316,322 ----
  		{
  			/*
  			 * I couldn't understand the following old comment. If there's
! 			 * no IO for the buffer and the buffer is BROKEN, it should be
  			 * read again. So start a new buffer IO here.
  			 *
  			 * wierd race condition:
