mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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:
@ -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();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user