How PostgreSQL implements atomic transactions

distributed systems