Re: lastOverflowedXid does not handle transaction ID wraparound

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Simon Riggs <simon.riggs@enterprisedb.com>, Stan Hu <stanhu@gmail.com>, Andrey Borodin <x4mmm@yandex-team.ru>, Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-06T16:16:09Z
Lists: pgsql-hackers
Hi!

On Fri, Nov 5, 2021 at 10:31 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
> At Thu, 4 Nov 2021 01:07:05 +0300, Alexander Korotkov <aekorotkov@gmail.com> wrote in
> > On Wed, Nov 3, 2021 at 8:51 PM Simon Riggs <simon.riggs@enterprisedb.com> wrote:
> > > It is however, an undocumented modularity violation. I think that is
> > > acceptable because of the ProcArrayLock traffic, but needs to have a
> > > comment to explain this at the call to
> > > ExpireOldKnownAssignedTransactionIds() i.e. " and potentially reset
> > > lastOverflowedXid", as well as a comment on the
> > > ExpireOldKnownAssignedTransactionIds() function.
> >
> > Thank you for your feedback.  Please find the revised patch attached.
> > It incorporates this function comment changes altogether with minor
> > editings and commit message. Let me know if you have further
> > suggestions.
> >
> > I'm going to push this if no objections.
>
> Thanks for taking a look on and refining this, Simon and Alex!  (while
> I was sick in bed X:)
>
> It looks good to me except the commit Author doesn't contain the name
> of Alexander Korotkov?

Thank you for the suggestion.  And thanks to everybody for the feedback.
Pushed!

------
Regards,
Alexander Korotkov



Commits

  1. Reset lastOverflowedXid on standby when needed

  2. Fix variable shadowing in procarray.c.

  3. Move InRecovery and standbyState global vars to xlogutils.c.