Skip to content

Commit 448efc2

Browse files
committed
Revert the messages text to the original form
1 parent c32f854 commit 448efc2

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/catchup.c

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,14 @@ catchup_preflight_checks(PGNodeInfo *source_node_info, PGconn *source_conn,
166166
source_id = get_system_identifier(source_pgdata, FIO_DB_HOST, false); /* same as instance_config.system_identifier */
167167

168168
if (source_conn_id != source_id)
169-
elog(ERROR, "Database identifiers mismatch: we %s connected to DB id %lu, but in \"%s\" we found id %lu",
170-
dry_run? "can":"will",
169+
elog(ERROR, "Database identifiers mismatch: we connected to DB id %lu, but in \"%s\" we found id %lu",
171170
source_conn_id, source_pgdata, source_id);
172171

173172
if (current.backup_mode != BACKUP_MODE_FULL)
174173
{
175174
dest_id = get_system_identifier(dest_pgdata, FIO_LOCAL_HOST, false);
176175
if (source_conn_id != dest_id)
177-
elog(ERROR, "Database identifiers mismatch: we %s connected to DB id %lu, but in \"%s\" we found id %lu",
178-
dry_run? "can":"will",
176+
elog(ERROR, "Database identifiers mismatch: we connected to DB id %lu, but in \"%s\" we found id %lu",
179177
source_conn_id, dest_pgdata, dest_id);
180178
}
181179
}
@@ -831,7 +829,7 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
831829
char dirpath[MAXPGPATH];
832830

833831
join_path_components(dirpath, dest_pgdata, file->rel_path);
834-
elog(VERBOSE, "Directory '%s' %s be created", dirpath, dry_run? "can":"will");
832+
elog(VERBOSE, "Create directory '%s'", dirpath);
835833
if (!dry_run)
836834
fio_mkdir(dirpath, DIR_PERMISSION, FIO_LOCAL_HOST);
837835
}
@@ -861,8 +859,8 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
861859

862860
join_path_components(to_path, dest_pgdata, file->rel_path);
863861

864-
elog(VERBOSE, "Directory \"%s\" and symbolic link \"%s\" %s be created",
865-
linked_path, to_path, dry_run? "can":"will");
862+
elog(VERBOSE, "Create directory \"%s\" and symbolic link \"%s\"",
863+
linked_path, to_path);
866864

867865
if (!dry_run)
868866
{
@@ -915,7 +913,7 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
915913
*/
916914
if (current.backup_mode != BACKUP_MODE_FULL)
917915
{
918-
elog(INFO, "Redundant files in destination directory %s be removed", dry_run ? "can" : "will");
916+
elog(INFO, "Removing redundant files in destination directory");
919917
parray_qsort(dest_filelist, pgFileCompareRelPathWithExternalDesc);
920918
for (i = 0; i < parray_num(dest_filelist); i++)
921919
{
@@ -947,7 +945,7 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
947945
if (!dry_run)
948946
{
949947
fio_delete(file->mode, fullpath, FIO_LOCAL_HOST);
950-
elog(VERBOSE, "File \"%s\" %s deleted", fullpath, dry_run ? "can" : "will");
948+
elog(VERBOSE, "Deleted file \"%s\"", fullpath);
951949
}
952950

953951
/* shrink dest pgdata list */
@@ -969,7 +967,7 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
969967
parray_qsort(dest_filelist, pgFileCompareRelPathWithExternal);
970968

971969
/* run copy threads */
972-
elog(INFO, "Transferring data files %s started", dry_run ? "can be" : "");
970+
elog(INFO, "Start transferring data files");
973971
time(&start_time);
974972
transfered_datafiles_bytes = catchup_multithreaded_copy(num_threads, &source_node_info,
975973
source_pgdata, dest_pgdata,
@@ -1103,8 +1101,7 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
11031101
pretty_size(transfered_datafiles_bytes, pretty_transfered_data_bytes, lengthof(pretty_transfered_data_bytes));
11041102
pretty_size(transfered_walfiles_bytes, pretty_transfered_wal_bytes, lengthof(pretty_transfered_wal_bytes));
11051103

1106-
elog(INFO, "Databases %s synchronized. Transfered datafiles sizes: %s, transfered wal size: %s, time elapsed: %s",
1107-
dry_run ? "can be" : "was",
1104+
elog(INFO, "Databases synchronized. Transfered datafiles size: %s, transfered wal size: %s, time elapsed: %s",
11081105
pretty_transfered_data_bytes, pretty_transfered_wal_bytes, pretty_time);
11091106

11101107
if (current.backup_mode != BACKUP_MODE_FULL)

0 commit comments

Comments
 (0)