Re: Confusing recovery message when target not hit

From: David Steele <david(at)pgmasters(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Confusing recovery message when target not hit
Date: 2016-06-11 15:46:45
Message-ID: 3420765a-a1ae-3edd-9b23-9f6c3d3d5af3@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6/11/16 8:22 AM, Michael Paquier wrote:
> On Sat, Jun 11, 2016 at 9:44 AM, Thom Brown <thom(at)linux(dot)com> wrote:
>> It may be the wrong way of going about it, but you get the idea of what I'm
>> suggesting we output instead.
>
> Surely things could be better. So +1 to be more verbose here.
>
> + if (recoveryStopTime == 0)
> + snprintf(reason, sizeof(reason),
> + "recovery reached consistency before recovery
> target time of \"%s\"\n",
> + timestamptz_to_str(recoveryTargetTime));
> "Reaching consistency" is not exact for here. I'd rather say "finished
> recovery without reaching target blah"
>
> + if (recoveryStopXid == 0)
> Checking for InvalidTransactionId is better here.
>
> And it would be good to initialize recoveryStopTime and
> recoveryStopXid as those are set only when a recovery target is
> reached.

+1 for Michael's wording. It's not very clear in the logs right now if
a recovery target was missed. That makes it very difficult for the user
to determine if PITR worked or not.

--
-David
david(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-11 21:00:56 Re: Reviewing freeze map code
Previous Message Kevin Grittner 2016-06-11 15:29:54 Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <