Skip to content

Commit dffc2b2

Browse files
author
vshepard
committed
PBCKP-805 add unlock mutex in data.c
1 parent ab05bad commit dffc2b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/data.c

+3
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,10 @@ write_page_headers(BackupPageHeader2 *headers, pgFile *file, HeaderMap *hdr_map,
24902490
file->rel_path, file->hdr_off, z_len, file->hdr_crc);
24912491

24922492
if (fwrite(zheaders, 1, z_len, hdr_map->fp) != z_len)
2493+
{
2494+
pthread_mutex_unlock(&(hdr_map->mutex));
24932495
elog(ERROR, "Cannot write to file \"%s\": %s", map_path, strerror(errno));
2496+
}
24942497

24952498
file->hdr_size = z_len; /* save the length of compressed headers */
24962499
hdr_map->offset += z_len; /* update current offset in map */

0 commit comments

Comments
 (0)