Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9be1bc

Browse files
committed
RelationPurgeLocalRelation():
/* * RelationFlushRelation () below will flush relation information * from the cache. We must call smgrclose to flush relation * information from SMGR & FMGR, too. We assume that for temp * relations smgrunlink is already called by heap_destroyr * and we skip smgrclose for them. - vadim 05/22/97 */ smgrclose(reln->rd_rel->relsmgr, reln); - it avoids memory leaks in SMGR & VFD.RelationFlushRelation(): there is no more call FileInvalidate(RelationGetSystemPort(relation)); - invalid (FileInvalidate() expects File, not SMGR' fd) - unuseful anyway.
1 parent1926906 commitc9be1bc

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎src/backend/utils/cache/relcache.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.7 1997/05/20 11:41:38 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.8 1997/05/22 17:24:20 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1217,9 +1217,7 @@ RelationFlushRelation(Relation *relationPtr,
12171217
oldcxt=MemoryContextSwitchTo((MemoryContext)CacheCxt);
12181218

12191219
RelationCacheDelete(relation);
1220-
1221-
FileInvalidate(RelationGetSystemPort(relation));
1222-
1220+
12231221
p=relation->rd_att->attrs;
12241222
for (i=0;i<relation->rd_rel->relnatts;i++,p++)
12251223
pfree (*p);
@@ -1425,6 +1423,15 @@ RelationPurgeLocalRelation(bool xactCommitted)
14251423
smgrunlink(reln->rd_rel->relsmgr,reln);
14261424
}
14271425
}
1426+
elseif ( !IsBootstrapProcessingMode ()&& !(reln->rd_istemp) )
1427+
/*
1428+
* RelationFlushRelation () below will flush relation information
1429+
* from the cache. We must call smgrclose to flush relation
1430+
* information from SMGR & FMGR, too. We assume that for temp
1431+
* relations smgrunlink is already called by heap_destroyr
1432+
* and we skip smgrclose for them.- vadim 05/22/97
1433+
*/
1434+
smgrclose(reln->rd_rel->relsmgr,reln);
14281435

14291436
reln->rd_islocal= FALSE;
14301437

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp