Re: minor bug
Laurenz Albe <laurenz.albe@cybertec.at>
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Torsten Förtsch <tfoertsch123@gmail.com>, pgsql-hackers@postgresql.org, Michael Paquier <michael@paquier.xyz>
Date: 2023-01-19T12:57:14Z
Lists: pgsql-hackers, pgsql-general
On Wed, 2023-01-18 at 15:03 -0500, Tom Lane wrote: > Laurenz Albe <laurenz.albe@cybertec.at> writes: > > On Tue, 2023-01-17 at 10:32 -0500, Tom Lane wrote: > > > I seem to recall that the original idea was to report the timestamp > > > of the commit/abort record we are stopping at. Maybe my memory is > > > faulty, but I think that'd be significantly more useful than the > > > current behavior, *especially* when the replay stopping point is > > > defined by something other than time. > > > (Also, the wording of the log message suggests that that's what > > > the reported time is supposed to be. I wonder if somebody messed > > > this up somewhere along the way.) > > > recoveryStopTime is set to recordXtime (the time of the xlog record) > > a few lines above that patch, so this is useful information if it is > > present. > > Ah, but that only happens if recoveryTarget == RECOVERY_TARGET_TIME. > Digging in the git history, I see that this did use to work as > I remember: we always extracted the record time before printing it. > That was accidentally broken in refactoring in c945af80c. I think > the correct fix is more like the attached. Yes, you are right. Your patch looks fine to me. Yours, Laurenz Albe
Commits
-
Log the correct ending timestamp in recovery_target_xid mode.
- abe203304e15 15.2 landed
- 87591db1918a 12.14 landed
- 44e9e34266ef 16.0 landed
- 1b9a0b96a870 13.10 landed
- 103450724557 14.7 landed
- 0a269527f6a1 11.19 landed