Conversation
Refactor destination-postgres to support both pg.Pool and PGlite as
backends. PGlite enables in-process WASM Postgres for testing without
Docker and lightweight embedded deployments.
- Add QueryClient/ManagedClient abstractions (src/client.ts)
- Add `pglite` config option (true for in-memory, {data_dir} for persistent)
- Refactor writeMany/upsertMany/deleteMany to accept QueryClient interface
- Add @electric-sql/pglite as optional peer dependency
- Add PGlite-specific test suite (no Docker required)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
…rt, upgrade to pglite 0.4.5 - Add `allow_experimental_pglite` boolean config gate - Detect file:// and memory:// URL schemes and route to PGlite - Upgrade @electric-sql/pglite from 0.2.17 to 0.4.5 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
PGlite's query() rejects multiple SQL statements in a single call. Fall back to exec() when the "multiple commands" error is detected. This fixes destination setup which uses buildCreateTableDDL (returns a DO block + standalone DO blocks). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Committed-By-Agent: claude
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.
Summary
destination-postgresto support bothpg.Pooland PGlite as backendsQueryClient/ManagedClientabstractions (src/client.ts) sowriteMany/upsertMany/deleteManyaccept either backendpgliteconfig option:truefor in-memory,{ data_dir: "..." }for persistent storage@electric-sql/pgliteas optional peer dependency (same pattern as AWS SDK)Test plan
🤖 Generated with Claude Code