mkabilov / logical_backup

[WIP] Continuous backup of the tables using PostgreSQL logical replication
MIT License
9 stars 3 forks source link

Write current deltas into a memory buffer instead of a disk file. #16

Closed alexeyklyukin closed 6 years ago

alexeyklyukin commented 6 years ago

Flush the buffer into a disk file once we have filled the delta up to a threshold, or when the archiver decides to archive the file due to the timeout.

Call fsync on the files and parent directory entries if fsync is on. This is done both when the buffers are flushed, as well as when the file is copied to the final directory.