This article explains the mechanics of EBS lazy loading during Amazon RDS for PostgreSQL snapshot restores and the resulting performance impact on query latency. It evaluates mitigation strategies, specifically recommending pg_prewarm for data hydration and leveraging the StorageOperationPercentProgress API for monitoring completion status.
Key points
RDS storage volumes perform lazy loading from S3 upon restoration, which can cause significant latency spikes for queries accessing non-hydrated data blocks.
pg_prewarm is the most effective native method to proactively hydrate heap and index blocks, mitigating unpredictable performance.
The StorageOperationPercentProgress API field provides a reliable metric to determine when storage volume hydration is 100% complete.
VACUUM ANALYZE is insufficient as a sole hydration strategy and should be used primarily for statistics maintenance.