Skip to content

[Keep as draft] Changes for PGlite#65

Draft
tdrz wants to merge 34 commits intoREL_17_5from
tdrz/newPGlite
Draft

[Keep as draft] Changes for PGlite#65
tdrz wants to merge 34 commits intoREL_17_5from
tdrz/newPGlite

Conversation

@tdrz
Copy link
Collaborator

@tdrz tdrz commented Mar 3, 2026

PR for inspecting changes introduced for PGlite.

Copy link
Collaborator

@samwillis samwillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very good. So clean compared to what we had before.

Mostly what I would like to see is some comments and docs emailing whats happening. May be a README-PGLITE-DEV.md in the root with an overview of what we have changed and why, with links to relevant place.

👏

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git is doing a bad job of showing the diff. I think this is mostly the unrolled main loop. Ensure there is a comment explaining what we have done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the recommended README-PGLITE-DEV.md, let me know if you'd like some more comments here.

tdrz and others added 4 commits March 10, 2026 09:45
* cleanup

* initial pg_uuidv7 commit

* backend pg_uuidv7 implemented

* feat: Add Apache AGE graph database extension

Add support for Apache AGE (A Graph Extension) which brings graph
database capabilities and Cypher query language to PostgreSQL.

Changes:
- Add AGE as submodule from jpabbuehl/age (32-bit WASM compatible fork)
- Add AGE to SUBDIRS in pglite/Makefile
- Export required hook symbols in included.pglite.imports:
  - post_parse_analyze_hook (Cypher parsing)
  - set_rel_pathlist_hook (query planning)
  - ProcessUtility_hook (DDL handling)
  - RegisterExtensibleNodeMethods (custom nodes)
  - object_access_hook (access control)
- Add invoke_jii to excluded.pglite.imports (function pointer pattern)

The AGE submodule points to a fork with 32-bit WASM compatibility:
- graphid type uses pass-by-reference on 32-bit systems
- Upstream PR pending at apache/age

Related: electric-sql/pglite PR for TypeScript wrapper

* feat(age): Add 32-bit WASM support via SIZEOF_DATUM=4 build flag

- Update pglite/Makefile with age-specific build rule that passes SIZEOF_DATUM=4
- Forces SQL regeneration to apply PASSEDBYVALUE stripping for graphid type
- Update AGE submodule to 0a4f4b3 (Makefile-only 32-bit support approach)

The AGE fork now uses a Makefile-only approach:
- No changes to graphid.h or age_main.sql source files
- Makefile conditionally strips PASSEDBYVALUE when SIZEOF_DATUM=4 is passed
- PostgreSQL's Int64GetDatum/DatumGetInt64 macros handle the rest

* chore: point age submodule to upstream apache/age

* Add missing backslash

* chore: point age submodule to official PG17/v1.7.0-rc0 release

- Switch from custom backport/32bit-pg17 branch to upstream PG17/v1.7.0-rc0 tag
- 32-bit support (PR #2286) is now included in official release
- Update .gitmodules branch from master to PG17
- AGE version bumps from 1.6.0 to 1.7.0

* fix(pglite): export missing _invoke_ functions for AGE extension

---------

Co-authored-by: tudor <tudor.zaharia@gmail.com>
Co-authored-by: tudor <tudor@swisstch.com>
Co-authored-by: abbuehlj <jean-paul.abbuehl@roche.com>
Co-authored-by: Jean-Paul Abbuehl <jp.abbuehl@gmail.com>
@tdrz tdrz requested a review from samwillis March 10, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants