aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-11-19 11:57:54 -0500
committerRobert Haas <rhaas@postgresql.org>2014-11-19 12:13:14 -0500
commita9f3280efee0d3c4f697ef33f28cbc8e626f9e86 (patch)
tree75b59b119e1d26edd2687426b3e36ab9ee4b6bdd
parent78f91f1a888008f329b1a6db673713d25bbd819b (diff)
downloadpostgresql-a9f3280efee0d3c4f697ef33f28cbc8e626f9e86.tar.gz
postgresql-a9f3280efee0d3c4f697ef33f28cbc8e626f9e86.zip
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 842295ae3d9..37298be56e6 100644
--- a/contrib/pg_test_fsync/pg_test_fsync.c
+++ b/contrib/pg_test_fsync/pg_test_fsync.c
@@ -259,8 +259,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");
START_TIMER;
for (ops = 0; alarm_triggered == false; ops++)
{