[{"data":1,"prerenderedAt":399},["ShallowReactive",2],{"project-47123631":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":42,"post_text":44,"what":45,"said":76,"maker_in_thread":170,"shape":180,"grid":184,"attempts":355,"same_week":362,"maker_shows":43,"maker_hidden":391,"reader_version":392,"card":393},"47123631","PgDog","Scale Postgres without changing the app","title","Show HN: PgDog – Scale Postgres without changing the app","https:\u002F\u002Fgithub.com\u002Fpgdogdev\u002Fpgdog","github.com","levkk",1771860804,2026,326,63,121,4366,3,"legend","infrastructure","database proxy and sharding","other",[24,25,26,27],"postgres sharding","connection pooler","postgres load balancer","pgbouncer alternative","curious",0.258,{"positive":31,"neutral":32,"mixed":33,"critical":34},10,20,0,2,32,{"docs":37,"performance":38,"idea":40,"execution":41},{"positive":33,"critical":33},{"positive":33,"critical":39},1,{"positive":18,"critical":33},{"positive":33,"critical":39},[18,43,43,18,43,18,18,18,33,33,33,18,18,33,18,18,18,39,33,43,43,33,18,33,18,43,33,18,18,33,18,39,18,33,43,18,18,43,43,43],5,"Hey HN!\n\nLev and Justin here, authors of PgDog (https:\u002F\u002Fgithub.com\u002Fpgdogdev\u002Fpgdog), a connection pooler, load balancer and database sharder for PostgreSQL. If you build apps with a lot of traffic, you know the first thing to break is the database. We are solving this with a network proxy that works without requiring application code changes or database migrations.\n\nOur post from last year: https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=44099187\n\nThe most important update: we are in production. Sharding is used a lot, with direct-to-shard  queries (one shard per query) working pretty much all the time. C",{"problem":46,"audience":52,"pricing":59,"motivation":60,"time_to_build":59,"stack":64,"openness":73,"stage":74,"team_size":75},{"value":47,"source":48,"evidence":49},"Postgres becomes the bottleneck under high traffic; scaling requires sharding and pooling without app changes.","maker",[50],{"id":51},"post",{"value":53,"source":48,"evidence":54},"Teams running high-traffic apps on PostgreSQL.",[55,56],{"id":51},{"id":57,"by":11,"text":58},"47126617","We have all kinds, it's not specific to any particular sector. That's kind of the beauty for building for Postgres - everyone uses it in some capacity! My general advice is, once…",null,{"value":61,"source":48,"evidence":62},"Make Postgres scale without application code changes or migrations.",[63],{"id":51},[65],{"value":66,"source":67,"evidence":68},"Rust","commenter",[69],{"id":70,"by":71,"text":72},"47128649","array_loader","(apologies for new account - NDA applies to the specifics) Nice surprise to see this here today. I was working on a deployment just last week. Unfortunately for me, I found that…","open_source","launched","team",{"praise":77,"objections":100,"requests":115,"questions":130,"alternatives":145},[78,93],{"value":79,"source":67,"evidence":80},"Useful connection pooler and sharding progress",[81,85,89],{"id":82,"by":83,"text":84},"47127202","saisrirampur","Great progress, guys! It’s impressive to see all the enhancements - more types, more aggregate functions, cross-node DML, resharding, and reliability-focused connection pooling…",{"id":86,"by":87,"text":88},"47125519","mijoharas","Happy pgdog user here, I can recommend it from a user perspective as a connection pooler to anyone checking this out (we're also running tests and positive about sharding, but…",{"id":90,"by":91,"text":92},"47133746","jacobsenscott","I've been watching PgDog for a while now. Great progress!",{"value":94,"source":67,"evidence":95},"Connection draining handles connection storms well",[96],{"id":97,"by":98,"text":99},"47133196","umairnadeem123","the connection draining feature is really clever. weve dealt with connection storms from app crashes before and the standard playbook is just to restart everything and hope the…",[101,109],{"value":102,"source":48,"evidence":103},"Cross-shard queries still incomplete and may return incorrect results",[104,105],{"id":51},{"id":106,"by":107,"text":108},"47131018","farsa","Congrats on the progress! What is the behavior of PgDoc if it receives some sort of query it can't currently handle properly? Is there a linter\u002Fstatic analysis tool I can use to…",{"value":110,"source":48,"evidence":111},"Two-phase commit lacks crash protection",[112],{"id":113,"by":11,"text":114},"47125812","It feels better now, but we still need to add crash protection - in case PgDog itself crashes, we need to restore in-progress 2pc transaction records from a durable medium. We…",[116,123],{"value":117,"source":67,"evidence":118},"Retry failed queries on another backend",[119],{"id":120,"by":121,"text":122},"47127712","cuu508","Some HTTP proxies can do retries -- if a connection to one backend fails, it is retried on a different backend. Can PgDog (or PgBouncer, or any other tool) do something similar…",{"value":124,"source":67,"evidence":125},"Read-after-write routing to primary",[126],{"id":127,"by":128,"text":129},"47218951","mickelsamuel","The read-after-write problem on replicas is what actually hurts in production. Write goes to primary, next request hits a replica that's a few hundred milliseconds behind, and…",[131,138],{"value":132,"source":67,"evidence":133},"Does it support PostGIS and extensions",[134],{"id":135,"by":136,"text":137},"47132869","febed","Does it support extensions like PostGIS?",{"value":139,"source":67,"evidence":140},"Can it be used with TimescaleDB",[141],{"id":142,"by":143,"text":144},"47149003","yilugurlu","Sorry if this is a weird question, but can I use this with TimescaleDB?",[146,151,155,159,166],{"value":147,"source":67,"evidence":148},"PgBouncer",[149,150],{"id":120,"by":121,"text":122},{"id":127,"by":128,"text":129},{"value":152,"source":67,"evidence":153},"PgPool-II",[154],{"id":70,"by":71,"text":72},{"value":156,"source":67,"evidence":157},"Citus",[158],{"id":82,"by":83,"text":84},{"value":160,"source":67,"evidence":161},"PostgREST",[162],{"id":163,"by":164,"text":165},"47131282","ijustlovemath","How would this product compare to a PostgREST based approach (this is the cool tech behind the original supabase) with load balancing at the HTTP level?",{"value":167,"source":48,"evidence":168},"HAProxy",[169],{"id":51},{"comments":171,"answered":32,"key":172},22,[173,176,177],{"id":174,"text":175},"47132551","A couple options come to mind: 1. Replicate shards into one beefy database and use that. Replication is cheaper than individual statements, so this can work for a while. The sink…",{"id":113,"text":114},{"id":178,"text":179},"47126992","It shards it as well. We handle schema sync, moving table data (in parallel), setting up logical replication, and application traffic cutover. The zero-downtime resharding is…",{"commenters":181,"max_depth":43,"maker_replies":171,"first_comment_mins":182,"lifespan_hours":183},34,116,168,[185,189,190,192,194,196,200,201,203,207,210,212,214,217,218,222,225,228,231,234,236,238,240,244,246,248,250,255,258,261,263,265,269,273,276,278,282,285,288,290,293,295,300,303,305,307,310,314,316,318,320,323,325,327,329,332,336,338,340,342,344,346,348,352,354],[186,33,18,187,188,33],"47132290","maker\u002Fneutral\u002Fnone","gregw2",[174,33,33,187,11,39],[82,39,43,191,83,33],"maker\u002Fpositive\u002Fnone",[86,34,43,193,87,33],"project\u002Fpositive\u002Fnone",[113,34,33,195,11,39],"maker\u002Fneutral\u002Fexecution",[197,18,18,198,199,33],"47126921","project\u002Fneutral\u002Fnone","codegeek",[178,18,33,187,11,39],[202,18,43,193,199,33],"47127025",[204,18,18,205,206,33],"47135217","project\u002Fneutral\u002Fdocs","oulipo2",[208,18,33,209,11,39],"47181871","maker\u002Fneutral\u002Fdocs",[120,211,18,198,121,33],4,[213,211,33,187,11,39],"47128217",[215,43,18,187,216,33],"47126391","noleary",[57,43,33,198,11,39],[219,43,33,220,221,33],"47126875","commenter\u002Fneutral\u002Fnone","mystifyingpoi",[223,43,33,220,224,33],"47127844","CuriouslyC",[226,43,33,220,227,33],"47132494","freakynit",[229,43,33,220,230,33],"47127785","Eikon",[232,233,18,198,206,33],"47130284",6,[235,233,33,187,11,39],"47131616",[237,233,18,187,206,33],"47135164",[239,233,33,187,11,39],"47139037",[241,242,18,198,243,33],"47128494",7,"mosselman",[245,242,33,187,11,39],"47128637",[247,242,18,198,243,33],"47129531",[249,242,33,209,11,39],"47129978",[251,252,18,253,254,33],"47126668",8,"project\u002Fneutral\u002Fperformance","jackfischer",[256,252,33,257,11,39],"47126733","maker\u002Fneutral\u002Fperformance",[259,252,39,260,254,33],"47127296","project\u002Fcritical\u002Fperformance",[262,252,33,257,11,39],"47127464",[264,252,43,191,254,33],"47127561",[266,252,33,267,268,33],"47128905","commenter\u002Fneutral\u002Fperformance","maherbeg",[270,271,43,193,272,33],"47125908",9,"cpursley",[274,271,33,220,275,33],"47126357","verdverm",[277,271,33,220,272,33],"47126800",[279,271,33,280,281,33],"47126452","other\u002Fneutral\u002Fnone","aram99",[283,271,18,198,284,33],"47126518","nebezb",[286,271,33,280,287,33],"47127173","pbreit",[289,271,33,220,272,33],"47128343",[291,31,18,187,292,33],"47130616","lordofgibbons",[294,31,33,187,11,39],"47130675",[296,297,43,298,299,33],"47131119",11,"maker\u002Fpositive\u002Fidea","written-beyond",[301,297,33,302,11,39],"47131464","maker\u002Fneutral\u002Fidea",[304,297,18,187,299,33],"47137110",[306,297,33,187,11,39],"47140018",[308,297,18,309,299,33],"47143392","project\u002Fneutral\u002Fidea",[311,312,18,187,313,33],"47154215",12,"dujuku",[315,312,33,187,11,39],"47156132",[106,317,18,198,107,33],13,[319,317,33,187,11,39],"47131554",[70,321,39,322,71,33],14,"project\u002Fcritical\u002Fexecution",[324,321,33,195,11,39],"47128694",[163,326,18,198,164,33],15,[328,326,33,187,11,39],"47131417",[330,326,33,220,331,33],"47139258","steve-chavez",[333,334,43,193,335,33],"47126736",16,"I_am_tiberius",[135,337,18,198,136,33],17,[339,337,33,187,11,39],"47133010",[142,341,18,198,143,33],18,[343,341,33,187,11,39],"47156147",[90,345,43,193,91,33],19,[127,32,43,347,128,33],"project\u002Fpositive\u002Fidea",[349,350,18,253,351,33],"47126058",21,"octoclaw",[353,350,33,253,11,39],"47126217",[97,171,43,347,98,33],[356,361],{"id":357,"t":358,"points":359,"comments":360},"44099187",1748278549,307,80,{"id":4,"t":12,"points":14,"comments":15},[363,368,373,378,382,386],{"id":364,"name":365,"points":366,"category":367},"47075124","Micasa",657,"productivity",{"id":369,"name":370,"points":371,"category":372},"47114530","CIA World Factbook Archive",496,"learning_science",{"id":374,"name":375,"points":376,"category":377},"47104667","ntransformer",395,"ai",{"id":379,"name":380,"points":381,"category":377},"47131225","Steerling-8B",328,{"id":383,"name":384,"points":385,"category":377},"47143755","Moonshine Open-Weights STT models",316,{"id":387,"name":388,"points":389,"category":390},"47132102","X86CSS",275,"languages",false,"v2",{"id":394,"name":5,"line":6,"ai":391,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":395,"top":18,"kw":396,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":397,"url":9,"mix":398,"praise":79,"objection":102,"sub":21},47123631,0.26,[24,25,26,27],"3553533300033033310550303503303130533555",[31,32,33,34],1794036694072]