Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac2e7cc

Browse files
committed
PGPRO-5018: Passing prev_backup_start_lsn (also known as horizonLsn) into fio_send_pages() and send_pages() in case of ptrack backup for additional verification of block changes on the server side (without test yet).
1 parentd8050e5 commitac2e7cc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/data.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ prepare_page(ConnectionArgs *conn_arg,
459459
* Skip page if page lsn is less than START_LSN of parent backup.
460460
* Nullified pages must be copied by DELTA backup, just to be safe.
461461
*/
462-
if (backup_mode==BACKUP_MODE_DIFF_DELTA&&
462+
if ((backup_mode==BACKUP_MODE_DIFF_DELTA||backup_mode==BACKUP_MODE_DIFF_PTRACK)&&
463463
file->exists_in_prev&&
464464
page_st->lsn>0&&
465465
page_st->lsn<prev_backup_start_lsn)
@@ -603,7 +603,7 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
603603

604604
rc=fio_send_pages(to_fullpath,from_fullpath,file,
605605
/* send prev backup START_LSN */
606-
backup_mode==BACKUP_MODE_DIFF_DELTA&&
606+
(backup_mode==BACKUP_MODE_DIFF_DELTA||backup_mode==BACKUP_MODE_DIFF_PTRACK)&&
607607
file->exists_in_prev ?prev_backup_start_lsn :InvalidXLogRecPtr,
608608
calg,clevel,checksum_version,
609609
/* send pagemap if any */
@@ -616,7 +616,7 @@ backup_data_file(ConnectionArgs* conn_arg, pgFile *file,
616616
/* TODO: stop handling errors internally */
617617
rc=send_pages(conn_arg,to_fullpath,from_fullpath,file,
618618
/* send prev backup START_LSN */
619-
backup_mode==BACKUP_MODE_DIFF_DELTA&&
619+
(backup_mode==BACKUP_MODE_DIFF_DELTA||backup_mode==BACKUP_MODE_DIFF_PTRACK)&&
620620
file->exists_in_prev ?prev_backup_start_lsn :InvalidXLogRecPtr,
621621
calg,clevel,checksum_version,use_pagemap,
622622
&headers,backup_mode,ptrack_version_num,ptrack_schema);

‎src/utils/file.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,13 +1992,13 @@ static void fio_send_pages_impl(int out, char* buf)
19921992
n_blocks_read++;
19931993

19941994
/*
1995-
* horizonLsn is not 0 only in case of delta backup.
1995+
* horizonLsn is not 0 only in case of deltaand ptrackbackup.
19961996
* As far as unsigned number are always greater or equal than zero,
19971997
* there is no sense to add more checks.
19981998
*/
1999-
if ((req->horizonLsn==InvalidXLogRecPtr)||/* full, page, ptrack */
1999+
if ((req->horizonLsn==InvalidXLogRecPtr)||/* full, page */
20002000
(page_st.lsn==InvalidXLogRecPtr)||/* zeroed page */
2001-
(req->horizonLsn>0&&page_st.lsn>req->horizonLsn))/* delta */
2001+
(req->horizonLsn>0&&page_st.lsn>req->horizonLsn))/* delta, ptrack */
20022002
{
20032003
intcompressed_size=0;
20042004
charwrite_buffer[BLCKSZ*2];

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp