Database
PostgreSQL 19's new WAIT FOR LSN command lets a replica block until it has replayed your write. The read-after-write problem it solves, the workarounds it replaces, and what the timeout, status, and mode options are actually for.
Decoupling business logic from storage in Go, adding transaction support without leaking SQL details, and coordinating atomic writes across multiple repositories using a unit of work.
Adding transaction support to a repository interface without leaking storage details.
Decoupling business logic from storage with a small interface in Go.
Build multi-level rate limiting with Redis sorted sets and Lua. Enforce global and category-specific limits with ZREMRANGEBYSCORE and ZCARD commands.
Sort Django querysets by custom attribute sequences using Case and When expressions for database-level ordering with SQL CASE statements.
Poll multiple data sources in a single thread using Python generators with itertools.cycle to alternate between infinite data streams efficiently.
Use Django query expressions like Replace, Upper, Lower, Concat, and Substr for efficient database-level text manipulation without fetching data.
Accelerate Django bulk_update operations by 4x using multiprocessing to parallelize database writes across chunked record batches.
Practical SQLite recipes for Python: execute statements, batch operations, transactions, row factories, and context managers with sqlite3.
Emulate Python's random.choice in SQLite using JSON arrays and the random() function. Populate tables with realistic test data efficiently.
Speed up Django bulk operations with ProcessPoolExecutor while preserving signals and hooks that bulk_create/bulk_update bypass.