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
This commit is contained in:
parent
1a7a43672b
commit
a6c845946d
|
@ -584,6 +584,7 @@ createBackupLabel(XLogRecPtr startpoint, TimeLineID starttli, XLogRecPtr checkpo
|
|||
/* TODO: move old file out of the way, if any. */
|
||||
open_target_file("backup_label", true); /* BACKUP_LABEL_FILE */
|
||||
write_target_range(buf, 0, len);
|
||||
close_target_file();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue