laquereric opened a new pull request, #2602:
URL: https://github.com/apache/age/pull/2602

   Fixes #2601.
   
   `path_entry`'s `id`, `start_id` and `end_id` hold graphid values; 
`merge_vertex` and `merge_edge` stored Datums in them and read them back as 
Datums, while `prebuild_path` stores real graphids for vertices bound by an 
earlier clause. With SIZEOF_DATUM = 4 (#2286) a graphid Datum is a pointer, so 
MERGE of an edge onto bound vertices wrote start_id = end_id = 0 (the edge is 
stored but never matched, and a second MERGE duplicates it).
   
   This converts with `GRAPHID_GET_DATUM` / `DATUM_GET_GRAPHID` wherever 
`path_entry` meets a Datum, guarding a NULL id, and documents the invariant on 
the struct. On 64-bit builds these are identity casts, so behaviour there is 
unchanged.
   
   Tested:
   - wasm32 (PGlite 0.4.6, PostgreSQL 17.5): a 617-statement Cypher workload 
agrees with 64-bit PostgreSQL 17 on every statement (606 before).
   - 64-bit PostgreSQL 17.9, the PG17 branch with this commit: `make 
installcheck` 30 of 31; the one failure, `age_load`, is the environment (files 
outside `/tmp/age/`) and fails the same way without the change.
   - master: applies cleanly (one file); not built here against PG18, so CI is 
the check there.
   
   A regression test cannot show the bug on the 64-bit CI; happy to add one for 
the 32-bit path if there is a way to run it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to