Browse 15 notes tagged database.
Use an accidental order deletion to understand RPO and RTO, SQL versus custom archive restore tools, forward WAL replay, and PITR stopping points and restore checks.
Keep Supabase RLS, least-privilege grants, operation-specific policies, and allow-or-deny SQL tests in migrations so every environment can replay and review them.
Use PostgreSQL Row-Level Security for a shared table by separating GRANTs from policies, existing rows from proposed rows, and caller identity from view or function ownership.
Use the boundaries between connections, sessions, and transactions to reason about PostgreSQL connection budgets, PgBouncer modes, session-state compatibility, and `pg_stat_activity`.
Trace five rows through OFFSET and keyset pagination, then connect compound cursors to B-tree indexes, NULL handling, and the limits of changing data.
A PostgreSQL schema migration must account for existing rows, older workers, and newly deployed code. Use expand, repeatable backfills, and evidence about locks, indexes, and constraints before removing an old path.
PostgreSQL chooses query plans from estimated costs. Compare EXPLAIN estimates with real execution before deciding whether statistics, query design, or an index needs to change.
A PostgreSQL index earns its cost only when a real query's filters, ordering, result size, and write workload justify another maintained data structure.
An order can touch inventory, orders, and payment records. A transaction keeps database changes all-or-nothing; it cannot unsend an email or replace constraints and concurrency design.
Decide what one result row means and whether unmatched data stays first. Then choose INNER JOIN or LEFT JOIN without mistaking normal fanout for duplicates.
A reliable SQL query does more than retrieve data: name the columns, filter with WHERE, define an order with ORDER BY, then cap the result with LIMIT.
Tables, keys, and constraints form a shared data contract. Frontend validation improves UX; the database must reject impossible writes.
SKIP LOCKED can claim jobs without worker contention, but reliable delivery still needs short transactions, leases, retries, idempotency, and an exit plan.
PostgreSQL 18 can reuse a multicolumn B-tree when the leftmost column is not filtered. The win is real, but cardinality and query plans still decide.
UUIDv7 improves index locality in SQLite and PostgreSQL, but 128-bit keys still cost more than bigint. Use it when distributed ID generation is required.
Google services settings
Analytics and advertising stay off until you choose.