1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Log archive copy during backup.

Copying can be a fairly expensive operation so it makes sense to log it so the user gets some status during long copy operations.
This commit is contained in:
David Steele
2021-03-11 08:22:44 -05:00
committed by GitHub
parent 9506ffae39
commit c862e9654a
3 changed files with 17 additions and 0 deletions

View File

@ -97,6 +97,16 @@
<p>Allow custom <setting>config-path</setting> default with <id>./configure --with-configdir</id>.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="david.steele"/>
<release-item-reviewer id="cynthia.shang"/>
<release-item-reviewer id="stefan.fercot"/>
</release-item-contributor-list>
<p>Log archive copy during <cmd>backup</cmd>.</p>
</release-item>
</release-improvement-list>
<release-development-list>

View File

@ -1773,6 +1773,9 @@ backupArchiveCheckCopy(Manifest *manifest, unsigned int walSegmentSize, const St
if (cfgOptionBool(cfgOptArchiveCopy))
{
// Copy can be a pretty expensive operation so log it
LOG_DETAIL_FMT("copy segment %s to backup", strZ(walSegment));
// Get compression type of the WAL segment and backup
CompressType archiveCompressType = compressTypeFromName(archiveFile);
CompressType backupCompressType = compressTypeEnum(cfgOptionStr(cfgOptCompressType));

View File

@ -1946,6 +1946,7 @@ testRun(void)
"P00 INFO: execute exclusive pg_stop_backup() and wait for all WAL segments to archive\n"
"P00 INFO: backup stop archive = 0000000105D95D3000000000, lsn = 5d95d30/800000\n"
"P00 INFO: check archive for segment(s) 0000000105D95D3000000000:0000000105D95D3000000000\n"
"P00 DETAIL: copy segment 0000000105D95D3000000000 to backup\n"
"P00 INFO: new backup label = 20191003-105320F");
TEST_RESULT_STR_Z_KEYRPL(
@ -2432,6 +2433,9 @@ testRun(void)
"P00 INFO: backup stop archive = 0000000105DB5DE000000002, lsn = 5db5de0/280000\n"
"P00 DETAIL: wrote 'backup_label' file returned from pg_stop_backup()\n"
"P00 INFO: check archive for segment(s) 0000000105DB5DE000000000:0000000105DB5DE000000002\n"
"P00 DETAIL: copy segment 0000000105DB5DE000000000 to backup\n"
"P00 DETAIL: copy segment 0000000105DB5DE000000001 to backup\n"
"P00 DETAIL: copy segment 0000000105DB5DE000000002 to backup\n"
"P00 INFO: new backup label = 20191027-181320F");
TEST_RESULT_STR_KEYRPL(