Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
811205d
initial commit
tdrz Jun 18, 2025
3385c69
bug fixes; cleanup; most pglite tests pass
tdrz Jun 18, 2025
8718b1f
Merge branch 'main' into tdrz/cbDataTransport
tdrz Jun 18, 2025
d2f112c
update submodule
tdrz Jun 18, 2025
6c8775c
Merge branch 'main' into tdrz/cbDataTransport
tdrz Jun 18, 2025
8db8172
Merge branch 'main' into tdrz/cbDataTransport
tdrz Jul 7, 2025
c6c0bb5
Merge branch 'main' into tdrz/cbDataTransport
tdrz Jul 7, 2025
5c41321
cleanup
tdrz Jul 8, 2025
f6c512c
style
tdrz Jul 8, 2025
34eff39
change buffer size expansion strategy
tdrz Jul 15, 2025
da19cf0
fixes #657
tdrz Sep 23, 2025
30a1397
changeset
tdrz Sep 23, 2025
b607f50
update submodule
tdrz Sep 24, 2025
dfb571b
Merge branch 'main' into tdrz/pglite-ccoderefactoring
tdrz Sep 24, 2025
e258375
update submodule
tdrz Sep 24, 2025
61af32a
update submodule
tdrz Sep 24, 2025
b8dba43
remove get_buffer_size and get_buffer_addr"
tdrz Sep 24, 2025
e9047f2
update submodule
tdrz Sep 24, 2025
4598daa
update submodule
tdrz Sep 24, 2025
5494735
update submodule
tdrz Sep 24, 2025
ef11f15
update submodule
tdrz Sep 24, 2025
1c917ad
update submodule
tdrz Sep 24, 2025
6d9a963
update submodule
tdrz Sep 24, 2025
c52ae19
update submodule
tdrz Sep 24, 2025
cd69a27
improvements
tdrz Oct 1, 2025
6753533
submodule
tdrz Oct 1, 2025
d4f4cbb
add final result messages
tdrz Oct 2, 2025
5563e0e
update submodule
tdrz Oct 2, 2025
7b07596
renaming; prettify
tdrz Oct 2, 2025
28817bc
test update
tdrz Oct 2, 2025
365b236
run sync after getting types from db
tdrz Oct 2, 2025
261c3f8
add results returned by sync
Oct 3, 2025
2c57d38
style
Oct 3, 2025
9bb972b
cleanup; update submodule
tdrz Oct 6, 2025
bda4b68
cleanupof additional syncs; update submodule
tdrz Oct 6, 2025
43ea96c
update submodule
tdrz Oct 6, 2025
f95eb51
Revert "update submodule"
tdrz Oct 6, 2025
6bb2061
revert submodule update
tdrz Oct 6, 2025
dba962b
update submodule
tdrz Oct 6, 2025
c5af87d
stylecheck
tdrz Oct 6, 2025
1b953e4
undo
tdrz Oct 6, 2025
2a463b8
add more PGlite videos to pglite.dev website
tdrz Oct 6, 2025
ba68e09
style
tdrz Oct 6, 2025
78214d1
link to bolt.new
tdrz Oct 6, 2025
00cdf84
added intarray contrib extension
tdrz Oct 6, 2025
40aa49d
intarray contrib extension description
tdrz Oct 6, 2025
0d8c255
style
tdrz Oct 6, 2025
210c9cd
query fix in intarray test
tdrz Oct 6, 2025
9b7b9fb
stop if build-with-docker.sh fails
tdrz Oct 6, 2025
d2f0e15
update submodule
tdrz Oct 6, 2025
dfb5b6a
cleanup; update submodule
tdrz Oct 6, 2025
330ac5d
cleanup
tdrz Oct 7, 2025
c7d654b
update submodule
tdrz Oct 7, 2025
25b9bdb
added file_fdw extension with test
tdrz Oct 7, 2025
57fcc34
added dict_xsyn contrib extension
tdrz Oct 7, 2025
93f1529
added dict_int contrib extension
tdrz Oct 7, 2025
bf0ee75
added pageinspect contrib extension
tdrz Oct 7, 2025
fa1bd50
added pg_buffercache contrib extension
tdrz Oct 7, 2025
aaa8173
added pg_freespacemap contrib extension
tdrz Oct 7, 2025
14fb47f
bug fix
tdrz Oct 7, 2025
4bc107c
fix
tdrz Oct 7, 2025
76eae10
added pg_surgery contrib extension
tdrz Oct 7, 2025
3365996
added pg_visibility contrib extension
tdrz Oct 7, 2025
641a165
added pg_walinspect contrib extension
tdrz Oct 7, 2025
3e15b84
added unaccent contrib extension
tdrz Oct 7, 2025
30b4df0
added xml2 contrib extension
tdrz Oct 7, 2025
1631778
Revert "added xml2 contrib extension"
tdrz Oct 7, 2025
06d3a1b
changeset
tdrz Oct 7, 2025
d647d8e
style and bug fix
tdrz Oct 7, 2025
0e83b9d
use the pglite_write callback to parse results as they arrive
tdrz Oct 8, 2025
5dead51
changed parsing logic to account for the fact that it is actually run…
tdrz Oct 9, 2025
db85580
stylecheck
tdrz Oct 9, 2025
ca2f949
readd non-parsing version of frontend receiving of messaes because it…
tdrz Oct 13, 2025
df743fe
stream parsing should be reset when pg_dump finishes
tdrz Oct 13, 2025
d72896a
bug fix
tdrz Oct 13, 2025
39009b0
pglite-socket server also expects raw protocol messages, so disable s…
tdrz Oct 13, 2025
be8e5ee
style
tdrz Oct 13, 2025
dce540d
merge main. first impl
Oct 15, 2025
647b908
read write callbacks are working
Oct 20, 2025
67a8b98
load .data file; bug fix when writing data to socket; change .pgpass …
Oct 21, 2025
e9e577e
add pg_dump.data to testing setup
Oct 21, 2025
903a254
package pg_dump.data
Oct 21, 2025
f7fd34a
update submodule
Oct 21, 2025
d89ac1d
submodule
Oct 21, 2025
7a64ee9
stylecheck
Oct 21, 2025
7c24bef
embedd .pgpass file to avoid having a separate .data file
Oct 22, 2025
c4a1444
.pgpass is embedded now, no need for a separate .data file
Oct 22, 2025
27caef9
update submodule
Oct 22, 2025
8b29d75
pg_dump artifacts
Oct 22, 2025
a8093db
new emscripten built pg_dump for CI
Oct 24, 2025
ed881e4
added pg_dump exit value and stderr
Oct 29, 2025
f6dc742
cleanup
Oct 29, 2025
b6d38a4
update submodule
tdrz Nov 3, 2025
0701b5f
merge main
tdrz Nov 3, 2025
2b6083f
style
tdrz Nov 3, 2025
6263f57
GH CI fix
tdrz Nov 3, 2025
c5b503a
add pg_dump test with PGlite dataDir
tdrz Nov 3, 2025
13ebc1c
style
tdrz Nov 3, 2025
c681923
gh action comment update fix; bundle pg_dump
tdrz Nov 3, 2025
fdc42ef
gh ci fix
tdrz Nov 3, 2025
fd11aa6
remove verbose in pg_dump tests
tdrz Nov 4, 2025
d1b4d5b
bundling pg_dump needs to be done properly
tdrz Nov 4, 2025
11824c9
update submodule
tdrz Nov 4, 2025
9f41b2a
trying to fix CI again
tdrz Nov 4, 2025
b0b8a77
still trying to fix CI
tdrz Nov 4, 2025
8cbc404
update submodule
tdrz Nov 4, 2025
15d1f1e
still trying to fix CI - again
tdrz Nov 4, 2025
d9c88cf
gh ci
tdrz Nov 4, 2025
e62a2dd
submodule
tdrz Nov 4, 2025
074f756
test for quote-all-identifiers in pg_dump
tdrz Nov 4, 2025
da39ade
style
tdrz Nov 4, 2025
0bfa353
pg_dump bufferring of messages if needed
tdrz Nov 4, 2025
68e0f8c
dist package for pg_dump
tdrz Nov 4, 2025
8025ee6
update submodule
tdrz Nov 4, 2025
bb9b849
changeset
tdrz Nov 4, 2025
a7e3dbe
cleanup
tdrz Nov 4, 2025
f12f431
cleanup wasi
tdrz Nov 5, 2025
5ed1337
update submodule after submodule PR merge
tdrz Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/old-tables-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@electric-sql/pglite-tools': patch
'@electric-sql/pglite': patch
---

