On Fri, Sep 13, 2019 at 1:08 PM vignesh C <vignes...@gmail.com> wrote: > Instead of reading the whole file here, we can read the file page by page. > There is a possibility of data inconsistency if data is not read page by > page, data will be consistent if read page by page as full page write will be > enabled at this time.
I think you are confused about what "full page writes" means. It has to do what gets written to the write-ahead log, not the way that the pages themselves are written. There is no portable way to ensure that an 8kB read or write is atomic, and generally it isn't. It shouldn't matter whether the file is read all at once, page by page, or byte by byte, except for performance. Recovery is going to run when that backup is restored, and any inconsistencies should get fixed up at that time. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company