diff options
author | Robert Haas | 2014-11-19 16:57:54 +0000 |
---|---|---|
committer | Robert Haas | 2014-11-19 17:26:06 +0000 |
commit | a855c90a72d2a6aed975ba5a51868f41f6578be8 (patch) | |
tree | 356077c322ec159b29040e9be3e49566b2c6ef0c | |
parent | 33f642f23a34ab66e59008a6861b169e79bcf9bf (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.c | 2 |
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++) { |