How we made data aggregation on PostgreSQL better and faster | Hacker News