Beyond CRUD: the PostgreSQL techniques your Rails app is missing
July 14, 2023
34 min
Free
ruby
ruby-on-rails
concurrency-control
optimistic-locking
pessimistic-locking
advisory-locking
skip-locked
sidekick
postgresql
database
cron-jobs
scheduling
active-record
Description
This talk explores how to build scalable solutions using efficient and simple PostgreSQL features within a Rails application. It discusses the lessons learned from production incidents, focusing on how to rethink system design for better scalability. Key PostgreSQL concepts covered include optimistic and pessimistic locking, advisory locking for concurrent access control, and skip-locked for concurrent workloads. The presentation also touches upon operational best practices such as query timeouts and auto-healing applications during database failovers.