age icon indicating copy to clipboard operation
age copied to clipboard

Fixes #2164: Adds support for PostgreSQL 18

Open sanchayanghosh opened this issue 9 months ago • 4 comments

Fixes #2164

  1. In PostgreSQL 18, TupleDescAttr is now used to access ScanTuple->tts_tupleDescriptor->attrs since attrs is now replaced by compact_attrs to save on memory in PostgreSQL 18. In PostgreSQL 16, 17 and 18 we have a function TupleDescAttr which allows to acess pg_attrs
  2. In PostgreSQL palloc0fast is now merged into palloc0.
  3. Few funcitons now reuiqre executor/executor.h and are no longer present in the other includes.

sanchayanghosh avatar Apr 20 '25 19:04 sanchayanghosh

  • [x] Added sql tests for path deletion operations, ensuring persistence in temporary memory.

  • [x] Added a delete test to ensure that proper error message is shown.

  • [x] Investigated and found that SET commands are already tested for vertices and edges inside paths.

sanchayanghosh avatar Apr 27 '25 21:04 sanchayanghosh

@jrgemignani @MuhammadTahaNaveed

I didn't get the option to request reviewers. I would greatly appreciate if you could review my code? Always happy to incorporate any improvements.

Thanks!

sanchayanghosh avatar May 01 '25 07:05 sanchayanghosh

@sanchayanghosh Sorry for the delay. This would need to be added to a branch specifically for PG18 support.

jrgemignani avatar Jun 10 '25 15:06 jrgemignani

@sanchayanghosh I have created PG18_prepare for such work. It will need to be adjusted a bit before it actually is ready, but it would be where you would apply this PR.

jrgemignani avatar Jun 10 '25 15:06 jrgemignani

@sanchayanghosh I have created PG18_prepare for such work. It will need to be adjusted a bit before it actually is ready, but it would be where you would apply this PR.

@sanchayanghosh could you apply this against PG18_prepare ?

jrgemignani avatar Jul 09 '25 14:07 jrgemignani

@sanchayanghosh ty for the pr and sorry for the delay. I have changed the base branch to PG18_prepare. Since we maintain a separate branch for every PostgreSQL version, if you can remove the version guard macros and just keep the changes required for PG18 compatibility?

MuhammadTahaNaveed avatar Oct 02 '25 19:10 MuhammadTahaNaveed

I removed the macro checks. Thanks to you both for reviews. I am sorry I was in middle of some other projects I couldn't check last month and got free this week onwards.

sanchayanghosh avatar Oct 09 '25 09:10 sanchayanghosh

I removed the macro checks. Thanks to you both for reviews. I am sorry I was in middle of some other projects I couldn't check last month and got free this week onwards.

No worries. This is a volunteer project and we all have other things to do.

jrgemignani avatar Oct 10 '25 16:10 jrgemignani

@jrgemignani @MuhammadTahaNaveed

I didn't get the option to request reviewers. I would greatly appreciate if you could review my code? Always happy to incorporate any improvements.

Thanks!

I added Taha and myself as reviewers.

jrgemignani avatar Oct 10 '25 16:10 jrgemignani

@sanchayanghosh Regression tests fail and there's a crash in cypher_match regression test. Maybe its due to reason mentioned by @harudini here https://github.com/apache/age/issues/2164#issuecomment-3359108811.

ok 1         - scan                                      166 ms
ok 2         - graphid                                     9 ms
ok 3         - agtype                                     93 ms
ok 4         - agtype_hash_cmp                             7 ms
ok 5         - catalog                                    73 ms
ok 6         - cypher                                     37 ms
not ok 7     - expr                                      668 ms
ok 8         - cypher_create                             105 ms
not ok 9     - cypher_match                              852 ms
# (test process exited with exit code 2)
not ok 10    - cypher_unwind                              21 ms
# (test process exited with exit code 2)
not ok 11    - cypher_set                                  2 ms
# (test process exited with exit code 2)
not ok 12    - cypher_remove                               2 ms
# (test process exited with exit code 2)
not ok 13    - cypher_delete                               3 ms
# (test process exited with exit code 2)
not ok 14    - cypher_with                                 2 ms
# (test process exited with exit code 2)
not ok 15    - cypher_vle                                  3 ms
# (test process exited with exit code 2)
not ok 16    - cypher_union                                2 ms
# (test process exited with exit code 2)
not ok 17    - cypher_call                                 2 ms
# (test process exited with exit code 2)
not ok 18    - cypher_merge                                3 ms
# (test process exited with exit code 2)
not ok 19    - cypher_subquery                             2 ms
# (test process exited with exit code 2)
not ok 20    - age_global_graph                            2 ms
# (test process exited with exit code 2)
not ok 21    - age_load                                    2 ms
# (test process exited with exit code 2)
not ok 22    - index                                       2 ms
# (test process exited with exit code 2)
not ok 23    - analyze                                     2 ms
# (test process exited with exit code 2)
not ok 24    - graph_generation                            2 ms
# (test process exited with exit code 2)
not ok 25    - name_validation                             2 ms
# (test process exited with exit code 2)
not ok 26    - jsonb_operators                             3 ms
# (test process exited with exit code 2)
not ok 27    - list_comprehension                          2 ms
# (test process exited with exit code 2)
ok 28        - map_projection                             37 ms
ok 29        - cypher_path_delete                         43 ms
not ok 30    - drop                                       57 ms
# (test process exited with exit code 2)
1..30
# 21 of 30 tests failed.

MuhammadTahaNaveed avatar Oct 10 '25 17:10 MuhammadTahaNaveed

@sanchayanghosh Regression tests fail and there's a crash in cypher_match regression test.

Same for me. How did you build this prior to submitting it? Did it work for you?

jrgemignani avatar Oct 15 '25 17:10 jrgemignani

@sanchayanghosh @MuhammadTahaNaveed Is this necessary to add to this PR? Could, should, it be its own PR?

Added a delete test to ensure that proper error message is shown.

jrgemignani avatar Oct 15 '25 18:10 jrgemignani

@sanchayanghosh Any updates?

jrgemignani avatar Nov 03 '25 20:11 jrgemignani

Sorry for delay. Had a big project that took my time

I will split the tests into its own PR and illoom into the crash once more

sanchayanghosh avatar Nov 12 '25 08:11 sanchayanghosh