@@ -1030,7 +1030,7 @@ restore_data_file_internal(FILE *in, FILE *out, pgFile *file, uint32 backup_vers
1030
1030
* go to the next page.
1031
1031
*/
1032
1032
if (!headers && fseek (in , read_len , SEEK_CUR ) != 0 )
1033
- elog (ERROR , "Cannot seek block %u of '%s' : %s" ,
1033
+ elog (ERROR , "Cannot seek block %u of \"%s\" : %s" ,
1034
1034
blknum , from_fullpath , strerror (errno ));
1035
1035
continue ;
1036
1036
}
@@ -1039,7 +1039,7 @@ restore_data_file_internal(FILE *in, FILE *out, pgFile *file, uint32 backup_vers
1039
1039
cur_pos_in != headers [n_hdr ].pos )
1040
1040
{
1041
1041
if (fseek (in , headers [n_hdr ].pos , SEEK_SET ) != 0 )
1042
- elog (ERROR , "Cannot seek to offset %u of '%s' : %s" ,
1042
+ elog (ERROR , "Cannot seek to offset %u of \"%s\" : %s" ,
1043
1043
headers [n_hdr ].pos , from_fullpath , strerror (errno ));
1044
1044
1045
1045
cur_pos_in = headers [n_hdr ].pos ;
@@ -1804,7 +1804,7 @@ get_checksum_map(const char *fullpath, uint32 checksum_version,
1804
1804
char in_buf [STDIO_BUFSIZE ];
1805
1805
1806
1806
/* open file */
1807
- in = fopen (fullpath , "r+" );
1807
+ in = fopen (fullpath , "r+b " );
1808
1808
if (!in )
1809
1809
elog (ERROR , "Cannot open source file \"%s\": %s" , fullpath , strerror (errno ));
1810
1810
@@ -1837,11 +1837,11 @@ get_checksum_map(const char *fullpath, uint32 checksum_version,
1837
1837
1838
1838
if (rc == PAGE_IS_VALID )
1839
1839
{
1840
- if (checksum_version )
1841
- checksum_map [blknum ].checksum = ((PageHeader ) read_buffer )-> pd_checksum ;
1842
- else
1843
- checksum_map [blknum ].checksum = page_st .checksum ;
1844
-
1840
+ // if (checksum_version)
1841
+ // checksum_map[blknum].checksum = ((PageHeader) read_buffer)->pd_checksum;
1842
+ // else
1843
+ // checksum_map[blknum].checksum = page_st.checksum;
1844
+ checksum_map [ blknum ]. lsn = page_st . checksum ;
1845
1845
checksum_map [blknum ].lsn = page_st .lsn ;
1846
1846
}
1847
1847
}
@@ -1875,7 +1875,7 @@ get_lsn_map(const char *fullpath, uint32 checksum_version,
1875
1875
Assert (shift_lsn > 0 );
1876
1876
1877
1877
/* open file */
1878
- in = fopen (fullpath , "r+" );
1878
+ in = fopen (fullpath , "r+b " );
1879
1879
if (!in )
1880
1880
elog (ERROR , "Cannot open source file \"%s\": %s" , fullpath , strerror (errno ));
1881
1881
0 commit comments