There is a mysterious comment in the source code of debezium, which says that LSNs need not be ordered in the WAL file. How can that be possible? If LSN represents the byte offset in the WAL, how can it not be ordered? While we are at it, can someone explain precisely how the XLOG records are written during concurrent transactions? For example, tx1 commits, and the XLOG records of tx1 are being written to WAL. Now tx2 commits, so will the XLOG records of tx2 be intermixed with the XLOG records of tx1. For example, is the following order possible?
tx1_begin, tx2_begin, tx1_xlog1, tx2_xlog1, tx1_commit, tx2_commit