Why 'When Did This Change Happen?' Has No Single Answer in Modern Databases

Determining exactly when a database change occurred is a complex, multi-layered question critical to replication, auditing, and application-log correlation. In MVCC-based databases, a single row update involves at least six distinct moments — from transaction start and read point selection to commit visibility and client acknowledgment — none of which are interchangeable. PostgreSQL tracks these using transaction IDs, snapshot coordinates, and Log Sequence Numbers, while Oracle consolidates many functions into its System Change Number, though it still relies on additional identifiers. Distributed systems like YugabyteDB use hybrid logical clocks, while SQL Server, MySQL, and MongoDB each split these responsibilities differently. The core insight is that no single timestamp or coordinator answers all ordering questions, and the right one to use depends entirely on what the application is actually asking.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in