4 ms·
It is coincidental if the insertion ordering happens to match the ordering your business logic expects. Additionally it’s not even insertion ordering, more lik
by avianlyric 4y ago
It is coincidental if the insertion ordering happens to match the ordering your business logic expects.
Additionally it’s not even insertion ordering, more like update ordering. All row updates in Postgres result in a new tuple being written, which may be near the original tuple if there’s space, or may be at the top of the table on-disk. But either way, updates will also change your row ordering.
With replicas you would expect them all to have very similar, possibly identical on-disk ordering, depending on the replication method. If you’re using plain WAL replication, not logical replication, the the on-disk order is probably going to be preserved because the basic WAL only contains the resulting storage layer operations, not the higher level queries. Which means that playing the WAL back else where should result in identical on disk results.