[{"data":1,"prerenderedAt":532},["ShallowReactive",2],{"project-41224689":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":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":46,"post_text":49,"what":50,"said":74,"maker_in_thread":193,"shape":206,"grid":210,"attempts":493,"same_week":494,"maker_shows":47,"maker_hidden":524,"reader_version":525,"card":526},"41224689","PGlite","in-browser WASM Postgres with pgvector and live sync","title","Show HN: PGlite – in-browser WASM Postgres with pgvector and live sync","https:\u002F\u002Fpglite.dev\u002F","pglite.dev","samwillis",1723472403,2024,509,108,64,3515,2,"legend","data","embedded database","library",[24,25,26,27,28],"postgres","wasm","in-browser database","pgvector","embedded postgres","curious",0.303,{"positive":32,"neutral":33,"mixed":34,"critical":35},28,37,0,6,71,{"idea":38,"execution":40,"docs":42,"performance":44,"privacy":45},{"positive":39,"critical":34},20,{"positive":41,"critical":41},3,{"positive":43,"critical":18},1,{"positive":43,"critical":34},{"positive":34,"critical":43},[47,47,41,41,47,34,47,41,47,41,41,47,47,47,43,41,41,47,47,48,41,47,48,41,41,47,47,47,47,47,34,47,41,41,41,41,43,41,43,47],5,4,"Hey, Sam and the team from ElectricSQL here.\n\nPGlite is a WASM Postgres build packaged into a TypeScript\u002FJavaScript client library, that enables you to run Postgres in the browser, Node.js and Bun, with no need to install any other dependencies. It's 3mb Gzipped, now has support for many Postgres extensions, including pgvector, and it has a reactive \"live query\" API. It's also fast, with CRUD style queries executing in under 0.3 ms, and larger, multi-row select queries occurring within a fraction of a single frame.\n\nPGlite started as an experimental project we shared on X, and the response to ",{"problem":51,"audience":57,"pricing":57,"motivation":57,"time_to_build":57,"stack":58,"openness":71,"stage":72,"team_size":73},{"value":52,"source":53,"evidence":54},"Run a full Postgres database in the browser or Node\u002FBun without installing dependencies","maker",[55],{"id":56},"post",null,[59,63,67],{"value":60,"source":53,"evidence":61},"WebAssembly",[62],{"id":56},{"value":64,"source":53,"evidence":65},"TypeScript",[66],{"id":56},{"value":68,"source":53,"evidence":69},"PostgreSQL",[70],{"id":56},"unknown","launched","company",{"praise":75,"objections":109,"requests":128,"questions":152,"alternatives":175},[76,91,102],{"value":77,"source":78,"evidence":79},"Removes need for Docker for dev and testing","commenter",[80,84,87],{"id":81,"by":82,"text":83},"41225080","creativedg","Huge fan of PGlite. It's the perfect solution to have Postgres without the need of Docker. With just `npm install`, you can have a Postgres instance on your computer. So, it's…",{"id":85,"by":82,"text":86},"41226981","Yes, it's very cool alternative and it removes the need for docker compose for dev environment. On top of it, PGlite also perfect for CI and testing.",{"id":88,"by":89,"text":90},"41225833","isoprophlex","That's great! Corpo beancounters want us to move off docker on EC2 onto bare metal, making both dev and deploy experience terrible. This will help ease pain!",{"value":92,"source":78,"evidence":93},"Useful for integration testing with real Postgres",[94,98],{"id":95,"by":96,"text":97},"41225523","bezbac","I recently experimented with using pglite for API integration tests in one of my side projects. It worked pretty well and has much better DX than using something like…",{"id":99,"by":100,"text":101},"41226199","loevborg","PGLite is amazing for integration testing of queries against a real in-memory db. Is it possible to use PGLite for that purpose in non-JS environments, like e.g. golang?",{"value":103,"source":78,"evidence":104},"Small 3MB download is impressive",[105],{"id":106,"by":107,"text":108},"41225323","simonw","I'd seen this running in a browser before (the ~3MB download is really impressive for that), but I hadn't clocked that it runs server-side with Node.js and Bun as well:…",[110,121],{"value":111,"source":78,"evidence":112},"Performance and persistence limits compared with native Postgres",[113,117],{"id":114,"by":115,"text":116},"41242461","WuxiFingerHold","It'll be interesting how well this works out in practice. I don't know how they modified the persistence layer of PG, but I could imagine that there are limitations compared to…",{"id":118,"by":119,"text":120},"41225519","namanyayg","How does the performance compare to actual postgres?",{"value":122,"source":78,"evidence":123},"Live query and Safari storage limitations",[124],{"id":125,"by":126,"text":127},"41228018","cheema33","The filesystems page at https:\u002F\u002Fpglite.dev\u002Fdocs\u002Ffilesystems says the following: > \"We would recommend using the IndexedDB VFS in the browser at the current time as the OPFS VFS…",[129,138,145],{"value":130,"source":78,"evidence":131},"Support for languages beyond JavaScript",[132,133,137],{"id":106,"by":107,"text":108},{"id":134,"by":135,"text":136},"41226651","satvikpendem","Congrats on the Show HN. I follow the ElectricSQL Discord server and I was distinctly interested in this but for other languages than TypeScript, so it's nice to see that making…",{"id":99,"by":100,"text":101},{"value":139,"source":78,"evidence":140},"Native library build",[141],{"id":142,"by":143,"text":144},"41225134","saurik","Does there happen to be a native analog to this? So like, if I eventually want some kind of native app, I wouldn't have to throw away the architecture entirely and start over? I…",{"value":146,"source":78,"evidence":147},"JavaScript functions inside the database",[148],{"id":149,"by":150,"text":151},"41225552","makkesk8","Awesome work! A killer feature of sqlite that I would love to see in pglite would be javascript window functions.",[153,168],{"value":154,"source":78,"evidence":155},"How does it compare to SQLite and DuckDB",[156,160,164],{"id":157,"by":158,"text":159},"41226450","Retr0id","Normally I'd say the main difference between postgres and SQLite is that the latter is in-process. Now that they can both be in-process, is there a more detailed comparison of…",{"id":161,"by":162,"text":163},"41227860","sam_perez","Oh cool, how would you compare this to DuckDB?",{"id":165,"by":166,"text":167},"41226554","non-","Would really like to see a benchmarking analysis vs SQLite. How do they compare on memory usage and overhead? I already default to SQLite for new side projects with the idea that…",{"value":169,"source":78,"evidence":170},"Can it be used with at-rest encryption",[171],{"id":172,"by":173,"text":174},"41226667","blueprint","Anyone know how this would play with at-rest encryption extensions?",[176,181,189],{"value":177,"source":78,"evidence":178},"SQLite",[179,180],{"id":157,"by":158,"text":159},{"id":165,"by":166,"text":167},{"value":182,"source":78,"evidence":183},"Docker Postgres or testcontainers",[184,185],{"id":95,"by":96,"text":97},{"id":186,"by":187,"text":188},"41226518","tracker1","Definitely interesting, though I often just use docker compose for dev dependencies, this is definitely a cool alternative.",{"value":190,"source":78,"evidence":191},"DuckDB",[192],{"id":161,"by":162,"text":163},{"comments":194,"answered":195,"key":196},21,15,[197,200,203],{"id":198,"text":199},"41225520","Getting PGlite working with other languages is very high on my list. We are working on two approaches: - a WASI build with a lower level api that users can wrap with a higher…",{"id":201,"text":202},"41228729","No branch yet, we're still in the early research and experimental stage.",{"id":204,"text":205},"41226862","We have the (accidentally undocumented) execProtocolRaw api that lets you execute Postgres wire protocol messages. If you use that you can then use a Python Postgres wire…",{"commenters":207,"max_depth":47,"maker_replies":194,"first_comment_mins":208,"lifespan_hours":209},62,27,291,[211,213,215,219,220,223,225,229,231,235,237,238,239,240,244,247,250,252,255,258,260,262,265,266,268,272,273,276,279,282,285,286,289,292,295,297,299,303,307,310,312,314,316,319,323,325,327,329,332,336,338,341,345,347,351,354,357,360,362,365,367,369,374,378,380,383,385,390,392,394,396,400,404,407,409,411,413,416,418,420,422,424,427,430,432,434,436,439,441,444,447,448,450,452,454,456,458,460,464,469,471,473,476,478,482,484,487,489],[106,34,47,212,107,34],"project\u002Fpositive\u002Fidea",[198,34,34,214,11,43],"project\u002Fneutral\u002Fnone",[216,34,41,217,218,34],"41228073","project\u002Fneutral\u002Fidea","sitkack",[201,34,34,214,11,43],[221,34,47,212,222,34],"41232911","rubenfiszel",[224,34,41,214,187,34],"41226494",[226,34,41,227,228,34],"41226800","project\u002Fneutral\u002Fexecution","abrichr",[204,34,34,230,11,43],"project\u002Fneutral\u002Fdocs",[232,34,47,233,234,34],"41228367","project\u002Fpositive\u002Fexecution","networked",[114,34,43,236,115,34],"project\u002Fcritical\u002Fexecution",[81,43,47,233,82,34],[186,43,41,217,187,34],[85,43,47,212,82,34],[241,43,34,242,243,34],"41227075","commenter\u002Fneutral\u002Fnone","ggregoire",[245,43,34,242,246,34],"41227305","andruby",[248,43,34,242,249,34],"41227622","motolov",[251,43,34,242,187,34],"41227899",[253,43,47,212,254,34],"41232802","vekker",[256,18,41,230,257,34],"41225011","sgbeal",[259,18,34,242,11,43],"41225028",[261,18,34,242,257,34],"41225055",[263,41,47,212,264,34],"41226890","Cu3PO42",[134,48,41,217,135,34],[267,48,34,217,11,43],"41226698",[269,48,41,270,271,34],"41226801","project\u002Fneutral\u002Fperformance","zooq_ai",[157,47,41,214,158,34],[274,47,41,214,275,34],"41231637","nbbaier",[277,47,43,236,278,34],"41235191","AlexErrant",[280,47,47,212,281,34],"41238086","grsmvg",[283,47,34,242,284,34],"41242269","Kinrany",[95,35,47,212,96,34],[287,35,41,227,288,34],"41225840","riverdroid",[290,35,47,212,291,34],"41226012","koeng",[293,35,47,212,294,34],"41226025","FlyingSnake",[296,35,34,242,291,34],"41227363",[298,35,34,217,11,43],"41226107",[300,301,47,212,302,34],"41225793",7,"bearjaws",[304,301,43,305,306,34],"41227387","project\u002Fcritical\u002Fprivacy","TeeWEE",[308,301,34,242,309,34],"41229713","thruflo",[311,301,34,242,302,34],"41235141",[142,313,41,227,143,34],8,[315,313,34,217,11,43],"41225185",[317,313,41,227,318,34],"41227084","nikki93",[320,321,41,227,322,34],"41227542",9,"ZitchDog",[324,321,34,227,11,43],"41227584",[326,321,47,212,126,34],"41227937",[328,321,41,227,322,34],"41230828",[330,321,47,212,331,34],"41232373","netghost",[333,334,41,230,335,34],"41227079",10,"herpdyderp",[337,334,34,230,11,43],"41227138",[339,334,47,340,335,34],"41227219","project\u002Fpositive\u002Fdocs",[342,343,41,270,344,34],"41225423",11,"metadat",[346,343,41,227,278,34],"41226009",[348,349,47,212,350,34],"41225963",12,"cpursley",[352,353,47,212,294,34],"41226052",13,[355,356,43,236,278,34],"41225702",14,[358,356,34,242,359,34],"41225813","kylemathews",[361,356,34,242,278,34],"41226117",[363,195,47,212,364,34],"41226445","NetOpWibby",[125,366,41,227,126,34],16,[368,366,41,230,331,34],"41232355",[370,371,47,372,373,34],"41225416",17,"project\u002Fpositive\u002Fnone","drzaiusx11",[375,376,41,217,377,34],"41225935",18,"srameshc",[379,376,34,214,11,43],"41226016",[381,376,41,227,382,34],"41233686","aitchnyu",[384,376,41,214,377,34],"41235064",[386,387,34,388,389,34],"41229108",19,"other\u002Fneutral\u002Fnone","ChrisArchitect",[172,39,41,391,173,34],"project\u002Fneutral\u002Fprivacy",[393,39,34,391,11,43],"41226820",[395,194,47,212,243,34],"41227029",[397,398,41,227,399,34],"41237314",22,"wejick",[401,402,47,372,403,34],"41225340",23,"batmansmk",[405,402,41,217,406,34],"41225356","dboreham",[408,402,47,233,82,34],"41225386",[410,402,34,230,11,43],"41226243",[88,412,47,212,89,34],24,[414,412,41,217,415,34],"41226425","samstave",[417,412,34,214,11,43],"41226448",[419,412,47,212,415,34],"41226547",[421,412,34,217,11,43],"41226782",[423,412,47,372,89,34],"41227023",[425,412,34,426,126,34],"41227965","other\u002Fneutral\u002Fpricing",[428,412,34,388,429,34],"41228296","postalrat",[99,431,47,212,100,34],25,[433,431,34,217,11,43],"41226268",[435,431,41,217,100,34],"41243796",[437,438,41,230,284,34],"41226276",26,[440,438,34,230,11,43],"41226312",[442,208,41,217,443,34],"41235823","vivzkestrel",[445,208,41,214,446,34],"41235848","uzyn",[161,32,41,217,162,34],[149,449,41,217,150,34],29,[451,449,34,388,89,34],"41226159",[453,449,34,388,278,34],"41226858",[455,449,34,217,11,43],"41226940",[457,449,41,217,89,34],"41227059",[459,449,41,217,278,34],"41339907",[461,462,41,217,463,34],"41228094",30,"sabr",[465,466,43,467,468,34],"41226124",31,"project\u002Fcritical\u002Fdocs","revskill",[118,470,41,270,119,34],32,[472,470,34,270,11,43],"41226152",[474,470,41,270,475,34],"41229412","jfeiwell",[477,470,34,270,11,43],"41229646",[479,480,43,467,481,34],"41225671",33,"teaearlgraycold",[483,480,34,230,11,43],"41226272",[165,485,47,486,166,34],34,"project\u002Fpositive\u002Fperformance",[488,485,34,270,11,43],"41226652",[490,491,47,212,492,34],"41242370",35,"AIDataWhiz",[],[495,500,505,510,515,520],{"id":496,"name":497,"points":498,"category":499},"41247023","ytch",2741,"consumer_social",{"id":501,"name":502,"points":503,"category":504},"41203306","LLM-aided OCR",479,"productivity",{"id":506,"name":507,"points":508,"category":509},"41217109","Grandma's Word",454,"games",{"id":511,"name":512,"points":513,"category":514},"41203475","Thunder Compute",344,"infrastructure",{"id":516,"name":517,"points":518,"category":519},"41213711","flutter_rust_bridge",301,"languages",{"id":521,"name":522,"points":523,"category":504},"41227350","bookshelf",263,false,"v2",{"id":527,"name":5,"line":6,"ai":524,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":528,"top":18,"kw":529,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":530,"url":9,"mix":531,"praise":77,"objection":111,"sub":21},41224689,0.3,[24,25,26,27,28],"5533505353355513355435433555550533331315",[32,33,34,35],1794036659201]