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

Commit230cf8d

Browse files
committed
Check for link(2) failure.
1 parent9ee598e commit230cf8d

File tree

1 file changed

+6
-2
lines changed
  • src/backend/access/transam

1 file changed

+6
-2
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.34 2000/11/25 20:33:50 tgl Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.35 2000/11/27 05:36:12 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -860,7 +860,11 @@ XLogFileInit(uint32 log, uint32 seg, bool *usexistent)
860860
log,seg,0);
861861

862862
close(fd);
863-
link(tpath,path);
863+
864+
if (link(tpath,path)<0)
865+
elog(STOP,"InitRelink(logfile %u seg %u) failed: %m",
866+
logId,logSeg);
867+
864868
unlink(tpath);
865869

866870
fd=BasicOpenFile(path,O_RDWR |PG_BINARY,S_IRUSR |S_IWUSR);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp