I'm working with a PostgreSQL database where I need to store a numerical value associated with a specific key.
Over time, I will be continuously adding to this value based on the key.
I want to ensure that the table doesn't get bloated with multiple row versions or dead tuples, especially as this update operation will be frequent (like 100 req/s).
What are the best practices in PostgreSQL to accomplish this?
Should I use INSERT ON CONFLICT, a trigger, or another approach?
How can I ensure that my table remains efficient and doesn't suffer from excessive bloat due to frequent updates?