feat: add PGlite as a client-side database implementation#541
Draft
feat: add PGlite as a client-side database implementation#541
Conversation
Agent-Logs-Url: https://github.com/pubkey/client-side-databases/sessions/24850991-bc6e-43e9-8de2-c1b851331a1d Co-authored-by: pubkey <8926560+pubkey@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add pglite support to the project
feat: add PGlite as a client-side database implementation
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds PGlite — a WASM-compiled PostgreSQL running entirely in the browser with IndexedDB persistence — as a new benchmark implementation alongside the existing pouchdb, rxdb, watermelondb, etc.
New project:
projects/pglitedatabase.service.ts— bootstrapsPGlite('idb://chat-db'), createsusers/messagestables with indexes, and wires up PostgreSQLNOTIFY/LISTENtriggers for reactive change propagationapp.logic.ts— implementsLogicInterfacevia parameterized SQL queries; usesILIKEfor search,ON CONFLICT DO NOTHINGfor idempotent inserts, trigger-drivenSubject<void>observables to re-run queries on data changesConfig / tooling
@electric-sql/pglite@0.4.3dependencypgliteproject inangular.json(mirrors pouchdb config)build:pglite,dev:pglite,start:pglite,client:pglite,test:pglite,analyze:pglitescripts topackage.jsonWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
mapbox-node-binary.s3.amazonaws.com/home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/client-side-databases/client-side-databases/node_modules/.bin/node-pre-gyp install --fallback-to-build down/node_modules/.bin/node-gyp-build-test(dns block)package.cli.amplify.aws/home/REDACTED/work/_temp/ghcca-node/node/bin/node node ./lib/install.js -o Release/obj.target/sqlite3/gen/sqlite-autoconf-3310100/sqlite3.o(dns block)If you need me to access, download, or install something from one of these locations, you can either: