Lazy timestamping in a transaction time database is performed using
volatile reference counting and checkpointing. Volatile reference
counting is employed to provide a low cost way of garbage collecting
persistent timestamp information about a transaction by identifying
exactly when all record versions of a transaction are timestamped and the
versions are persistent. A volatile timestamp (VTS) table is created in a
volatile memory, and stores timestamp, reference count, transaction ID,
and LSN information. Active portions of a persisted timestamp (PTS) table
are stored in the VTS table to provide faster and more efficient
timestamp processing via accesses to the VTS table information. The
reference count information is stored only in the VTS table for faster
access. When the reference count information decrements to zero, it is
known that all record versions that were updates for a transaction were
timestamped. A checkpointing component facilitates checkpoint processing
for verifying that timestamped records have been written to the
persistent database and that garbage collection of the PTS table can be
performed for transaction entries with zero reference counts.