>> > Great. Thanks for testing, and for the fix! Well that all sounds >> > like good news: it corrects the behaviour from 11.2, and also improves >> > on the previous behaviour which I'd have accepted as a bug if anyone >> > had reported it. So the next problem is that we don't have a >> > consensus on whether this is the right approach, so I don't feel like >> > I can commit it yet. Does any want to make another concrete proposal? >> >> Ok, here's the version I'm planning to push soon if there are no objections. >> Re-adding Bruce to the thread, as I just noticed the CC list got >> pruned at some point in this thread. Pushed. I also noticed that the call to sync_file_range() in file_utils.c used by fsync_pgdata() ignores the return code, and in the 9.4 and 9.5 branches, the call in pg_flush_data() ignores the return code too. This inconsistency should be fixed; I'll think about which direction it should be fixed in (either we are convinced that sync_file_range(SYNC_FILE_RANGE_WRITE) is non-destructive of error state or we aren't, and should handle it everywhere), and maybe start a new -hackers thread. -- Thomas Munro https://enterprisedb.com