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

Commit56f2cc8

Browse files
committed
Start using absolute path for clear ptrack control file.
1 parentd1ce2ab commit56f2cc8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎src/backend/access/heap/ptrack.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,16 @@ SetPtrackClearLSN(bool set_invalid)
350350
{
351351
intfd;
352352
XLogRecPtrptr;
353+
charfile_path[MAXPGPATH];
353354
if (set_invalid)
354355
ptr=InvalidXLogRecPtr;
355356
else
356357
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,
359363
O_RDWR |O_CREAT |PG_BINARY,
360364
S_IRUSR |S_IWUSR);
361365
if (fd<0)
@@ -384,7 +388,6 @@ SetPtrackClearLSN(bool set_invalid)
384388
ereport(PANIC,
385389
(errcode_for_file_access(),
386390
errmsg("could not close ptrack control file: %m")));
387-
//LWLockRelease(ControlFileLock);
388391
}
389392

390393
/* Test ptrack file */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp