Skip to content

Conversation

@naisila
Copy link
Member

@naisila naisila commented Jan 2, 2026

Relevant PG18 commit:
postgres/postgres@9324c8c58

This commit adds PG_MODULE_MAGIC_EXT info for citus and citus_columnar.

Tested this by the new PG18 pg_get_loaded_modules() function.

Fixes #8417

Note: this should be taken care of every time we release a new version and bump the citus version.

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.78%. Comparing base (8c7a1b9) to head (3bf426e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8438      +/-   ##
==========================================
- Coverage   88.79%   88.78%   -0.01%     
==========================================
  Files         287      287              
  Lines       63237    63240       +3     
  Branches     7927     7928       +1     
==========================================
- Hits        56152    56150       -2     
- Misses       4753     4758       +5     
  Partials     2332     2332              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@naisila naisila changed the title Add module name & version of Citus by PG18 PG_MODULE_MAGIC_EXT macro Add PG_MODULE_MAGIC_EXT new PG18 macro for Citus and citus columnar Jan 2, 2026
@naisila naisila changed the title Add PG_MODULE_MAGIC_EXT new PG18 macro for Citus and citus columnar Add PG_MODULE_MAGIC_EXT macro for Citus and citus columnar Jan 2, 2026
@naisila naisila requested review from colm-mchugh and m3hm3t January 2, 2026 13:37
@naisila naisila force-pushed the naisila/pg18_pg_module_magic_ext branch 2 times, most recently from 0ccc18b to 24e6076 Compare January 3, 2026 10:33

/* marks shared object as one loadable by the postgres version compiled against */
#if PG_VERSION_NUM >= PG_VERSION_18
PG_MODULE_MAGIC_EXT(.name = "citus", .version = "14.0devel");
Copy link
Contributor

Choose a reason for hiding this comment

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

Presumably the .version value needs to be updated with each new citus release (?)

Copy link
Member Author

Choose a reason for hiding this comment

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

Could also use CITUS_VERSION_STR to avoid the hassle, let me take a second look at that

Copy link
Member Author

Choose a reason for hiding this comment

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

CITUS_VERSION_STR doesn't look that good, so better to update this everytime we bump the citus version

Relevant PG18 commit:
postgres/postgres@9324c8c58

Add the same for citus_columnar as well.
Test this by the new PG18 pg_get_loaded_modules() function.
@naisila naisila force-pushed the naisila/pg18_pg_module_magic_ext branch from 24e6076 to 3bf426e Compare January 6, 2026 16:55
@naisila naisila merged commit 87cd100 into main Jan 6, 2026
153 checks passed
@naisila naisila deleted the naisila/pg18_pg_module_magic_ext branch January 6, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add macro PG_MODULE_MAGIC_EXT to allow extensions to report their name and version

4 participants