Lessons learned scaling PostgreSQL database to 1.2bn records/ month