postgres 15 support
RekGRpth opened this issue · 3 comments
RekGRpth commented
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 -O2 -fPIC -I. -I./ -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/local/include -c -o collector.o collector.c
collector.c: In function 'collector_main':
collector.c:355:9: error: too few arguments to function 'InitPostgres'
355 | InitPostgres(NULL, InvalidOid, NULL, InvalidOid, NULL, false);
| ^~~~~~~~~~~~
In file included from collector.c:17:
/usr/local/include/postgresql/server/miscadmin.h:460:13: note: declared here
460 | extern void InitPostgres(const char *in_dbname, Oid dboid,
| ^~~~~~~~~~~~
make: *** [<builtin>: collector.o] Error 1RekGRpth commented
solve
diff --git a/collector.c b/collector.c
index bbf2741..00b6bb5 100644
--- a/collector.c
+++ b/collector.c
@@ -351,7 +351,9 @@ collector_main(Datum main_arg)
pqsignal(SIGUSR1, procsignal_sigusr1_handler);
BackgroundWorkerUnblockSignals();
-#if PG_VERSION_NUM >= 110000
+#if PG_VERSION_NUM >= 150000
+ InitPostgres(NULL, InvalidOid, NULL, InvalidOid, false, false, NULL);
+#elif PG_VERSION_NUM >= 110000
InitPostgres(NULL, InvalidOid, NULL, InvalidOid, NULL, false);
#else
InitPostgres(NULL, InvalidOid, NULL, InvalidOid, NULL);