Tech stories

Database corruption in PostgreSQL: our journey to improving our upgrade process

by Cagri Biroglu & Derk van Veen, Database Engineers

January 10, 2025
 ·  20 minutes
Developer working on code

PostgreSQL is a core component of Adyen's payment platform, enabling high-throughput, low-latency transaction processing on a global scale. Its stability, scalability, and extensibility make it a critical part of our infrastructure, supporting the reliability required for financial operations.

A few years ago, we upgraded our PostgreSQL fleet from version 9.6 to 13. Upgrades are always long and tedious, but we prepared well for them, and the upgrade on even the hardest clusters with an extremely high number of TPS(transactions per second) and a size of multiple hundreds of TB(terabytes)  went without major difficulties.  But a few years later, we suddenly saw occasional errors related to transactions not being visible or invalid x_min or x_max. We tried to analyze the issue but didn't have much time, as transaction wraparound is always just around the corner in this environment. We had some quiet weeks, where no error was seen, and we thought that whatever it was, it was now behind us. We were wrong.

Fresh insights, straight to your inbox

By submitting your information you confirm that you have read Adyen's Privacy Policy and agree to the use of your data in all Adyen communications.