File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,7 @@ void init_relation_info_static_data(void);
401401/* For pg_pathman.enable_bounds_cache GUC */
402402extern bool pg_pathman_enable_bounds_cache ;
403403
404+ extern HTAB * prel_resowner ;
404405
405406/* This allows us to track leakers of PartRelationInfo */
406407#ifdef USE_RELINFO_LEAK_TRACKER
@@ -419,7 +420,7 @@ extern int prel_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 */
Original file line number Diff line number Diff 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 );
Original file line number Diff line number Diff line change @@ -129,8 +129,9 @@ static bool delayed_shutdown = false; /* pathman was dropped */
129129
130130/*
131131 * PartRelationInfo is controlled by ResourceOwner;
132+ * resowner -> List of controlled PartRelationInfos by this ResourceOwner
132133 */
133- static HTAB * prel_resowner = NULL ;
134+ HTAB * prel_resowner = NULL ;
134135
135136
136137/* Handy wrappers for Oids */
You can’t perform that action at this time.
0 commit comments