Skip to content

Commit bdb47b7

Browse files
committed
minor changes to elevel of certain messages
1 parent 61d57b6 commit bdb47b7

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/backup.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ remote_backup_files(void *arg)
426426
/* receive the data from stream and write to backup file */
427427
remote_copy_file(file_backup_conn, file);
428428

429-
elog(LOG, "File \"%s\". Copied %lu bytes",
429+
elog(VERBOSE, "File \"%s\". Copied %lu bytes",
430430
file->path, (unsigned long) file->write_size);
431431
PQfinish(file_backup_conn);
432432
}
@@ -823,9 +823,6 @@ do_backup(time_t start_time)
823823
if (!is_remote_backup)
824824
check_system_identifiers();
825825

826-
elog(LOG, "Backup start. backup-mode = %s, stream = %s, remote = %s",
827-
pgBackupGetBackupMode(&current), current.stream ? "true" : "false",
828-
is_remote_backup ? "true" : "false");
829826

830827
/* Start backup. Update backup status. */
831828
current.status = BACKUP_STATUS_RUNNING;
@@ -1888,7 +1885,7 @@ backup_cleanup(bool fatal, void *userdata)
18881885
*/
18891886
if (current.status == BACKUP_STATUS_RUNNING && current.end_time == 0)
18901887
{
1891-
elog(LOG, "Backup is running, update its status to ERROR");
1888+
elog(INFO, "Backup %s is running, setting its status to ERROR", base36enc(current.start_time));
18921889
current.end_time = time(NULL);
18931890
current.status = BACKUP_STATUS_ERROR;
18941891
pgBackupWriteBackupControlFile(&current);
@@ -2000,7 +1997,7 @@ backup_files(void *arg)
20001997
continue;
20011998
}
20021999

2003-
elog(LOG, "File \"%s\". Copied %lu bytes",
2000+
elog(VERBOSE, "File \"%s\". Copied %lu bytes",
20042001
file->path, (unsigned long) file->write_size);
20052002
}
20062003
else

src/delete.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ do_retention_purge(void)
140140
elog(LOG, "WINDOW=%u", retention_window);
141141

142142
if (retention_redundancy == 0 && retention_window == 0)
143-
elog(ERROR, "retention policy is not set");
143+
{
144+
elog(WARNING, "Retention policy is not set");
145+
return 0;
146+
}
144147

145148
/* Get exclusive lock of backup catalog */
146149
catalog_lock();

src/pg_probackup.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,9 @@ main(int argc, char *argv[])
426426
backup_id = base36enc(start_time);
427427
backup_mode = deparse_backup_mode(current.backup_mode);
428428

429-
elog_file(INFO, "pg_probackup version: %s, backup ID: %s, backup mode: %s, instance: %s",
430-
PROGRAM_VERSION, backup_id, backup_mode, instance_name);
429+
elog(INFO, "Backup start, pg_probackup version: %s, backup ID: %s, backup mode: %s, instance: %s, stream: %s, remote: %s",
430+
PROGRAM_VERSION, backup_id, backup_mode, instance_name,
431+
current.stream ? "true" : "false", is_remote_backup ? "true" : "false");
431432
elog_file(INFO, "command: %s", command);
432433

433434
pfree(backup_id);

src/validate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pgBackupValidateFiles(void *arg)
145145
continue;
146146

147147
/* print progress */
148-
elog(LOG, "Validate files: (%d/%lu) %s",
148+
elog(VERBOSE, "Validate files: (%d/%lu) %s",
149149
i + 1, (unsigned long) parray_num(arguments->files), file->path);
150150

151151
if (stat(file->path, &st) == -1)

0 commit comments

Comments
 (0)