1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-08-17 09:41:03 +03:00

Add hints when unable to find a WAL segment in the archive.

When this error happens in the context of a backup it can be a bit mystifying as to why the backup is failing.  Add some hints to get the user started.

These hints will appear any time a WAL segment can't be found, which makes the hint about the check command redundant when the user is actually running the check command, but it doesn't seem worth trying to exclude the hint in that case.

Suggested by Hans-Jürgen Schönig.
This commit is contained in:
David Steele
2019-03-10 10:38:12 +02:00
parent bc9fb0f59a
commit 21f56f64eb
4 changed files with 27 additions and 3 deletions

View File

@@ -139,7 +139,9 @@ sub run
#---------------------------------------------------------------------------------------------------------------------------
$self->testException(
sub {walSegmentFind(storageRepo(), $strArchiveId, $strWalSegment, .1)}, ERROR_ARCHIVE_TIMEOUT,
"could not find WAL segment ${strWalSegment} after 0.1 second(s)");
"could not find WAL segment ${strWalSegment} after 0.1 second(s)" .
"\nHINT: is archive_command configured correctly?" .
"\nHINT: use the check command to verify that PostgreSQL is archiving.");
#---------------------------------------------------------------------------------------------------------------------------
my $strWalMajorPath = "${strArchivePath}/" . substr($strWalSegment, 0, 16);