API Design
Dispatch
Request timeouts are typically thought of as a client-side concern. The server-side timeout is the contract customers build retry logic against, and getting it wrong produces compounding bugs across customer integrations.
Postgres
Dispatch
SELECT FOR UPDATE is the row-locking mode every developer eventually learns. SELECT FOR SHARE is the weaker variant most developers never reach for. Knowing when each is right is the difference between a queue that scales and a queue that thrashes.
API Design
Dispatch
Should a comment on a post be at /comments/{id} or /posts/{post_id}/comments/{id}? Both shapes exist in production APIs for good reasons. The hybrid pattern most B2B SaaS converges on is flat canonical addresses plus scoped collection URLs for parent-context listing.
Postgres
Dispatch
pg_stat_activity shows the wait events for currently-active sessions at the moment you query it. pg_wait_sampling captures them continuously by sampling at high frequency and aggregating. The view that results is one of the most useful diagnostic surfaces for a busy database.
API Design
Dispatch
Three industry conventions for cursor pagination headers and parameters: starting_after (Stripe), cursor (Linear/GitHub-style), and page_token (Google-style). The differences are conceptual rather than mechanical and they shape what customers can do at the edges.
Postgres
Dispatch
random_page_cost is the single most important storage-cost parameter the planner uses. Its 4.0 default reflects spinning rust. On SSD and NVMe storage, the right value is between 1.0 and 1.5, and changing it shifts plan choices for thousands of queries at once.
Postgres
Dispatch
track_io_timing turns I/O time into a per-query observable. Off by default because of historical clock-read cost. On modern hardware the cost is negligible and the data is essential for distinguishing CPU-bound from disk-bound queries.
API Design
Dispatch
Export endpoints are a contract about what data the customer can take with them. The customer cases that drive the requirement are competitive migration, internal duplication, account closure, and audit. The right shape for each is different.
History
Dispatch
Carl Magee patented the parking meter in 1935 to solve a Oklahoma City Chamber of Commerce complaint. Within twenty years it had reshaped how American cities thought about curb space, retail, and small-cash municipal revenue.
Postgres
Dispatch
pg_cancel_backend interrupts a query while keeping the connection alive. pg_terminate_backend kills the connection entirely. The distinction matters during incidents and the wrong choice can convert a slow query into a stampede of reconnects.
API Design
Dispatch
A nullable boolean has three states: true, false, and null. APIs that document the field as a boolean and treat null as false at some layers but as unknown at others produce bugs customers hit months after integration.
Postgres
Dispatch
pg_stat_statements_reset() looks like a clean slate function but throwing away cumulative query statistics destroys trend visibility. The right discipline is rare, scoped resets paired with snapshot capture.