I read 128 FOR UPDATE lines in 34 public booking/wallet repos. Only 2 were locks that lock nothing.
The bug that kept showing up was status checked with a plain read before the write. In one repo a double tap on Pay left the booking FAILED with both seats booked, 10/10 runs.
pgvector RAG with the tenant in jsonb metadata and an HNSW index: the index fetches the 40 nearest rows table-wide, then the WHERE filters them. I benchmarked 50k Wikipedia chunks and a 100-row tenant got recall@10 of 0.23. a plain btree on the tenant key got 1.00