1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Handle fsync failures in pg_receivewal and pg_recvlogical

It is not safe to simply report an fsync error and continue.  We must
exit the program instead.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Sehrope Sarkuni <sehrope@jackdb.com>
Discussion: https://www.postgresql.org/message-id/flat/9b49fe44-8f3e-eca9-5914-29e9e99030bf@2ndquadrant.com
This commit is contained in:
Peter Eisentraut
2019-07-29 07:41:06 +02:00
parent eb43f3d193
commit 1e2fddfa33
3 changed files with 9 additions and 9 deletions

View File

@ -864,7 +864,7 @@ tar_close(Walfile f, WalCloseMethod method)
/* Always fsync on close, so the padding gets fsynced */
if (tar_sync(f) < 0)
return -1;
exit(1);
/* Clean up and done */
pg_free(tf->pathname);