architecture
architecture
postgres
PostgreSQL and lock timeout issues – how to deal with them also in Ruby on Rails?
PostgreSQL lock timeouts strike during long migrations and complex transactions. How lock_timeout and statement_timeout actually work, quick fixes at the database role level, managing timeouts in Rails migrations, and global protection with StrongMigrations.
postgres
How can I check the size of the database and tables in PostgreSQL?
PostgreSQL database size checks in a few simple SQL queries: list all databases with pg_database and pg_size_pretty, then break down the biggest tables in a schema, indexes included. Spot what eats disk space before it slows backups and raises infrastructure costs.
Latest
How to effectively manage and terminate old PostgreSQL connections
Idle PostgreSQL connections eat memory and can hit the max_connections limit, blocking your app. How to find old sessions in pg_stat_activity, close them safely with pg_terminate_backend, and automate the cleanup so hanging connections never pile up again.
How to find similar records in PostgreSQL with Trigram similarity search in your Ruby on Rails App?
PostgreSQL trigram similarity finds records despite typos: enable pg_trgm, run similarity queries from Rails, tune the threshold, order results by score, and wrap it all in a reusable scope. Great for fuzzy search and duplicate detection without external tools.
Leveraging JSON in PostgreSQL 17
PostgreSQL 17 finally implements the SQL/JSON standard: constructors like JSON_OBJECT and JSON_ARRAYAGG, query functions JSON_EXISTS and JSON_QUERY, and the star of the release, JSON_TABLE, which turns JSON into rows, shown on a real IoT data example.