Re:Show HN: PGlite – in-browser WASM Postgres with pgvector ...
by samwillis on Monday August 12, 2024 @12:12PM
(#41226107)
I see unit and integration testing as a massive opportunity for PGlite. I know of projects (such as Drizzle ORM) that are already make good use of it.
The team at Supabase have built pg-gateway (https://github.com/supabase-community/pg-gateway) that let you connect to PGlite from any Postgres client. That's absolutely a way you could use it for CI.
One thing I would love to explore (or maybe commenting it here will inspire someone else) is a copy on write page level VFS for PGLite. I could imagine starting and loading a PGlite with a dataset and then instantly forking a database for each test. Not complexities with devcontainers or using Postgres template databases. Sub ms forks of a database for each test.
The team at Supabase have built pg-gateway (https://github.com/supabase-community/pg-gateway) that let you connect to PGlite from any Postgres client. That's absolutely a way you could use it for CI.
One thing I would love to explore (or maybe commenting it here will inspire someone else) is a copy on write page level VFS for PGLite. I could imagine starting and loading a PGlite with a dataset and then instantly forking a database for each test. Not complexities with devcontainers or using Postgres template databases. Sub ms forks of a database for each test.