xlogrecovery.c:WaitForWALToBecomeAvailable() - make "switched WAL source" visible by default? - Mailing list pgsql-hackers

From Jakub Wartak
Subject xlogrecovery.c:WaitForWALToBecomeAvailable() - make "switched WAL source" visible by default?
Date
Msg-id CAKZiRmwFRsSVD56WrtB+8s17kC6xzq3YKQhp9FxpRnqqh1yFfw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi,

In presence of restore_command being configured, physical standby can
either use it to restore archive logs to get WAL OR we can stream WAL
from the primary. If we are streaming from primary we get: "started
streaming WAL from primary" clear log message. In case of using
restore_command we do not get anything, that is: we can get "restored
log file XXX from archive", but only AFTER it has been done. It is not
that clear if the restore_command hangs (and there's no toggle or
option to set timeout for such command). Therefore wouldn't it make
some sense to alter xlogrecovery.c:WaitForWALToBecomeAvailable() to
add more information to the logs like below? Thoughts?

                if (currentSource != oldSource)
-                       elog(DEBUG2, "switched WAL source from %s to
%s after %s",
+                       elog(LOG, "switched WAL source from %s to %s after %s",

-J.



pgsql-hackers by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: Should we optimize the `ORDER BY random() LIMIT x` case?
Next
From: Richard Guo
Date:
Subject: Re: Assert failure in base_yyparse