File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -350,12 +350,16 @@ SetPtrackClearLSN(bool set_invalid)
350
350
{
351
351
int fd ;
352
352
XLogRecPtr ptr ;
353
+ char file_path [MAXPGPATH ];
353
354
if (set_invalid )
354
355
ptr = InvalidXLogRecPtr ;
355
356
else
356
357
ptr = GetXLogInsertRecPtr ();
357
- //LWLockAcquire(ControlFileLock, LW_EXCLUSIVE);
358
- fd = BasicOpenFile ("global/ptrack_control" ,
358
+
359
+ join_path_components (file_path , DataDir , "global/ptrack_control" );
360
+ canonicalize_path (file_path );
361
+
362
+ fd = BasicOpenFile (file_path ,
359
363
O_RDWR | O_CREAT | PG_BINARY ,
360
364
S_IRUSR | S_IWUSR );
361
365
if (fd < 0 )
@@ -384,7 +388,6 @@ SetPtrackClearLSN(bool set_invalid)
384
388
ereport (PANIC ,
385
389
(errcode_for_file_access (),
386
390
errmsg ("could not close ptrack control file: %m" )));
387
- //LWLockRelease(ControlFileLock);
388
391
}
389
392
390
393
/* Test ptrack file */
You can’t perform that action at this time.
0 commit comments