3:I[9275,[],""] 5:I[1343,[],""] 6:I[4858,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"ThemeProvider"] 7:I[9736,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"TooltipProvider"] 8:I[6691,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"Dock"] 9:I[6691,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"DockIcon"] a:I[9736,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"Tooltip"] b:I[9736,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"TooltipTrigger"] c:I[231,["548","static/chunks/548-510bb30c9b0bc6ca.js","404","static/chunks/app/blog/page-4d9832589fa4ccd3.js"],""] d:I[9736,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"TooltipContent"] e:I[9973,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"Separator"] 10:I[7363,["310","static/chunks/0e5ce63c-e21fe8bbb1ba0e0f.js","548","static/chunks/548-510bb30c9b0bc6ca.js","742","static/chunks/742-85076f8988884930.js","860","static/chunks/860-d777b059f14bdbb5.js","185","static/chunks/app/layout-172c78aa84c1a5d4.js"],"ModeToggle"] 4:["slug","backend-postgres-playbook","d"] f:T843,M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z0:["aNPeF8FKe5B4JR6bAt-gQ",[[["",{"children":["blog",{"children":[["slug","backend-postgres-playbook","d"],{"children":["__PAGE__?{\"slug\":\"backend-postgres-playbook\"}",{}]}]}]},"$undefined","$undefined",true],["",{"children":["blog",{"children":[["slug","backend-postgres-playbook","d"],{"children":["__PAGE__",{},[["$L1","$L2"],null],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","blog","children","$4","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","blog","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}],null]},[["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"min-h-screen bg-background font-sans antialiased max-w-2xl mx-auto py-12 sm:py-24 px-6 __variable_f367f3","children":["$","$L6",null,{"attribute":"class","defaultTheme":"light","children":["$","$L7",null,{"delayDuration":0,"children":[["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"styles":null}],["$","div",null,{"className":"pointer-events-none fixed inset-x-0 bottom-0 z-30 mx-auto mb-4 flex origin-bottom h-full max-h-14","children":[["$","div",null,{"className":"fixed bottom-0 inset-x-0 h-16 w-full bg-background to-transparent backdrop-blur-lg [-webkit-mask-image:linear-gradient(to_top,black,transparent)] dark:bg-background"}],["$","$L8",null,{"className":"z-50 pointer-events-auto relative mx-auto flex min-h-full h-full items-center px-1 bg-background [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] ","children":[[["$","$L9","/",{"children":["$","$La",null,{"children":[["$","$Lb",null,{"asChild":true,"children":["$","$Lc",null,{"href":"/","className":"inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground rounded-full size-12","children":["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-home size-4","children":[["$","path","y5dka4",{"d":"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}],["$","polyline","e2us08",{"points":"9 22 9 12 15 12 15 22"}],"$undefined"]}]}]}],["$","$Ld",null,{"children":["$","p",null,{"children":"Home"}]}]]}]}],["$","$L9","/blog",{"children":["$","$La",null,{"children":[["$","$Lb",null,{"asChild":true,"children":["$","$Lc",null,{"href":"/blog","className":"inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground rounded-full size-12","children":["$","svg",null,{"xmlns":"http://www.w3.org/2000/svg","width":24,"height":24,"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":2,"strokeLinecap":"round","strokeLinejoin":"round","className":"lucide lucide-notebook size-4","children":[["$","path","aawbzj",{"d":"M2 6h4"}],["$","path","l0bgd4",{"d":"M2 10h4"}],["$","path","1gsvsf",{"d":"M2 14h4"}],["$","path","1bu2t1",{"d":"M2 18h4"}],["$","rect","1nb95v",{"width":"16","height":"20","x":"4","y":"2","rx":"2"}],["$","path","rotuqe",{"d":"M16 2v20"}],"$undefined"]}]}]}],["$","$Ld",null,{"children":["$","p",null,{"children":"Blog"}]}]]}]}]],["$","$Le",null,{"orientation":"vertical","className":"h-full"}],[["$","$L9","GitHub",{"children":["$","$La",null,{"children":[["$","$Lb",null,{"asChild":true,"children":["$","$Lc",null,{"href":"https://github.com/Syxless","className":"inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground rounded-full size-12","children":["$","svg",null,{"viewBox":"0 0 438.549 438.549","className":"size-4","children":["$","path",null,{"fill":"currentColor","d":"$f"}]}]}]}],["$","$Ld",null,{"children":["$","p",null,{"children":"GitHub"}]}]]}]}],["$","$L9","X",{"children":["$","$La",null,{"children":[["$","$Lb",null,{"asChild":true,"children":["$","$Lc",null,{"href":"https://twitter.com/Syxles__","className":"inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground rounded-full size-12","children":["$","svg",null,{"viewBox":"0 0 24 24","xmlns":"http://www.w3.org/2000/svg","className":"size-4","children":[["$","title",null,{"children":"X"}],["$","path",null,{"fill":"currentColor","d":"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"}]]}]}]}],["$","$Ld",null,{"children":["$","p",null,{"children":"X"}]}]]}]}]],["$","$Le",null,{"orientation":"vertical","className":"h-full py-2"}],["$","$L9",null,{"children":["$","$La",null,{"children":[["$","$Lb",null,{"asChild":true,"children":["$","$L10",null,{}]}],["$","$Ld",null,{"children":["$","p",null,{"children":"Theme"}]}]]}]}]]}]]}]]}]}]}]}],null],null],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/a22127295b244568.css","precedence":"next","crossOrigin":"$undefined"}]],"$L11"]]]] 12:"$Sreact.suspense" 13:Td4e,

Here are sensible defaults I reach for when spinning up a Postgres‑backed service.

Schema & types

Indexes

Migrations

-- Example: safe rename via new column
ALTER TABLE users ADD COLUMN full_name TEXT;
UPDATE users SET full_name = first_name || ' ' || last_name WHERE full_name IS NULL;
-- Switch reads/writes in app, then drop old columns in a later migration

Connections

Observability

Simple, boring defaults reduce 90% of “why is prod slow?” incidents.

2:["$","section",null,{"id":"blog","children":[["$","script",null,{"type":"application/ld+json","suppressHydrationWarning":true,"dangerouslySetInnerHTML":{"__html":"{\"@context\":\"https://schema.org\",\"@type\":\"BlogPosting\",\"headline\":\"Postgres in practice: a tiny production playbook\",\"datePublished\":\"2025-07-05\",\"dateModified\":\"2025-07-05\",\"description\":\"Defaults that work: schema design, indexes, migrations, and connection hygiene.\",\"image\":\"https://github.com/Syxless/og?title=Postgres in practice: a tiny production playbook\",\"url\":\"https://github.com/Syxless/blog/backend-postgres-playbook\",\"author\":{\"@type\":\"Person\",\"name\":\"Syxles\"}}"}}],["$","h1",null,{"className":"title font-medium text-2xl tracking-tighter max-w-[650px]","children":"Postgres in practice: a tiny production playbook"}],["$","div",null,{"className":"flex justify-between items-center mt-2 mb-8 text-sm max-w-[650px]","children":["$","$12",null,{"fallback":["$","p",null,{"className":"h-5"}],"children":["$","p",null,{"className":"text-sm text-neutral-600 dark:text-neutral-400","children":"July 5, 2025 (2mo ago)"}]}]}],["$","article",null,{"className":"prose dark:prose-invert","dangerouslySetInnerHTML":{"__html":"$13"}}]]}] 11:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Postgres in practice: a tiny production playbook | Syxles"}],["$","meta","3",{"name":"description","content":"Defaults that work: schema design, indexes, migrations, and connection hygiene."}],["$","meta","4",{"name":"robots","content":"index, follow"}],["$","meta","5",{"name":"googlebot","content":"index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1"}],["$","meta","6",{"property":"og:title","content":"Postgres in practice: a tiny production playbook"}],["$","meta","7",{"property":"og:description","content":"Defaults that work: schema design, indexes, migrations, and connection hygiene."}],["$","meta","8",{"property":"og:url","content":"https://github.com/Syxless/blog/backend-postgres-playbook"}],["$","meta","9",{"property":"og:image","content":"https://github.com/Syxless/og?title=Postgres%20in%20practice:%20a%20tiny%20production%20playbook"}],["$","meta","10",{"property":"og:type","content":"article"}],["$","meta","11",{"property":"article:published_time","content":"2025-07-05"}],["$","meta","12",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","13",{"name":"twitter:title","content":"Postgres in practice: a tiny production playbook"}],["$","meta","14",{"name":"twitter:description","content":"Defaults that work: schema design, indexes, migrations, and connection hygiene."}],["$","meta","15",{"name":"twitter:image","content":"https://github.com/Syxless/og?title=Postgres%20in%20practice:%20a%20tiny%20production%20playbook"}],["$","link","16",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}]] 1:null