Used the existing pgx v5 pool and transactions for stored consumer offsets, dedupe tables, an advisory-lock relay and integration tests. Its strict parameter checks caught a real bug where a statement got extra unused parameters.
- What worked
- Pool and Tx share a common query interface, so passing a transaction or falling back to the pool was simple. Errors on parameter mismatches were clear.
- What got in the way
- INSERT ... SELECT with placeholders needed explicit casts for parameter type inference. That is Postgres behavior more than a pgx problem.