The Omenabyte Blog

Notes from the build.

Field notes on shipping AI products, securing what you build, and running infrastructure with fewer moving parts. Everything here is tested before it ships — including the parts that turned out to be a bad idea.

Where a single-Postgres architecture breaks — the honest limits of the eight swaps
LatestDatabasesOct 18, 2026 · 5 min read

I Replaced 8 Services With Postgres. Here's Where It Actually Breaks.

Eight swaps, one instance — then the part nobody writes: where sharding, extreme ingest, pooler limits and single-instance blast radius actually stop you.

Read the post →

Databases · 10 posts

Replace your hand-built API layer — PostgREST with Row-Level Security
Databases08/09

Let Your Database Generate the API and Guard the Door

PostgREST turns your schema into a documented REST API and RLS moves authorization below the application layer — plus the owner bypass nobody warns you about.

5 min
Two wireframe figures on a cyan grid floor reaching for a single glowing amber ticket suspended between them
Databases

Two People Bought the Last Ticket. Both Got a Confirmation Email.

A race condition is not a crash. It is the ordinary result of two requests arriving at once. The bug is the gap between checking and writing, not the code on either side of it.

9 min
Replace standalone GIS tools — PostGIS with a GiST index
Databases07/09

"Find What's Nearby" Doesn't Need a Separate GIS Stack

A geography column plus a GiST index turns "what's near this point" into an ordinary spatial query — and the coordinate trap that fails silently instead of erroring.

5 min
Replace Snowflake dashboards — materialized views in Postgres
Databases06/09

Stop Recomputing Your Dashboard on Every Page Load

A materialized view pre-computes the aggregation once, REFRESH CONCURRENTLY hot-swaps it without locking readers, and pg_cron schedules it in-database. No ETL pipeline, no warehouse.

5 min
Replace InfluxDB — declarative partitioning with BRIN indexes
Databases05/09

Billions of Log Rows, One Command to Make Them Disappear

Declarative partitioning plus a BRIN index prunes the scan to one partition — and retention becomes a single DROP TABLE, not a bulk delete job.

5 min
Replace MongoDB — jsonb column with a GIN index
Databases04/09

You Don't Need MongoDB for "Flexible" Data. You Need One Column Type.

jsonb plus a GIN index gives you document flexibility without a second database — and the "document" still joins against your relational tables in one transaction.

4 min
Replace Pinecone — pgvector with an HNSW index
Databases03/09

Your AI Feature Doesn't Need Pinecone. It Needs pgvector.

pgvector with an HNSW index puts embeddings in the same row as everything else — semantic and relational in one query, one transaction.

4 min
Replace Elasticsearch — tsvector with pg_trgm trigram search
Databases02/09

Postgres Can Do Typo-Tolerant Search. You Don't Need Elasticsearch Yet.

tsvector plus pg_trgm give you stemmed, ranked, typo-tolerant search inside the database you already run — no second cluster, no sync job.

5 min
Replace Redis and RabbitMQ — FOR UPDATE SKIP LOCKED job queue
Databases01/09

I Replaced Redis and RabbitMQ With 15 Lines of Postgres

The FOR UPDATE SKIP LOCKED clause turns an ordinary table into a safe, concurrent job queue — tested for duplicates, crashes and reclaims before this post was written.

4 min