1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-30 05:39:12 +02:00

Add hints to standby replay timeout message.

This commit is contained in:
David Steele 2021-09-28 15:55:13 -04:00
parent 096829b3b2
commit b7ef12a76f
3 changed files with 26 additions and 3 deletions

View File

@ -27,6 +27,19 @@
<p>Increase max index allowed for <id>pg</id>/<id>repo</id> options to 256.</p> <p>Increase max index allowed for <id>pg</id>/<id>repo</id> options to 256.</p>
</release-item> </release-item>
<release-item>
<github-issue id="1434"/>
<release-item-contributor-list>
<release-item-ideator id="leigh.downs"/>
<release-item-contributor id="david.steele"/>
<release-item-reviewer id="cynthia.shang"/>
<release-item-reviewer id="stefan.fercot"/>
</release-item-contributor-list>
<p>Add hints to standby replay timeout message.</p>
</release-item>
</release-improvement-list> </release-improvement-list>
</release-core-list> </release-core-list>
</release> </release>
@ -10384,6 +10397,11 @@
<contributor-id type="github">laurenz</contributor-id> <contributor-id type="github">laurenz</contributor-id>
</contributor> </contributor>
<contributor id="leigh.downs">
<contributor-name-display>Leigh Downs</contributor-name-display>
<contributor-id type="github">leigh-downs</contributor-id>
</contributor>
<contributor id="leo.khomenko"> <contributor id="leo.khomenko">
<contributor-name-display>Leo Khomenko</contributor-name-display> <contributor-name-display>Leo Khomenko</contributor-name-display>
<contributor-id type="github">lkhomenk</contributor-id> <contributor-id type="github">lkhomenk</contributor-id>

View File

@ -559,8 +559,11 @@ dbReplayWait(Db *this, const String *targetLsn, TimeMSec timeout)
if (!targetReached) if (!targetReached)
{ {
THROW_FMT( THROW_FMT(
ArchiveTimeoutError, "timeout before standby replayed to %s - only reached %s", strZ(targetLsn), ArchiveTimeoutError,
strZ(replayLsn)); "timeout before standby replayed to %s - only reached %s\n"
"HINT: is replication running and current on the standby?\n"
"HINT: disable the 'backup-standby' option to backup directly from the primary.",
strZ(targetLsn), strZ(replayLsn));
} }
// Perform a checkpoint // Perform a checkpoint

View File

@ -508,7 +508,9 @@ testRun(void)
TEST_ERROR( TEST_ERROR(
dbReplayWait(db.standby, STRDEF("5/5"), 200), ArchiveTimeoutError, dbReplayWait(db.standby, STRDEF("5/5"), 200), ArchiveTimeoutError,
"timeout before standby replayed to 5/5 - only reached 5/3"); "timeout before standby replayed to 5/5 - only reached 5/3\n"
"HINT: is replication running and current on the standby?\n"
"HINT: disable the 'backup-standby' option to backup directly from the primary.");
TEST_ERROR( TEST_ERROR(
dbReplayWait(db.standby, STRDEF("5/5"), 200), ArchiveTimeoutError, dbReplayWait(db.standby, STRDEF("5/5"), 200), ArchiveTimeoutError,