Updated pg_dump to use callback data exchange; built pg_dump with emscripten
47 changes: 40 additions & 7 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,13 @@ jobs:
name: pglite-interim-build-files-node-v20.x
path: ./packages/pglite/release/**
retention-days: 60
- name: Upload PGlite tools to Gihub artifacts
id: upload-pglite-tools-dist-files

- name: Upload pglite-tools build artifacts to Github artifacts
id: upload-pglite-tools-release-files
uses: actions/upload-artifact@v4
with:
name: pglite-tools-dist-files-node-v20.x
path: ./packages/pglite-tools/dist/**
name: pglite-tools-release-files-node-v20.x
path: ./packages/pglite-tools/release/**
retention-days: 60

build-and-test-pglite:
Expand Down Expand Up @@ -111,6 +112,12 @@ jobs:
name: pglite-interim-build-files-node-v20.x
path: ./packages/pglite/release

- name: Download pglite-tools WASM build artifacts
uses: actions/download-artifact@v4
with:
name: pglite-tools-release-files-node-v20.x
path: ./packages/pglite-tools/release

- name: Install dependencies
run: |
pnpm install --frozen-lockfile
Expand Down Expand Up @@ -157,7 +164,7 @@ jobs:
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Built bundles
body-includes: '- PGlite:'

- name: Create or update build outputs comment
uses: peter-evans/create-or-update-comment@v4
Expand Down Expand Up @@ -191,6 +198,12 @@ jobs:
name: pglite-dist-node-v${{ matrix.node }}
path: ./packages/pglite/dist/

- name: Download pglite-tools WASM build artifacts
uses: actions/download-artifact@v4
with:
name: pglite-tools-release-files-node-v20.x
path: ./packages/pglite-tools/release/

- name: Install dependencies
run: pnpm install --frozen-lockfile

Expand All @@ -206,6 +219,13 @@ jobs:
- name: Test packages
run: pnpm --filter="...^pglite" test

- name: Upload pglite-tools distribution artifact
id: upload-pglite-tools-dist
uses: actions/upload-artifact@v4
with:
name: pglite-tools-dist-node-v${{ matrix.node }}
path: ./packages/pglite-tools/dist/*

publish-website-with-demos:
name: Publish website with demos
runs-on: ubuntu-22.04
Expand All @@ -227,6 +247,12 @@ jobs:
name: pglite-interim-build-files-node-v20.x
path: ./packages/pglite/release

- name: Download pglite-tools WASM build artifacts
uses: actions/download-artifact@v4
with:
name: pglite-tools-release-files-node-v20.x
path: ./packages/pglite-tools/release

- name: Download PGlite build artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -245,10 +271,10 @@ jobs:
name: pglite-interim-build-files-node-v20.x
path: /tmp/web

- name: Download PGlite tools build artifacts
- name: Download pglite-tools dist artifacts to tmp
uses: actions/download-artifact@v4
with:
name: pglite-tools-dist-files-node-v20.x
name: pglite-tools-dist-node-v20.x
path: /tmp/pglite-tools

- name: Build demo site
Expand Down Expand Up @@ -333,6 +359,13 @@ jobs:
with:
name: pglite-interim-build-files-node-v20.x
path: ./packages/pglite/release

- name: Download pglite-tools build artifacts
uses: actions/download-artifact@v4
with:
name: pglite-tools-release-files-node-v20.x
path: ./packages/pglite-tools/release/

- run: pnpm install --frozen-lockfile
- run: pnpm --filter "./packages/**" build
- name: Create Release Pull Request or Publish
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"ci:publish": "pnpm changeset publish",
"ts:build": "pnpm -r --filter \"./packages/**\" build",
"ts:build:debug": "DEBUG=true pnpm ts:build",
"wasm:build": "cd postgres-pglite && ./build-with-docker.sh && cd .. && mkdir -p ./packages/pglite/release/ && cp ./postgres-pglite/dist/bin/pglite.* ./packages/pglite/release/ && cp ./postgres-pglite/dist/extensions/*.tar.gz ./packages/pglite/release/",
"wasm:copy-pgdump": "mkdir -p ./packages/pglite-tools/release && cp ./postgres-pglite/dist/bin/pg_dump.* ./packages/pglite-tools/release",
"wasm:copy-pglite": "mkdir -p ./packages/pglite/release/ && cp ./postgres-pglite/dist/bin/pglite.* ./packages/pglite/release/ && cp ./postgres-pglite/dist/extensions/*.tar.gz ./packages/pglite/release/",
"wasm:build": "cd postgres-pglite && ./build-with-docker.sh && cd .. && pnpm wasm:copy-pglite && pnpm wasm:copy-pgdump",
"wasm:build:debug": "DEBUG=true pnpm wasm:build",
"build:all": "pnpm wasm:build && pnpm ts:build",
"build:all:debug": "DEBUG=true pnpm build:all"
Expand Down
2 changes: 1 addition & 1 deletion packages/pglite-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
},
"scripts": {
"build": "tsup && tsx ./scripts/bundle-wasm.ts",
"build": "tsup",
"check:exports": "attw . --pack --profile node16",
"lint": "eslint ./src ./tests --report-unused-disable-directives --max-warnings 0",
"format": "prettier --write ./src ./tests",
Expand Down
44 changes: 0 additions & 44 deletions packages/pglite-tools/scripts/bundle-wasm.ts

This file was deleted.

41 changes: 41 additions & 0 deletions packages/pglite-tools/src/pgDumpModFactory.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import PgDumpModFactory from '../release/pg_dump'

type IDBFS = Emscripten.FileSystemType & {
quit: () => void
dbs: Record<string, IDBDatabase>
}

export type FS = typeof FS & {
filesystems: {
MEMFS: Emscripten.FileSystemType
NODEFS: Emscripten.FileSystemType
IDBFS: IDBFS
}
quit: () => void
}

export interface PgDumpMod
extends Omit<EmscriptenModule, 'preInit' | 'preRun' | 'postRun'> {
preInit: Array<{ (mod: PgDumpMod): void }>
preRun: Array<{ (mod: PgDumpMod): void }>
postRun: Array<{ (mod: PgDumpMod): void }>
FS: FS
WASM_PREFIX: string
INITIAL_MEMORY: number
_set_read_write_cbs: (read_cb: number, write_cb: number) => void
addFunction: (
cb: (ptr: any, length: number) => void,
signature: string,
) => number
removeFunction: (f: number) => void
_main: (args: string[]) => number
onExit: (status: number) => void
print: (test: string) => void
printErr: (text: string) => void
}

type PgDumpFactory<T extends PgDumpMod = PgDumpMod> = (
moduleOverrides?: Partial<T>,
) => Promise<T>

export default PgDumpModFactory as PgDumpFactory<PgDumpMod>
Loading