Re: Missing log message in recoveryStopsAfter() for RECOVERY_TARGET_TIME recovery target type - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Re: Missing log message in recoveryStopsAfter() for RECOVERY_TARGET_TIME recovery target type
Date
Msg-id CALj2ACX0Bqb+RMsk4OGNc2-EH68f8rgbQAhnvpZL-Dqrxk8Xhw@mail.gmail.com
Whole thread Raw
In response to Re: Missing log message in recoveryStopsAfter() for RECOVERY_TARGET_TIME recovery target type  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
On Thu, Oct 14, 2021 at 7:05 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> At Wed, 13 Oct 2021 19:56:17 +0530, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote in
> > Hi,
> >
> > I see that the recoveryStopsAfter() doesn't have any "recovery
> > stopping after XXXX" sort of log for RECOVERY_TARGET_TIME recovery
> > target type. It has similar logs for other recoveryTarget types
> > though. Is there any specific reason for not having it?
> >
> > I see that we have "starting point-in-time recovery to XXXX" sorts of
> > logs for all the recovery target types and also recoveryStopsBefore()
> > has a log (by setting stopsHere) for RECOVERY_TARGET_TIME.
>
> So you should have seen the following comment there.
> >       /*
> >        * There can be many transactions that share the same commit time, so
> >        * we stop after the last one, if we are inclusive, or stop at the
> >        * first one if we are exclusive
> >        */
>
> Since both inclusive and exclusive cases are processed in
> recoveryStopsBefore(), recoveryStopsAfter() has nothing to do for the
> target type.

IIUC, the recoveryStopsBefore handles the target type
RECOVERY_TARGET_TIME and recoveryStopsAfter has nothing to do with the
target type RECOVERY_TARGET_TIME when the actual recovery ends. Am I
correct? If yes, can we have a comment in recoveryStopsBefore or
recoveryStopsAfter?

I have another question: do recoveryStopsAfter and recoveryStopsBefore
ever be doing useful work when ArchiveRecoveryRequested is true and
recoveryTarget is RECOVERY_TARGET_UNSET? With Assert(recoveryTarget !=
RECOVERY_TARGET_UNSET);, in those two functions, the regression tests
fail. May I know what is the recovery scenario (crash recovery or
recovery with specified target or recovery with unspecified target)
that makes the startup process call recoveryStopsAfter and
recoveryStopsBefore when ArchiveRecoveryRequested is true?

Regards,
Bharath Rupireddy.



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?
Next
From: Andrew Dunstan
Date:
Subject: Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?