Skip to content

Commit a9f3280

Browse files
committed
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
1 parent 78f91f1 commit a9f3280

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

contrib/pg_test_fsync/pg_test_fsync.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,6 @@ test_sync(int writes_per_op)
259259
}
260260
else
261261
{
262-
if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
263-
die("could not open output file");
264262
START_TIMER;
265263
for (ops = 0; alarm_triggered == false; ops++)
266264
{

0 commit comments

Comments
 (0)