@@ -1299,35 +1299,36 @@ mdregistersync(SMgrRelation reln, ForkNumber forknum)
1299
1299
{
1300
1300
int segno ;
1301
1301
int min_inactive_seg ;
1302
+ MdSMgrRelation mdreln = (MdSMgrRelation ) reln ;
1302
1303
1303
1304
/*
1304
1305
* NOTE: mdnblocks makes sure we have opened all active segments, so that
1305
1306
* the loop below will get them all!
1306
1307
*/
1307
1308
mdnblocks (reln , forknum );
1308
1309
1309
- min_inactive_seg = segno = reln -> md_num_open_segs [forknum ];
1310
+ min_inactive_seg = segno = mdreln -> md_num_open_segs [forknum ];
1310
1311
1311
1312
/*
1312
1313
* Temporarily open inactive segments, then close them after sync. There
1313
1314
* may be some inactive segments left opened after error, but that is
1314
1315
* harmless. We don't bother to clean them up and take a risk of further
1315
1316
* trouble. The next mdclose() will soon close them.
1316
1317
*/
1317
- while (_mdfd_openseg (reln , forknum , segno , 0 ) != NULL )
1318
+ while (_mdfd_openseg (mdreln , forknum , segno , 0 ) != NULL )
1318
1319
segno ++ ;
1319
1320
1320
1321
while (segno > 0 )
1321
1322
{
1322
- MdfdVec * v = & reln -> md_seg_fds [forknum ][segno - 1 ];
1323
+ MdfdVec * v = & mdreln -> md_seg_fds [forknum ][segno - 1 ];
1323
1324
1324
- register_dirty_segment (reln , forknum , v );
1325
+ register_dirty_segment (mdreln , forknum , v );
1325
1326
1326
1327
/* Close inactive segments immediately */
1327
1328
if (segno > min_inactive_seg )
1328
1329
{
1329
1330
FileClose (v -> mdfd_vfd );
1330
- _fdvec_resize (reln , forknum , segno - 1 );
1331
+ _fdvec_resize (mdreln , forknum , segno - 1 );
1331
1332
}
1332
1333
1333
1334
segno -- ;
0 commit comments