mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
1. Fix md memory leak:
mdunlink() and mdclose() (too !!!) now free MdfdVec for relation and add it to free list, so it may be re-used for another relation later. 2. Fix VFD-manager memory leak (found by Massimo ... and me): mdunlink() has to call FileUnlink() to free allocation for fileName and add the Vfd slot to the free list.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.5 1996/11/27 07:25:52 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.6 1997/05/22 17:08:35 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -189,6 +189,13 @@ smgropen(int16 which, Relation reln)
|
||||
/*
|
||||
* smgrclose() -- Close a relation.
|
||||
*
|
||||
* NOTE: mdclose frees fd vector! It may be re-used for other relation!
|
||||
* reln should be flushed from cache after closing !..
|
||||
* Currently, smgrclose is calling by
|
||||
* relcache.c:RelationPurgeLocalRelation() only.
|
||||
* It would be nice to have smgrfree(), but because of
|
||||
* smgrclose is called from single place... - vadim 05/22/97
|
||||
*
|
||||
* Returns SM_SUCCESS on success, aborts on failure.
|
||||
*/
|
||||
int
|
||||
|
Reference in New Issue
Block a user