Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I think the problem is that CreateMultiXactId calls
> GetNewMultiXactId and then RecordNewMultiXact, and the lock is released
> between the calls. So one backend could try to read the offset before
> another one had the time to finish writing it.
Ugh, yes, that is clearly a hole :-( even if it turns out not to explain
Matteo's observation.
I don't see any easy way to fix this except by introducing a lot more
locking than is there now --- ie, holding the MultiXactGenLock until the
new mxact's starting offset has been written to disk. Any better ideas?
regards, tom lane