SShortSingh.
Back to feed

Zero-downtime schema change on Neon: splitting a users.name column without failed requests

0
·1 views

A developer demonstrates how to split a single name column into first and last name columns in Postgres without downtime, using the expand-and-contract pattern. The test setup runs a small orders API across two instances behind a health-checked proxy, with Postgres 18 hosted on Neon and seeded with 200,000 users and 100,000 orders. The migration is broken into six steps: adding nullable columns and a sync trigger, deploying dual writes, backfilling existing rows, enforcing constraints, switching reads, and finally dropping the old column. Each database step is rehearsed first on a disposable Neon copy-on-write branch to check its effects before running against production. Across the run, 319,568 requests were sent during the migration and none failed, with a load generator also checking that names were preserved, not just that responses returned success.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

After a Year of Daily Use, Which AI Image Generators Actually Stick

A writer who generates images almost daily spent a year testing and re-subscribing to major AI image tools, concluding there is no single winner. Midjourney is still praised for the most consistently beautiful raw output, but it has no free tier and plans run from about $10 to $120 monthly. GPT Image, inside ChatGPT, is highlighted for multi-turn editing and for following instructions closely, which the author calls the biggest workflow difference. Ideogram is preferred for images containing text, while Stable Diffusion and Flux suit self-hosting, which is free in software but requires capable hardware and a learning curve. Adobe's Firefly and Recraft are noted for commercial licensing safety and genuine vector output, respectively.

0
ProgrammingDEV Community ·

Keeping Terraform Vault Secrets Out of State and Git

Using the vault_kv_secret_v2 data source to pull database passwords into Terraform stores those values in plain-text state, even when variables are marked sensitive. Newer Terraform and Vault provider releases offer ephemeral resources and write-only arguments, which keep secrets available during a run without persisting them in plan or state. The approach requires Terraform 1.10 or 1.11 or later, a KV version 2 secrets engine in Vault, and a non-interactive authentication method such as AppRole or JWT. Users should configure the Vault provider without hard-coded tokens, reading credentials from the environment or auth blocks. Support for write-only arguments varies by provider and resource, so the guide advises checking each provider's documentation before relying on it.

0
ProgrammingDEV Community ·

Developer builds Kyboro, an AI agent that runs plain-English tasks on a user's own PC

A developer has created Kyboro, a desktop tool that carries out tasks described in everyday language, such as opening a browser, editing files, or running terminal commands, while the user watches. The system is split into an Electron desktop app, a local Python executor that performs the actions, and a cloud orchestrator built with FastAPI and Postgres that plans tasks and selects models. The developer reports several engineering problems along the way, including timeouts that silently killed tasks, retry loops that evaded detection, and a confirmation flow that had to be built so risky actions like deleting files wait for user approval. Early versions are available for Windows, Mac, and as a Chrome extension, and the developer is asking for feedback from real-world use.

0
ProgrammingDEV Community ·

PPTX converter fixed to follow true slide order instead of filename order

A developer found that a pitch deck converted to Markdown placed the appendix before the main pitch because the converter read slide files alphabetically. In PPTX files, slide filenames like slide1.xml do not reflect presentation order, which is instead defined in presentation.xml. The fix parses the slide ID list and resolves each relationship ID to its target file, so slides appear in the order the author intended. The developer compares this to similar ordering issues in spreadsheets and EPUB files, where the index rather than the filename determines sequence. The corrected tool is available as part of the author's document tooling online.