mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Avoid file descriptor leak in pg_test_fsync.
This can cause problems on Windows, where files that are still open can't be unlinked. Jeff Janes
This commit is contained in:
parent
33f642f23a
commit
a855c90a72
@ -206,8 +206,6 @@ test_sync(int writes_per_op)
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
|
||||
die("could not open output file");
|
||||
gettimeofday(&start_t, NULL);
|
||||
for (ops = 0; ops < ops_per_test; ops++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user