1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2024-12-04 10:44:46 +02:00

use PG_BINARY_A flag when opening file with map headers

This commit is contained in:
Grigory Smolkin 2021-03-29 15:11:36 +03:00
parent 15c90460fd
commit b794fbc723

View File

@ -2268,7 +2268,7 @@ write_page_headers(BackupPageHeader2 *headers, pgFile *file, HeaderMap *hdr_map,
{
elog(LOG, "Creating page header map \"%s\"", map_path);
hdr_map->fp = fopen(map_path, "a");
hdr_map->fp = fopen(map_path, PG_BINARY_A);
if (hdr_map->fp == NULL)
elog(ERROR, "Cannot open header file \"%s\": %s",
map_path, strerror(errno));