Skip to content

postgres 15 support #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RekGRpth opened this issue Jul 27, 2022 · 3 comments · Fixed by #54
Closed

postgres 15 support #53

RekGRpth opened this issue Jul 27, 2022 · 3 comments · Fixed by #54

Comments

@RekGRpth
Copy link
Contributor

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 1
@RekGRpth
Copy link
Contributor Author

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);

@maksm90
Copy link
Collaborator

maksm90 commented Jul 27, 2022

Hi @RekGRpth ! Thanks for notice. You might arrange fix as PR.

@RekGRpth
Copy link
Contributor Author

You might arrange fix as PR.

#54

@RekGRpth RekGRpth changed the title version 15 support postgres 15 support Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants