On 2022-Aug-26, Robert Haas wrote:
> I agree. Testing StandbyMode here seems bogus. I thought initially
> that the test should perhaps be for InArchiveRecovery rather than
> ArchiveRecoveryRequested, but I see that the code which switches to a
> new timeline cares about ArchiveRecoveryRequested, so I think that is
> the correct thing to test here as well.
Yeah, I think you had already established elsewhere that testing
StandbyMode was the wrong thing to do. Testing ArchiveRecoveryRequested
here seems quite odd at first, but given the copying behavior, I agree
that it seems a correct thing to do.
There's a small typo in the comment: "When find that". I suppose that
was meant to be "When we find that". You end that para with "and thus
we should not do this", but that sounds like it wouldn't matter if we
did. Maybe "and thus doing this would be wrong, so skip it." or
something like that. (Perhaps be even more specific and say "if we did
this, we would later create an overwrite record in the wrong place,
breaking everything")
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/