@@ -1030,7 +1030,7 @@ restore_data_file_internal(FILE *in, FILE *out, pgFile *file, uint32 backup_vers
10301030 * go to the next page.
10311031 */
10321032if (!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" ,
10341034blknum ,from_fullpath ,strerror (errno ));
10351035continue ;
10361036}
@@ -1039,7 +1039,7 @@ restore_data_file_internal(FILE *in, FILE *out, pgFile *file, uint32 backup_vers
10391039cur_pos_in != headers [n_hdr ].pos )
10401040{
10411041if (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" ,
10431043headers [n_hdr ].pos ,from_fullpath ,strerror (errno ));
10441044
10451045cur_pos_in = headers [n_hdr ].pos ;
@@ -1804,7 +1804,7 @@ get_checksum_map(const char *fullpath, uint32 checksum_version,
18041804char in_buf [STDIO_BUFSIZE ];
18051805
18061806/* open file */
1807- in = fopen (fullpath ,"r+" );
1807+ in = fopen (fullpath ,"r+b " );
18081808if (!in )
18091809elog (ERROR ,"Cannot open source file \"%s\": %s" ,fullpath ,strerror (errno ));
18101810
@@ -1837,11 +1837,11 @@ get_checksum_map(const char *fullpath, uint32 checksum_version,
18371837
18381838if (rc == PAGE_IS_VALID )
18391839{
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 ;
18451845checksum_map [blknum ].lsn = page_st .lsn ;
18461846}
18471847}
@@ -1875,7 +1875,7 @@ get_lsn_map(const char *fullpath, uint32 checksum_version,
18751875Assert (shift_lsn > 0 );
18761876
18771877/* open file */
1878- in = fopen (fullpath ,"r+" );
1878+ in = fopen (fullpath ,"r+b " );
18791879if (!in )
18801880elog (ERROR ,"Cannot open source file \"%s\": %s" ,fullpath ,strerror (errno ));
18811881