@@ -410,7 +410,7 @@ do_restore_or_validate(time_t target_backup_id, pgRecoveryTarget *rt,
410410 {
411411 int rc = check_tablespace_mapping (dest_backup ,
412412 params -> incremental_mode != INCR_NONE , params -> force ,
413- pgdata_is_empty );
413+ pgdata_is_empty , params -> no_validate );
414414
415415 /* backup contain no tablespaces */
416416 if (rc == NoTblspc )
@@ -2173,6 +2173,8 @@ check_incremental_compatibility(const char *pgdata, uint64 system_identifier,
21732173 postmaster_is_up = true;
21742174 }
21752175
2176+ /* check that PG_VERSION is the same */
2177+
21762178 /* slurp pg_control and check that system ID is the same
21772179 * check that instance is not running
21782180 * if lsn_based, check that there is no backup_label files is around AND
@@ -2182,6 +2184,7 @@ check_incremental_compatibility(const char *pgdata, uint64 system_identifier,
21822184 * data files content, because based on pg_control information we will
21832185 * choose a backup suitable for lsn based incremental restore.
21842186 */
2187+ elog (INFO , "Trying to read pg_control file in destination direstory" );
21852188
21862189 system_id_pgdata = get_system_identifier (pgdata );
21872190
@@ -2214,6 +2217,10 @@ check_incremental_compatibility(const char *pgdata, uint64 system_identifier,
22142217 if (postmaster_is_up )
22152218 return POSTMASTER_IS_RUNNING ;
22162219
2220+ /* PG_CONTROL MISSING */
2221+
2222+ /* PG_CONTROL unreadable */
2223+
22172224 if (!system_id_match )
22182225 return SYSTEM_ID_MISMATCH ;
22192226
0 commit comments