Back to feed
Dev.to
Dev.to
7/9/2026
The PostgREST query that silently ORDER BY ctid: a Supabase week, distilled

The PostgREST query that silently ORDER BY ctid: a Supabase week, distilled

Short summary

A backend engineer recounts four Supabase incidents in one week that share a single failure mode: the database executes queries, returns HTTP 200, and silently lies — incomplete payloads, unintended access, masked constraint conflicts, or infinite RLS recursion. None would be caught by unit tests or standard code review. The author proposes three material rules: treat vendor defaults as frozen snapshots that must be documented or blocked, enforce patterns via AST-based linting rather than human review, and accept that platform defaults are implicit contracts embedded in production code.

  • Four Supabase incidents share one root cause: silent database failures with no exceptions surfaced to the client
  • Vendor defaults like row caps, anon grants, and RLS recursion act as undocumented contracts that break in production
  • Three proposed rules: materialize or forbid vendor defaults, use AST linting over human review for pattern enforcement, and treat platform defaults as implicit design decisions

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more