Skip to content

Commit ad21b30

Browse files
author
Daniel Shelepanov
committed
[PBCKP-150] review fixes
1 parent 3496020 commit ad21b30

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/data.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,9 @@ prepare_page(pgFile *file, XLogRecPtr prev_backup_start_lsn,
301301
{
302302
/* read the block */
303303
int read_len = fio_pread(in, page, blknum * BLCKSZ);
304-
/* avoid re-reading once buffered data, see PBCKP-150 */
305-
fflush(in);
304+
/* avoid re-reading once buffered data, flushing on further attempts, see PBCKP-150 */
305+
if(try_again < PAGE_READ_ATTEMPTS - 1)
306+
fio_fflush(in);
306307

307308
/* The block could have been truncated. It is fine. */
308309
if (read_len == 0)

0 commit comments

Comments
 (0)