8000 Avoid file descriptor leak in pg_test_fsync. · leelingco/postgres@a855c90 · GitHub
[go: up one dir, main page]

Skip to content

Commit a855c90

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 33f642f commit a855c90

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
@@ -206,8 +206,6 @@ test_sync(int writes_per_op)
206206
}
207207
else
208208
{
209-
if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
210-
die("could not open output file");
211209
gettimeofday(&start_t, NULL);
212210
for (ops = 0; ops < ops_per_test; ops++)
213211
{

0 commit comments

Comments
 (0)
0