[PG17] Backport: Add 32-bit platform support#2321
Closed
jpabbuehl wants to merge 1 commit intoapache:PG17from
Closed
[PG17] Backport: Add 32-bit platform support#2321jpabbuehl wants to merge 1 commit intoapache:PG17from
jpabbuehl wants to merge 1 commit intoapache:PG17from
Conversation
* feat: Add 32-bit platform support for graphid type This enables AGE to work on 32-bit platforms including WebAssembly (WASM). Problem: - graphid is int64 (8 bytes) with PASSEDBYVALUE - On 32-bit systems, Datum is only 4 bytes - PostgreSQL rejects pass-by-value types larger than Datum Solution: - Makefile-only change (no C code modifications) - When SIZEOF_DATUM=4 is passed to make, strip PASSEDBYVALUE from the generated SQL - If not specified, normal 64-bit behavior is preserved (PASSEDBYVALUE kept) This change is backward compatible: - 64-bit systems continue using pass-by-value - 32-bit systems now work with pass-by-reference Motivation: PGlite (PostgreSQL compiled to WebAssembly) uses 32-bit pointers and requires this patch to run AGE. Tested on: - 64-bit Linux (regression tests pass) - 32-bit WebAssembly via PGlite (all operations work) Co-authored-by: abbuehlj <jean-paul.abbuehl@roche.com>
Contributor
Author
|
@jrgemignani pglite is still on PG 17.5 and no date yet for PG 18 support. Any chance to backport? |
6 tasks
Contributor
|
@jpabbuehl Thank you for the backport, but I am going to have to close this. I will be merging all of the masters PRs (including yours) up to 1.7.0 into PG17 get it ready for the next release. Probably in a few days. edit: I will also be doing this for PG16 -> PG14 |
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.
Backport of #2286 from master/PG18 to PG17.
Enables AGE to work on 32-bit platforms including WebAssembly (WASM).
Use case: PGlite (PostgreSQL compiled to WebAssembly) uses PG17.5 and requires this patch.
Change: Makefile-only — when
SIZEOF_DATUM=4is passed, stripsPASSEDBYVALUEfrom the graphid type.Already merged to master (#2286) and PG18 (#2311).