mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-10 20:17:41 +08:00
Fsync directory after creating or unlinking file.
If file was created/deleted just before powerloss it's possible that file system will miss that. To prevent it, call fsync() where creating/ unlinkg file is critical. Author: Michael Paquier Reviewed-by: Ashutosh Bapat, Takayuki Tsunakawa, me
This commit is contained in:
@ -119,6 +119,7 @@ extern int pg_fdatasync(int fd);
|
||||
extern void pg_flush_data(int fd, off_t offset, off_t amount);
|
||||
extern void fsync_fname(const char *fname, bool isdir);
|
||||
extern int durable_rename(const char *oldfile, const char *newfile, int loglevel);
|
||||
extern int durable_unlink(const char *fname, int loglevel);
|
||||
extern int durable_link_or_rename(const char *oldfile, const char *newfile, int loglevel);
|
||||
extern void SyncDataDirectory(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user