Skip to content

Commit fa5098d

Browse files
committed
pg_rewind: Close backup_label file descriptor.
This was a relatively harmless leak, as createBackupLabel() is only called once per pg_rewind invocation. Author: Michael Paquier Reported-By: Michael Paquier Discussion: CAB7nPqRnOw30gOXe2_SPLjh37bgm4V+txbYAPwoXb97nGQ297w@mail.gmail.com Backpatch: 9.5, where pg_rewind was introduced
1 parent ec8a30e commit fa5098d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/pg_rewind/pg_rewind.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli, XLogRecPtr checkpo
506506
/* TODO: move old file out of the way, if any. */
507507
open_target_file("backup_label", true); /* BACKUP_LABEL_FILE */
508508
write_target_range(buf, 0, len);
509+
close_target_file();
509510
}
510511

511512
/*

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