pgsql: Fix GetStrictOldestNonRemovableTransactionId() on standby
pgsql: Fix GetStrictOldestNonRemovableTransactionId() on standby
От:
Alexander Korotkov <akorotkov@postgresql.org>
Дата:
Fix GetStrictOldestNonRemovableTransactionId() on standby e85662df44 implemented GetStrictOldestNonRemovableTransactionId() function for computation of xid horizon that avoid reporting of false errors. However, GetStrictOldestNonRemovableTransactionId() uses GetRunningTransactionData() even on standby leading to an assertion failure. Given that we decided to ignore KnownAssignedXids and standby can't have own running xids, we switch to use TransamVariables->nextXid as a xid horizon. Also, revise the comment regarding ignoring KnownAssignedXids with more detailed reasoning provided by Heikki. Reported-by: Heikki Linnakangas Discussion: https://postgr.es/m/42218c4f-2c8d-40a3-8743-4d34dd0e4cce%40iki.fi Reviewed-by: Heikki Linnakangas Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e2ed7e32271a82179c3f8c7c93ce52ff93c6dd3c Modified Files -------------- contrib/pg_visibility/pg_visibility.c | 26 +++++++++++++++++++--- .../pg_visibility/t/001_concurrent_transaction.pl | 19 ++++++++++++++-- 2 files changed, 40 insertions(+), 5 deletions(-)
Re: pgsql: Fix GetStrictOldestNonRemovableTransactionId() on standby
От:
Alexander Korotkov <aekorotkov@gmail.com>
Дата:
On Fri, Aug 16, 2024 at 12:19 AM Alexander Korotkov wrote: > > Fix GetStrictOldestNonRemovableTransactionId() on standby > > e85662df44 implemented GetStrictOldestNonRemovableTransactionId() function > for computation of xid horizon that avoid reporting of false errors. > However, GetStrictOldestNonRemovableTransactionId() uses > GetRunningTransactionData() even on standby leading to an assertion failure. > > Given that we decided to ignore KnownAssignedXids and standby can't have > own running xids, we switch to use TransamVariables->nextXid as a xid horizon. > > Also, revise the comment regarding ignoring KnownAssignedXids with more > detailed reasoning provided by Heikki. I see the buildfarm failures. I will try to fix them shortly. ------ Regards, Alexander Korotkov Supabase