Transactional Outbox Pattern in Go and PostgreSQL: Solving the Dual-Write Problem

Modernizing a monolith into an event-driven architecture introduces a familiar distributed-systems problem:
How do you reliably update the application state and publish an event without relying on distributed transactions such as 2PC?