Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ec84622

Browse files
committed
additional LOG-level messages, checksumm check
1 parent 7eeb7a1 commit ec84622

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/backup.c

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ do_backup_instance(void)
506506

507507
/*
508508
* It`s illegal to take PTRACK backup if LSN from ptrack_control() is not equal to
509-
* start_backup LSN of previous backup
509+
* stort_backup LSN of previous backup
510510
*/
511511
if (current.backup_mode == BACKUP_MODE_DIFF_PTRACK)
512512
{
@@ -654,6 +654,7 @@ do_backup_instance(void)
654654
}
655655

656656
/* Run threads */
657+
elog(LOG, "Start transfering data files");
657658
for (i = 0; i < num_threads; i++)
658659
{
659660
elog(VERBOSE, "Start thread num: %i", i);
@@ -674,6 +675,7 @@ do_backup_instance(void)
674675
pthread_join(backup_threads[i], NULL);
675676
pg_free(backup_threads_args[i]);
676677
}
678+
elog(LOG, "Data files are transfered");
677679

678680
/* clean previous backup file list */
679681
if (prev_backup_filelist)
@@ -769,6 +771,14 @@ do_backup(time_t start_time)
769771
current.checksum_version = get_data_checksum_version(true);
770772

771773
is_checksum_enabled = pg_checksum_enable();
774+
775+
if (is_checksum_enabled)
776+
elog(LOG, "This PostgreSQL instance initialized with data block checksums. "
777+
"Data block corruption will be detected");
778+
else
779+
elog(WARNING, "This PostgreSQL instance initialized without data block checksums. "
780+
"pg_probackup have no way to detect data block corruption without them. "
781+
"Reinitialize PGDATA with option '--data-checksums'.");
772782

773783
StrNCpy(current.server_version, server_version_str,
774784
sizeof(current.server_version));
@@ -1956,7 +1966,7 @@ backup_files(void *arg)
19561966
current.backup_mode))
19571967
{
19581968
file->write_size = BYTES_INVALID;
1959-
elog(LOG, "File \"%s\" was not copied to backup", file->path);
1969+
elog(VERBOSE, "File \"%s\" was not copied to backup", file->path);
19601970
continue;
19611971
}
19621972
}
@@ -1965,7 +1975,7 @@ backup_files(void *arg)
19651975
file))
19661976
{
19671977
file->write_size = BYTES_INVALID;
1968-
elog(LOG, "File \"%s\" was not copied to backup", file->path);
1978+
elog(VERBOSE, "File \"%s\" was not copied to backup", file->path);
19691979
continue;
19701980
}
19711981

@@ -2403,6 +2413,7 @@ make_pagemap_from_ptrack(parray *files)
24032413
char *ptrack_nonparsed = NULL;
24042414
size_t ptrack_nonparsed_size = 0;
24052415

2416+
elog(LOG, "Compiling pagemap");
24062417
for (i = 0; i < parray_num(files); i++)
24072418
{
24082419
pgFile *file = (pgFile *) parray_get(files, i);
@@ -2497,6 +2508,9 @@ make_pagemap_from_ptrack(parray *files)
24972508
}
24982509
}
24992510
}
2511+
elog(LOG, "Pagemap compiled");
2512+
// res = pgut_execute(backup_conn, "SET client_min_messages = warning;", 0, NULL, true);
2513+
// PQclear(pgut_execute(backup_conn, "CHECKPOINT;", 0, NULL, true));
25002514
}
25012515

25022516

src/parsexlog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ extractPageMap(const char *archivedir, XLogRecPtr startpoint, TimeLineID tli,
124124
XLogSegNo endSegNo,
125125
nextSegNo = 0;
126126

127+
elog(LOG, "Compiling pagemap");
127128
if (!XRecOffIsValid(startpoint))
128129
elog(ERROR, "Invalid startpoint value %X/%X",
129130
(uint32) (startpoint >> 32), (uint32) (startpoint));
@@ -186,6 +187,7 @@ extractPageMap(const char *archivedir, XLogRecPtr startpoint, TimeLineID tli,
186187
xlogreadfd = -1;
187188
xlogexists = false;
188189
}
190+
elog(LOG, "Pagemap compiled");
189191
}
190192

191193
/*

0 commit comments

Comments
 (0)