Re: lastOverflowedXid does not handle transaction ID wraparound
Stan Hu <stanhu@gmail.com>
From: Stan Hu <stanhu@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Andrey Borodin <x4mmm@yandex-team.ru>,
Dmitry Dolgov <9erthalion6@gmail.com>, Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-10-21T14:20:57Z
Lists: pgsql-hackers
On Wed, Oct 20, 2021 at 9:01 PM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote: > > lastOverflowedXid is the smallest subxid that possibly exists but > possiblly not known to the standby. So if all top-level transactions > older than lastOverflowedXid end, that means that all the > subtransactions in doubt are known to have been ended. Thanks for the patch! I verified that it appears to reset lastOverflowedXid properly. I may not be understanding https://github.com/postgres/postgres/blob/dc899146dbf0e1d23fb24155a5155826ddce34c9/src/backend/storage/ipc/procarray.c#L1326-L1327 correctly, but isn't lastOverflowedXid the last subxid for a given top-level XID, so isn't it actually the largest subxid that possibly exists?
Commits
-
Reset lastOverflowedXid on standby when needed
- 05e6e78c1840 15.0 landed
- b0f6bd48f35d 14.1 landed
- 7381b79ade47 9.6.24 landed
- 774d00573966 10.19 landed
- 691c0df73a74 11.14 landed
- 8f779a1a3eb6 12.9 landed
- e1fee28a0441 13.5 landed
-
Fix variable shadowing in procarray.c.
- dc899146dbf0 15.0 cited
-
Move InRecovery and standbyState global vars to xlogutils.c.
- 317632f3073f 15.0 cited