Overview
PostgreSQL Workload Replay
I worked on PGRR as part of a Google contract through Codebase. We wanted to benchmark PostgreSQL with the kinds of queries and transactions a real database sees. PGRR records the traffic so we can replay the same workload in a test environment and compare runs.
Technical Features
Traffic Capture
PGRR saves queries and transactions from a running PostgreSQL workload so they can be replayed later.
Variable-Speed Replay
You can replay the same traffic at its original pace, slow it down, or speed it up to put more load on the database.
Benchmark Reporting
The reports show transaction counts, throughput, and latency so you can compare runs.
Takeaways
PGRR made me pay more attention to the timing of a workload. Even with the same queries, it matters when they run and how many are happening at once.