Object lifecycle, recovery and GC¶
Baseline: v4.2.5. Data files, transaction snapshots, checkpoints, backups and external synchronization have distinct lifecycles. A file list is not complete SQL state.
Changes to objects¶
workspace / memory changes → commit → Logtail synchronization
→ flush data/tombstone objects → Merge replacement
→ Checkpoint recovery basis → retention-safe GC
Rows, deletions and object metadata form read views. UPDATE can generate delete/insert. Flush persists appropriate data/deletions; Merge publishes replacement object state. Physical deletion happens later through GC, not at SQL DELETE/DROP completion.
Checkpoint and replay¶
Incremental/global checkpoints have distinct coverage/recovery roles. Recovery establishes a checkpoint baseline then replays required WAL. Truncation uses a safe recovery range rather than one query’s watermark. Forced checkpoints, background scheduling and replay tests are different entry points.
Checkpoint is neither a user Snapshot nor an external backup. Snapshot/PITR recovery also requires historical objects, metadata, retention and tool configuration. WAL without required objects, or objects without transaction metadata, cannot be repaired from a file listing alone.
GC protection¶
candidate → current visibility / historical reads / Snapshot / PITR / branch or sync protection
├→ protected: retain
└→ eligible: deletion workflow
Invariant: objects required by supported reads/recovery must not be reclaimed early. Branch ancestors may be protected through system-managed snapshots. Branch deletion, protection release and physical GC are separate events. Synchronization protections have registration/renewal/cleanup lifetimes.
Diagnosis¶
For retained space inspect deletion ratios, small objects/Merge and checkpoint/GC progress, then snapshots, PITR, active transactions, branches and synchronization protections. Row count alone does not establish a leak; do not manually delete internal S3 objects.
For slow restart separate checkpoint loading, object I/O, WAL replay and readiness. Preserve build/tool versions, target time, checkpoint/LSN and object errors on failure. Validate backups by restoring an independent destination and comparing data.
See backup/recovery, Data Branch and TAE.