30 Followers
45 Following
75 Posts
Systems thinker. Rails backend dev. Postgres fan. Former Python developer. Linux user 🐧.
homepagehttps://shey.ca
current projecthttps://opensourcerails.dev

Given Denmark's history, you'd think someone would know better.

Race car fuel melts brains.

Ruby Central should be dissolved and a new organization should replace it that has sound governance policies suitable for free and open source software ecosystems.

There's no coming back from the multiple bad faith acts they have taken under the current leadership.

New post: Five Postgres anti-patterns I keep seeing in Rails apps and how to fix them.

https://shey.ca/2025/09/12/five-db-anti-patterns.html

Five PostgreSQL Anti-Patterns

Five PostgreSQL Anti-Patterns

Shey Sewani
Release 8.1.0.beta1 Ā· rails/rails

Active Support Add ActiveSupport::Cache::Store#namespace= and #namespace. Can be used as an alternative to Store#clear in some situations such as parallel testing. Nick Schwaderer Create parall...

GitHub

Long time no talk. Here’s a short post on why you shouldn’t use UUIDv4 as primary keys: they destroy database performance.

I was going to share my own benchmarks, but Umang Sinha’s write-up already does a great job with benchmarks:

https://dev.to/umangsinha12/postgresql-uuid-performance-benchmarking-random-v4-and-time-based-v7-uuids-n9b

My write-up on the mistake I made and what I’d do instead:

https://shey.ca/2025/08/10/my-biggest-db-mistake.html

PostgreSQL UUID Performance: Benchmarking Random (v4) and Time-based (v7) UUIDs

Universally Unique Identifiers (UUIDs) are 128-bit values designed to ensure uniqueness across...

DEV Community
Ubuntu 24.04 feels like a dream. Runs so smooth, feels so fast.

For anyone deep into Postgres, this blog post on replication slots is basically required reading:

https://www.morling.dev/blog/mastering-postgres-replication-slots/

Mastering Postgres Replication Slots: Preventing WAL Bloat and Other Production Issues

Over the last couple of years, I’ve helped dozens of users and organizations to build Change Data Capture (CDC) pipelines for their Postgres databases. A key concern in that process is setting up and managing replication slots, which are Postgres' mechanism for making sure that any segments of the write-ahead log (WAL) of the database are kept around until they have been processed by registered replication consumers. When not being careful, a replication slot may cause unduly large amounts of WAL segments to be retained by the database. This post describes best practices helping to prevent this and other issues, discussing aspects like heartbeats, replication slot failover, monitoring, the management of Postgres publications, and more. While this is primarily based on my experience of using replication slots via Debezium’s Postgres connector, the principles are generally applicable and are worth considering also when using other CDC tools for Postgres based on logical replication.

Excite.

I wrote a post on reliability practice. No chaos monkeys, but quiet drills: restarting services, simulating load, seeing what breaks before it actually does.

https://shey.ca/2025/06/27/practice-before-it-breaks.html

Practice Before It Breaks

Practice Before It Breaks

Shey Sewani
Hot take: I think it’s both easier and more impactful to identify and address obstacles to dev productivity in an org than it is to measure dev productivity