# arkhipov/temporal_tables

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/arkhipov-temporal-tables).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

1,041 stars · 52 forks · C · BSD-2-Clause

## Links

- GitHub: https://github.com/arkhipov/temporal_tables
- awesome-repositories: https://awesome-repositories.com/repository/arkhipov-temporal-tables.md

## Description

Temporal Tables is a PostgreSQL database extension and trigger function library that implements system-versioned tables and database history tracking. It automates the maintenance of historical data archives by intercepting write operations to capture previous row versions when updates and deletions occur. 

The extension manages record lifespans through transaction-time interval mapping, using paired timestamp columns to track active validity periods and relational schema linking to connect primary tables to their corresponding history archives. It includes concurrent conflict resolution mechanisms using row locking and serialization to prevent race conditions during simultaneous modifications, alongside session-level configuration variables for custom temporal overrides to backfill historical records.

## Tags

### Data & Databases

- [Data Versioning](https://awesome-repositories.com/f/data-databases/data-management/table-data-managers/data-versioning.md) — Implements system-versioned tables that record historical changes automatically over time. ([source](https://github.com/arkhipov/temporal_tables/blob/master/temporal_tables--1.0.0--1.0.1.sql))
- [First-Write-Win Conflict Resolutions](https://awesome-repositories.com/f/data-databases/acid-transactional-cores/concurrent-read-write-transactions/write-conflict-detection/first-write-win-conflict-resolutions.md) — Prevents race conditions during simultaneous modifications using row locking and serialization mechanisms.
- [Row Version Archiving](https://awesome-repositories.com/f/data-databases/cloud-database-archiving/row-version-archiving.md) — Maintains automated archives of previous row versions to preserve historical data states.
- [Database History Tracking Tools](https://awesome-repositories.com/f/data-databases/custom-event-tracking/transaction-history-tracking/database-state-history/database-history-tracking-tools.md) — Connects database tables to history archives using trigger functions to manage active lifespans and timestamps.
- [Row-Level History Archives](https://awesome-repositories.com/f/data-databases/data-snapshotting/periodic-snapshots/metric-history-archiving/row-level-history-archives.md) — Maintains a record of previous row versions in a separate history table whenever data is updated or deleted. ([source](https://github.com/arkhipov/temporal_tables/blob/master/README.md))
- [Database Trigger Management](https://awesome-repositories.com/f/data-databases/database-trigger-management.md) — Connects database tables to history archives using trigger functions that manage timestamps and conflicts. ([source](https://github.com/arkhipov/temporal_tables#readme))
- [Time Period Managements](https://awesome-repositories.com/f/data-databases/date-and-time-libraries/time-period-managements.md) — Automatically generates and manages start and end timestamps for database records to reflect their active lifespan. ([source](https://github.com/arkhipov/temporal_tables/blob/master/README.md))
- [Temporal Table Extensions](https://awesome-repositories.com/f/data-databases/postgresql-extensions/temporal-table-extensions.md) — Provides a PostgreSQL database extension that automatically records historical changes and archives old row versions.
- [Relational Schemas](https://awesome-repositories.com/f/data-databases/relational-schemas.md) — Connects primary data tables directly to their corresponding historical archives using foreign key constraints.
- [Temporal Data Management](https://awesome-repositories.com/f/data-databases/temporal-data-management.md) — Records the active lifespan of database records by automatically generating and managing valid start and end timestamps.
- [Transaction-Time Interval Mappings](https://awesome-repositories.com/f/data-databases/time-series-sql-querying/time-interval-operations/transaction-time-interval-mappings.md) — Tracks row validity periods using paired timestamp columns to maintain transaction-time intervals.
- [Parallel Data Backfilling](https://awesome-repositories.com/f/data-databases/parallel-data-backfilling.md) — Overrides default transaction timestamps with custom temporal values to populate past records and data warehouses.
- [Row Deletions](https://awesome-repositories.com/f/data-databases/row-deletions.md) — Automatically records table row validity periods and archives old data on updates and deletions. ([source](https://github.com/arkhipov/temporal_tables#readme))

### Part of an Awesome List

- [Data Auditing and Versioning](https://awesome-repositories.com/f/awesome-lists/data/data-auditing-and-versioning.md) — Tracks historical changes by automatically archiving old row versions into separate history tables.

### Development Tools & Productivity

- [Temporal Trigger Function Libraries](https://awesome-repositories.com/f/development-tools-productivity/custom-task-functions/sql-function-namespaces/function-definitions/rust-user-defined-functions/postgresql-user-defined-functions/temporal-trigger-function-libraries.md) — Provides database triggers that manage system valid periods and resolve concurrent transaction conflicts in PostgreSQL.

### DevOps & Infrastructure

- [State Auditing Triggers](https://awesome-repositories.com/f/devops-infrastructure/automated-action-execution/state-based-triggering/state-auditing-triggers.md) — Intercepts write operations automatically to capture previous row versions and append them to history tables.

### Operating Systems & Systems Programming

- [Custom System Time Overrides](https://awesome-repositories.com/f/operating-systems-systems-programming/system-time-management/custom-system-time-overrides.md) — Allows overriding default transaction timestamps with custom temporal values to backfill historical data. ([source](https://github.com/arkhipov/temporal_tables#readme))

### Software Engineering & Architecture

- [Temporal Configuration Overrides](https://awesome-repositories.com/f/software-engineering-architecture/project-configuration-management/linter-configuration-management/custom-rule-overrides/temporal-configuration-overrides.md) — Allows developers to supply custom timestamps via session configuration variables to backfill historical records.
