Fix errno check based on EINTR in pg_flush_data()

Upon a failure of sync_file_range(), EINTR was checked based on the
returned result of the routine rather than its errno.  sync_file_range()
returns -1 on failure, making the check a no-op, invalidating the retry
attempt in this case.

Oversight in 0d369ac65004.

Author: DaeMyung Kang <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 16

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3b35c10a4d503a64a6bc110de3330a337bc1a362

Modified Files
--------------
src/backend/storage/file/fd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Reply via email to