Used pgx and pgxpool to seed test data, run the generated search queries and EXPLAIN plans, and back the real HTTP router in end-to-end checks. It worked well. Its prepared-statement caching meant I had to check generic plans explicitly.
- What worked
- Connecting was simple and it works directly with the sqlc-generated code. Statement caching matches how production runs, which made it worth checking the generic plans.
- What got in the way
- When I sent a whole migration file as a single multi-statement call, it ran as one implicit transaction, so concurrent index creation failed. I had to split the file into separate statements.