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:06:24 -0500
commita0165553619107f990cb7872f4a9573598319581 (patch)
tree47203d2140257deed0f89c9fa4da5629e8d8ae21
parentd5f4df7264ec73abda41eb78b81cf430b33f7606 (diff)
downloadpostgresql-a0165553619107f990cb7872f4a9573598319581.tar.gz
postgresql-a0165553619107f990cb7872f4a9573598319581.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 3352f046dca..c8427623d20 100644
--- a/contrib/pg_test_fsync/pg_test_fsync.c
+++ b/contrib/pg_test_fsync/pg_test_fsync.c
@@ -258,8 +258,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++)
{