Skip to content

Commit 57ce746

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 26b27b2 commit 57ce746

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
@@ -258,8 +258,6 @@ test_sync(int writes_per_op)
258258
}
259259
else
260260
{
261-
if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
262-
die("could not open output file");
263261
START_TIMER;
264262
for (ops = 0; alarm_triggered == false; ops++)
265263
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy