citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.89k stars 193 forks source link

PostgreSQL 17 support #339

Closed devrimgunduz closed 3 months ago

devrimgunduz commented 4 months ago

Hi,

1.6.2 fails to build against PostgreSQL 17. v17beta2 is already out. Can you please take a look?

Thanks, Devrim

/usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-format-truncation -O2 -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-uninitialized -Wno-implicit-fallthrough -Iinclude -I/usr/pgsql-17/include -I. -I./ -I/usr/pgsql-17/include/server -I/usr/pgsql-17/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include -flto=thin -emit-llvm -c -o src/task_states.bc src/task_states.c src/job_metadata.c:144:2: error: call to undeclared function 'MemoryContextResetAndDeleteChildren'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 144 | MemoryContextResetAndDeleteChildren(CronJobContext); | ^ src/job_metadata.c:144:2: note: did you mean 'MemoryContextDeleteChildren'? /usr/pgsql-17/include/server/utils/memutils.h:78:13: note: 'MemoryContextDeleteChildren' declared here 78 | extern void MemoryContextDeleteChildren(MemoryContext context); | ^ 1 error generated. make[1]: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: src/job_metadata.bc] Error 1 make[1]: *** Waiting for unfinished jobs.... src/job_metadata.c: In function ‘ResetJobMetadataCache’: src/job_metadata.c:144:9: error: implicit declaration of function ‘MemoryContextResetAndDeleteChildren’; did you mean ‘MemoryContextDeleteChildren’? [-Wimplicit-function-declaration] 144 | MemoryContextResetAndDeleteChildren(CronJobContext); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | MemoryContextDeleteChildren make[1]: *** [<builtin>: src/job_metadata.o] Error 1

devrimgunduz commented 3 months ago

Fixed in 1.6.3.