Reasoning about “complicated” Postgres SQL queries

TL;DR When building non-trivial SQL queries, it helps to: State your objective in as "declarative" a way as possible Work from the "inside out". When using subqueries in SQL it helps to find the innermost nested subquery and work your way outwards to figure out what is going on. Similarly, I find that when building … Continue reading Reasoning about “complicated” Postgres SQL queries

Lessons learned: Spring Data Postgres application configuration

Scenario: During development of a Spring Boot application, with a PostgreSQL backend, we randomly observe errors such as: hikaripool-1 - connection is not available, request timed out after 30000ms   FATAL: remaining connection slots are reserved for non-replication superuser connections   Solution: There are a few checks to perform: Ensure that you use the correct … Continue reading Lessons learned: Spring Data Postgres application configuration