Understanding conflict resolution and avoidance in PostgreSQL: a complete guide