The open_datasync code opens the output file as a test to make sure the
flags are accepted by the OS, and if it succeeds it then immediately opens
the file again with the same flags, overwriting and so leaking the
descriptor from the previous open.


On Windows MinGW, this prevents the final unlink from working, as the file
is still open.

Trivial fix attached.

Thanks,

Jeff

Attachment: pg_test_fsync_leak.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to