diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c index 617270f..376a00e 100644 --- a/src/bin/pg_upgrade/check.c +++ b/src/bin/pg_upgrade/check.c @@ -157,18 +157,6 @@ check_new_cluster(void) check_loadable_libraries(); - switch (user_opts.transfer_mode) - { - case TRANSFER_MODE_CLONE: - check_file_clone(); - break; - case TRANSFER_MODE_COPY: - break; - case TRANSFER_MODE_LINK: - check_hard_link(); - break; - } - check_is_install_user(&new_cluster); check_for_prepared_transactions(&new_cluster); @@ -287,6 +275,25 @@ check_cluster_versions(void) check_ok(); } +void +check_filesystem(void) +{ + prep_status("Checking file system support"); + switch (user_opts.transfer_mode) + { + case TRANSFER_MODE_CLONE: + check_file_clone(); + break; + case TRANSFER_MODE_COPY: + break; + case TRANSFER_MODE_LINK: + check_hard_link(); + break; + } + + check_ok(); +} + void check_cluster_compatibility(bool live_check) diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c index 0b304bb..8d345c9 100644 --- a/src/bin/pg_upgrade/pg_upgrade.c +++ b/src/bin/pg_upgrade/pg_upgrade.c @@ -96,6 +96,8 @@ main(int argc, char **argv) output_check_banner(live_check); + check_filesystem(); + check_cluster_versions(); get_sock_dir(&old_cluster, live_check); diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index baeb8ff..eb2dd6a 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -351,6 +351,7 @@ void issue_warnings_and_set_wal_level(void); void output_completion_banner(char *analyze_script_file_name, char *deletion_script_file_name); void check_cluster_versions(void); +void check_filesystem(void); void check_cluster_compatibility(bool live_check); void create_script_for_old_cluster_deletion(char **deletion_script_file_name); void create_script_for_cluster_analyze(char **analyze_script_file_name);