diff options
author | Andres Freund | 2016-03-27 20:48:31 +0000 |
---|---|---|
committer | Andres Freund | 2016-03-27 20:48:31 +0000 |
commit | a6c845946dac5c1f26cf8729cf61f1d852f75484 (patch) | |
tree | dd2d06c4fc7ce91dd56a270aa1c6ffd4596887aa | |
parent | 1a7a43672bf2939dda93a27d498349e7a4aa3c14 (diff) |
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
-rw-r--r-- | src/bin/pg_rewind/pg_rewind.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 96a42f8e331..c5589b9bb3a 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -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(); } /* |