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

Commit9f51be4

Browse files
committed
Purge prel_resowner hashtable in fini_local_cache.
Wobbling with it in 'resonwner_prel_callback' after all cache was purged is anerror.
1 parent5f6de23 commit9f51be4

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

‎src/include/relation_info.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ void init_relation_info_static_data(void);
401401
/* For pg_pathman.enable_bounds_cache GUC */
402402
externboolpg_pathman_enable_bounds_cache;
403403

404+
externHTAB*prel_resowner;
404405

405406
/* This allows us to track leakers of PartRelationInfo */
406407
#ifdefUSE_RELINFO_LEAK_TRACKER
@@ -419,7 +420,7 @@ extern intprel_resowner_line;
419420
close_pathman_relation_info(prel); \
420421
prel = NULL; \
421422
} while (0)
422-
#endif
423+
#endif/* USE_RELINFO_LEAK_TRACKER */
423424

424425

425426
#endif/* RELATION_INFO_H */

‎src/init.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,12 @@ fini_local_cache(void)
389389
status_cache=NULL;
390390
bounds_cache=NULL;
391391

392+
if (prel_resowner!=NULL)
393+
{
394+
hash_destroy(prel_resowner);
395+
prel_resowner=NULL;
396+
}
397+
392398
/* Now we can clear allocations */
393399
MemoryContextReset(PathmanParentsCacheContext);
394400
MemoryContextReset(PathmanStatusCacheContext);

‎src/relation_info.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ static booldelayed_shutdown = false; /* pathman was dropped */
129129

130130
/*
131131
* PartRelationInfo is controlled by ResourceOwner;
132+
* resowner -> List of controlled PartRelationInfos by this ResourceOwner
132133
*/
133-
staticHTAB*prel_resowner=NULL;
134+
HTAB*prel_resowner=NULL;
134135

135136

136137
/* Handy wrappers for Oids */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp