"Compiling Postgres to WASM with PGlite" with Sam Willis


Details
Join us virtually on Tuesday, July 8th for "Compiling Postgres to WASM with PGlite" with Sam Willis.
This talk introduces our investigations into creating a lightweight WASM build of Postgres. It covers our objectives for the project and how we approached the work. It talks through some of the challenges we faced, lessons we've learned and opportunities we see for future optimisations and potential upstreaming. Our aim was to create a lightweight, pure WASM build of Postgres, with persistence in both the browser and server-side JavaScript environments (Node, Bun and Deno). We were able to create a <3MB build with support for reactivity, sync and dynamic extension loading. The work is open source and documented at https://pglite.dev The talk walks through our approach to building PGlite, including modifying single user mode to support the wire protocol, unwinding the main event loop and enabling features like pg_notify, RLS and event triggers. It goes into some depth on the key challenges of persistence and extension loading. Including building support for popular extensions like pgvector and PostGIS. We talk about next steps for the work and opportunities like storage abstraction and modularisation, that could help optimise this type of lightweight, embeddable build in future.
Schedule:
12:00 PM Announcements, speaker introduction, presentation, Q&A.
1:15 PM Closing announcements, wrap up.
1:30 PM Event ends.
The link and detailed joining instructions, including the dial-in numbers for phone access, will be sent by email the day prior to the event, and posted on Meetup for those who have RSVPed "Yes".
General information about using GoToMeeting for this event can be found at:


"Compiling Postgres to WASM with PGlite" with Sam Willis