Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/backend/columnar/mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
#include "columnar/columnar_tableam.h"


#if PG_VERSION_NUM >= PG_VERSION_18
PG_MODULE_MAGIC_EXT(.name = "citus_columnar", .version = "14.0devel");
#else
PG_MODULE_MAGIC;
#endif

void _PG_init(void);

Expand Down
4 changes: 4 additions & 0 deletions src/backend/distributed/shared_library_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@
#include "distributed/worker_shard_visibility.h"

/* 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");
#else
PG_MODULE_MAGIC;
#endif

ColumnarSupportsIndexAM_type extern_ColumnarSupportsIndexAM = NULL;
CompressionTypeStr_type extern_CompressionTypeStr = NULL;
Expand Down
10 changes: 10 additions & 0 deletions src/test/regress/expected/pg18.out
Original file line number Diff line number Diff line change
Expand Up @@ -3010,6 +3010,16 @@ FROM wal_explain_plan;

DROP TABLE wal_explain_plan;
SET citus.explain_all_tasks TO default;
-- PG18 PG_MODULE_MAGIC_EXT MACRO
-- and new function pg_get_loaded_modules
-- Relevant PG18 commit: https://github.com/postgres/postgres/commit/9324c8c58
SELECT * FROM pg_get_loaded_modules() WHERE file_name LIKE 'citus%' ORDER BY module_name;
module_name | version | file_name
---------------------------------------------------------------------
citus | 14.0devel | citus.so
citus_columnar | 14.0devel | citus_columnar.so
(2 rows)

-- cleanup with minimum verbosity
SET client_min_messages TO ERROR;
RESET search_path;
Expand Down
5 changes: 5 additions & 0 deletions src/test/regress/sql/pg18.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,11 @@ FROM wal_explain_plan;
DROP TABLE wal_explain_plan;
SET citus.explain_all_tasks TO default;

-- PG18 PG_MODULE_MAGIC_EXT MACRO
-- and new function pg_get_loaded_modules
-- Relevant PG18 commit: https://github.com/postgres/postgres/commit/9324c8c58
SELECT * FROM pg_get_loaded_modules() WHERE file_name LIKE 'citus%' ORDER BY module_name;

-- cleanup with minimum verbosity
SET client_min_messages TO ERROR;
RESET search_path;
Expand Down