Re: TransactionXmin != MyProc->xmin

2024-12-21 Thread Heikki Linnakangas
ule that whenever you change MyProc->xmin, you always update TransactionXmin too, so that TransactionXmin == MyProc->xmin is always true. I committed a minimal fix in SnapshotResetXmin() only, in all stable branches. I still think it might be a good idea to make it a strict invariant tha

Re: TransactionXmin != MyProc->xmin

2024-12-12 Thread Heikki Linnakangas
nd. What I was meant is that we make it a strict rule that whenever you change MyProc->xmin, you always update TransactionXmin too, so that TransactionXmin == MyProc->xmin is always true. -- Heikki Linnakangas Neon (https://neon.tech)

Re: TransactionXmin != MyProc->xmin

2024-12-12 Thread Andres Freund
Hi, On 2024-12-12 20:16:39 +0200, Heikki Linnakangas wrote: > The comment in GetSnapshotData() defines transactionXmin like this: > > > TransactionXmin: the oldest xmin of any snapshot in use in the current > > transaction (this is the same as MyProc->xmin). > However, we don't update Transaction

TransactionXmin != MyProc->xmin

2024-12-12 Thread Heikki Linnakangas
The comment in GetSnapshotData() defines transactionXmin like this: TransactionXmin: the oldest xmin of any snapshot in use in the current transaction (this is the same as MyProc->xmin). However, we don't update TransactionXmin when we update MyProc->xmin in SnapshotResetXmin(). So TransactionX