|
|
|
@ -134,10 +134,10 @@ open_walfile(StreamCtl *stream, XLogRecPtr startpoint) |
|
|
|
/* fsync file in case of a previous crash */ |
|
|
|
/* fsync file in case of a previous crash */ |
|
|
|
if (stream->walmethod->sync(f) != 0) |
|
|
|
if (stream->walmethod->sync(f) != 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pg_log_error("could not fsync existing write-ahead log file \"%s\": %s", |
|
|
|
pg_log_fatal("could not fsync existing write-ahead log file \"%s\": %s", |
|
|
|
fn, stream->walmethod->getlasterror()); |
|
|
|
fn, stream->walmethod->getlasterror()); |
|
|
|
stream->walmethod->close(f, CLOSE_UNLINK); |
|
|
|
stream->walmethod->close(f, CLOSE_UNLINK); |
|
|
|
return false; |
|
|
|
exit(1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
walfile = f; |
|
|
|
walfile = f; |
|
|
|
@ -763,9 +763,9 @@ HandleCopyStream(PGconn *conn, StreamCtl *stream, |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (stream->walmethod->sync(walfile) != 0) |
|
|
|
if (stream->walmethod->sync(walfile) != 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pg_log_error("could not fsync file \"%s\": %s", |
|
|
|
pg_log_fatal("could not fsync file \"%s\": %s", |
|
|
|
current_walfile_name, stream->walmethod->getlasterror()); |
|
|
|
current_walfile_name, stream->walmethod->getlasterror()); |
|
|
|
goto error; |
|
|
|
exit(1); |
|
|
|
} |
|
|
|
} |
|
|
|
lastFlushPosition = blockpos; |
|
|
|
lastFlushPosition = blockpos; |
|
|
|
|
|
|
|
|
|
|
|
@ -1015,9 +1015,9 @@ ProcessKeepaliveMsg(PGconn *conn, StreamCtl *stream, char *copybuf, int len, |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
if (stream->walmethod->sync(walfile) != 0) |
|
|
|
if (stream->walmethod->sync(walfile) != 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pg_log_error("could not fsync file \"%s\": %s", |
|
|
|
pg_log_fatal("could not fsync file \"%s\": %s", |
|
|
|
current_walfile_name, stream->walmethod->getlasterror()); |
|
|
|
current_walfile_name, stream->walmethod->getlasterror()); |
|
|
|
return false; |
|
|
|
exit(1); |
|
|
|
} |
|
|
|
} |
|
|
|
lastFlushPosition = blockpos; |
|
|
|
lastFlushPosition = blockpos; |
|
|
|
} |
|
|
|
} |
|
|
|
|