aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/access/transam/xlog.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index fd99732d213..b31a6182ee2 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.34 2000/11/25 20:33:50 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.35 2000/11/27 05:36:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -860,7 +860,11 @@ XLogFileInit(uint32 log, uint32 seg, bool *usexistent)
log, seg, 0);
close(fd);
- link(tpath, path);
+
+ if (link(tpath, path) < 0)
+ elog(STOP, "InitRelink(logfile %u seg %u) failed: %m",
+ logId, logSeg);
+
unlink(tpath);
fd = BasicOpenFile(path, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR);