citus icon indicating copy to clipboard operation
citus copied to clipboard

PostgreSQL 15 support

Open devrimgunduz opened this issue 2 years ago • 2 comments

Hi,

Citus 10.2.5 fails to build against PostgreSQL 15 beta 1. Can you please take a look ? Thanks!

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -std=gnu99 -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -Wno-clobbered -Wno-declaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wmissing-declarations -Wmissing-prototypes -Wshadow -Werror=vla -Werror=implicit-int -Werror=implicit-function-declaration -Werror=return-type -fstack-clash-protection -I '/home/devrim/belgeler/Devrim/Projects/repo/pgrpms/rpm/redhat/main/non-common/citus/main/citus-10.2.5/src/include' -I'../../../src/include' -I. -I./ -I/usr/pgsql-15/include/server -I/usr/pgsql-15/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -I/usr/pgsql-15/include -I/home/devrim/belgeler/Devrim/Projects/repo/pgrpms/rpm/redhat/main/non-common/citus/main/citus-10.2.5/vendor/safestringlib/include -c -o commands/dependencies.o commands/dependencies.c In file included from /usr/pgsql-15/include/server/postgres.h:46, from commands/collation.c:11: commands/collation.c: In function ‘CreateCollationDDLInternal’: commands/collation.c:63:56: error: ‘FormData_pg_collation’ has no member named ‘collcollate’ 63 | const char *collcollate = NameStr(collationForm->collcollate); | ^~ /usr/pgsql-15/include/server/c.h:681:27: note: in definition of macro ‘NameStr’ 681 | #define NameStr(name) ((name).data) | ^~~~ commands/collation.c:64:54: error: ‘FormData_pg_collation’ has no member named ‘collctype’ 64 | const char *collctype = NameStr(collationForm->collctype); | ^~ /usr/pgsql-15/include/server/c.h:681:27: note: in definition of macro ‘NameStr’ 681 | #define NameStr(name) ((name).data) | ^~~~ commands/collation.c: In function ‘GenerateBackupNameForCollationCollision’: commands/collation.c:516:9: error: unknown type name ‘Value’ 516 | Value *namespace = makeString(get_namespace_name(collationForm->collnamespace)); | ^~~~~ commands/collation.c:516:28: warning: initialization of ‘int *’ from incompatible pointer type ‘String *’ [-Wincompatible-pointer-types] 516 | Value *namespace = makeString(get_namespace_name(collationForm->collnamespace)); | ^~~~~~~~~~ make[1]: *** [: commands/collation.o] Error 1 make[1]: *** Waiting for unfinished jobs.... In file included from /usr/pgsql-15/include/server/nodes/pg_list.h:40, from /usr/pgsql-15/include/server/access/tupdesc.h:19, from /usr/pgsql-15/include/server/access/htup_details.h:19, from commands/database.c:14: commands/database.c: In function ‘AlterDatabaseOwnerObjectAddress’: commands/database.c:119:52: error: ‘Value’ undeclared (first use in this function) 119 | Oid databaseOid = get_database_oid(strVal((Value *) stmt->object), missing_ok); | ^~~~~ /usr/pgsql-15/include/server/nodes/nodes.h:640:72: note: in definition of macro ‘castNode’ 640 | #define castNode(type, nodeptr) ((type *) castNodeImpl(T_##type, nodeptr)) | ^~~~~~~ commands/database.c:119:44: note: in expansion of macro ‘strVal’ 119 | Oid databaseOid = get_database_oid(strVal((Value *) stmt->object), missing_ok); | ^~~~~~ commands/database.c:119:52: note: each undeclared identifier is reported only once for each function it appears in 119 | Oid databaseOid = get_database_oid(strVal((Value *) stmt->object), missing_ok); | ^~~~~ /usr/pgsql-15/include/server/nodes/nodes.h:640:72: note: in definition of macro ‘castNode’ 640 | #define castNode(type, nodeptr) ((type *) castNodeImpl(T_##type, nodeptr)) | ^~~~~~~ commands/database.c:119:44: note: in expansion of macro ‘strVal’ 119 | Oid databaseOid = get_database_oid(strVal((Value *) stmt->object), missing_ok); | ^~~~~~ commands/database.c:119:59: error: expected expression before ‘)’ token 119 | Oid databaseOid = get_database_oid(strVal((Value *) stmt->object), missing_ok); | ^ /usr/pgsql-15/include/server/nodes/nodes.h:640:72: note: in definition of macro ‘castNode’ 640 | #define castNode(type, nodeptr) ((type *) castNodeImpl(T_##type, nodeptr)) | ^~~~~~~ commands/database.c:119:44: note: in expansion of macro ‘strVal’ 119 | Oid databaseOid = get_database_oid(strVal((Value *) stmt->object), missing_ok); | ^~~~~~

devrimgunduz avatar Jun 01 '22 22:06 devrimgunduz

Hi @devrimgunduz

We are aware of older Citus versions not compiling against postgres 15.

Recently Jeff did some work on getting the compilation to work on pg15: https://github.com/citusdata/citus/pull/5897 . Even though compilation would pass, Citus will probably not directly work with pg15 on the next release. It is on our radar to get Citus compatible again. I expect that work to start shortly.

In the mean time I will have a look at our CI images. I tried getting the 15beta1 images ready on the day of the 'release', however there was some issues with installing 15beta1 on the debian variant we use in our CI.

thanodnl avatar Jun 14 '22 15:06 thanodnl

https://github.com/citusdata/citus/pull/6085 added support for PG 15 beta3 on Citus 11.1 (and Citus main branch).

Now we are actively following PG 15 beta releases and trying to support new releases within days after PG community tags new beta version.

We aim Citus to be compatible with the stable PG 15 release as soon as it is released.

onderkalaci avatar Sep 12 '22 08:09 onderkalaci

Citus 11.1.3 supports PG15 GA.

metdos avatar Oct 21 '22 09:10 metdos