Schedule - PGConf NYC 2024

Time Travel Queries with Postgres

Date: 2024-10-01
Time: 11:40–12:30
Room: Club Parlor
Level: Advanced

Wouldn’t it be nice if you could query your database as it was ten minutes, ten hours, or ten days ago? It would make audits, troubleshooting, and period vs. period reporting so much easier. Once upon a time, Postgres supported time travel queries, but it was deprecated almost thirty years ago because of its abysmal performance. In this talk, we present a new implementation of time travel in Postgres using logical replication to create a special versioned database read replica. We’ll discuss algorithms to construct this replica and efficiently query it, and mechanisms to compact the replica’s data and bound its size.

Speaker

Qian Li