Andres Freund <andres@2ndquadrant.com> writes:
> But I think that actually coordinating a consistent visibility order
> between commit, wal insertion and the procarray would have bigger
> scalability impact than the second record. I might be missing some
> clever tricks here though.
Yeah. ISTM the only way to really guarantee that the visible commit
order is the same would be for transactions to hold the ProcArrayLock
while they're inserting that WAL record. Needless to say, that would
be absolutely disastrous performance-wise.
Or at least, that's true as long as we rely on the current procarray-based
mechanism for noting that a transaction is still in progress. Maybe
there's some other approach altogether.
regards, tom lane