feature: wasm builds for use in pglite
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
### What problem does the new feature solve?
[pglite](https://pglite.dev) is a (relatively) new tool that allows running postgres in WASM (which allows it to run in-memory, or in the browser)
pglite supports [some extensions](https://pglite.dev/extensions/) built-in, but to add other extensions you need to compile them to WASM and register them with pglite yourself
### What does the feature do?
This will allow using citus extensions in WASM postgres instances, be it in-memory postgres running in a user process, or inside other environments that can run WASM such as the browser
Specifically for me, columnar support in this situation would be great
### Implementation challenges
- Need to ensure the columnar codebase (or any other plugin you choose to add as well) is buildable with emscripten
- Need to distribute this build somehow. Current builds are uploaded as a `.deb` to `install.citusdata.com`, but for pglite it instead expects a `.tar.gz` packed in a specific way. You can convert a `.deb` to the right format for pglite with the following:
```bash
dpkg -x columnar.deb ./tmp
tar -czf columnar.tar.gz -C tmp $(find tmp -type f | sed 's|^tmp/||')
```
- pglite doesn't support postgres 17 yet, but this is coming soon in the next version
Contributor guide
Assessment
This issue has not been assessed yet.