spring-boot-postgresql
Installation
SKILL.md
PostgreSQL for Spring Boot
Treat PostgreSQL as a system with its own cost model, not as a store for Java objects. Type, index, isolation, and pool choices are correctness and latency decisions the application inherits whether it asked for them or not.
When to use
- Choosing column types, constraints, or index types for mapped entities.
- Reading
EXPLAIN (ANALYZE, BUFFERS)output and deciding why a plan is wrong. - Diagnosing deadlocks, lock waits, bloat, stale statistics, or long-running transactions.
- Choosing an isolation level, a
FOR UPDATEstrategy, or aSKIP LOCKEDwork queue. - Configuring HikariCP and pgjdbc: pool size, timeouts, leak detection, statement timeouts.
- Writing native SQL with CTEs, window functions,
jsonboperators, or set-based DML.
When not to use
- Entity mappings, associations, fetch strategies, or batching: hand off to
spring-boot-hibernate. - Repository interfaces, Specifications, or pagination API design: hand off to
spring-boot-data-jpa. - End-to-end slow-request work across cache, network, and application CPU: hand off to
spring-boot-query-optimization. - Versioned migration files, baselines, checksums, or repair: hand off to
spring-boot-flyway.