On 2024-Sep-12, Pavel Borisov wrote: > Hi, Maxim! > > Previously we accessed offsets in shared MultiXactState without locks as > 32-bit read is always atomic. But I'm not sure it's so when offset become > 64-bit. > E.g. GetNewMultiXactId(): > > nextOffset = MultiXactState->nextOffset; > is outside lock.
Good though. But fortunately I think it's not a problem. The one you say is with MultiXactGetLock held in shared mode -- and that works OK, as the assignment (in line 1263 at the bottom of the same routine) is done with exclusive lock held. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/