File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ static int NSmgr = 0;
69
69
70
70
static Size LargestSMgrRelationSize = 0 ;
71
71
72
+ SMgrId storage_manager_id ;
73
+
72
74
/*
73
75
* Each backend has a hashtable that stores all extant SMgrRelation objects.
74
76
* In addition, "unpinned" SMgrRelation objects are chained together in a list.
@@ -227,7 +229,7 @@ smgropen(RelFileLocator rlocator, ProcNumber backend)
227
229
for (int i = 0 ; i <= MAX_FORKNUM ; ++ i )
228
230
reln -> smgr_cached_nblocks [i ] = InvalidBlockNumber ;
229
231
230
- reln -> smgr_which = MdSMgrId ; /* we only have md.c at present */
232
+ reln -> smgr_which = storage_manager_id ;
231
233
232
234
/* implementation-specific initialization */
233
235
smgrsw [reln -> smgr_which ].smgr_open (reln );
Original file line number Diff line number Diff line change @@ -1931,6 +1931,8 @@ void
1931
1931
register_builtin_dynamic_managers (void )
1932
1932
{
1933
1933
mdsmgr_register ();
1934
+
1935
+ storage_manager_id = MdSMgrId ;
1934
1936
}
1935
1937
1936
1938
/*
Original file line number Diff line number Diff line change 20
20
21
21
typedef uint8 SMgrId ;
22
22
23
+ extern PGDLLIMPORT SMgrId storage_manager_id ;
24
+
23
25
/*
24
26
* smgr.c maintains a table of SMgrRelation objects, which are essentially
25
27
* cached file handles. An SMgrRelation is created (if not already present)
You can’t perform that action at this time.
0 commit comments