summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas2014-11-19 16:57:54 +0000
committerRobert Haas2014-11-19 17:26:06 +0000
commita855c90a72d2a6aed975ba5a51868f41f6578be8 (patch)
tree356077c322ec159b29040e9be3e49566b2c6ef0c
parent33f642f23a34ab66e59008a6861b169e79bcf9bf (diff)
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
-rw-r--r--contrib/pg_test_fsync/pg_test_fsync.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c
index 3791f5a0719..43b494cdf1b 100644
--- a/contrib/pg_test_fsync/pg_test_fsync.c
+++ b/contrib/pg_test_fsync/pg_test_fsync.c
@@ -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++)
{