Re: [HACKERS] Race condition in GetOldestActiveTransactionId()

2017-07-13 Thread Heikki Linnakangas
On 08/22/2016 01:46 PM, Heikki Linnakangas wrote: While hacking on the CSN patch, I spotted a race condition between GetOldestActiveTransactionId() and GetNewTransactionId(). GetOldestActiveTransactionId() calculates the oldest XID that's still running, by doing: 1. Read nextXid, without a

[HACKERS] Race condition in GetOldestActiveTransactionId()

2016-08-22 Thread Heikki Linnakangas
While hacking on the CSN patch, I spotted a race condition between GetOldestActiveTransactionId() and GetNewTransactionId(). GetOldestActiveTransactionId() calculates the oldest XID that's still running, by doing: 1. Read nextXid, without a lock. This is the upper bound, if there are no