Skip to content
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

PostgreSQL 17 support #156

Open
devrimgunduz opened this issue Jul 29, 2024 · 7 comments
Open

PostgreSQL 17 support #156

devrimgunduz opened this issue Jul 29, 2024 · 7 comments

Comments

@devrimgunduz
Copy link

Hi,

8.4.6 fails to build against PostgreSQL 17. v17 beta2 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 -I"./" -I"-I/usr/include/R" -I/usr/include/R -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 -DPKGLIBDIR="/usr/pgsql-17/lib" -DDLSUFFIX=".so" -DR_HOME_DEFAULT="/usr/lib64/R" -flto=thin -emit-llvm -c -o pg_rsupport.bc pg_rsupport.c
In file included from plr.h:117,
from plr.c:33:
plr.c: In function ‘plr_convertargs’:
/usr/include/R/Rdefines.h:148:33: warning: ‘el’ may be used uninitialized [-Wmaybe-uninitialized]
148 | #define GET_LENGTH(x) Rf_length(x)
| ^~~~~~~~~~~~
plr.c:1628:25: note: ‘el’ was declared here
1628 | el;
| ^~
pg_userfuncs.c:414:2: error: call to undeclared function 'tuplestore_donestoring'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
414 | tuplestore_donestoring(tupstore);
| ^
1 error generated.
make[1]: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: pg_userfuncs.bc] Error 1
make[1]: *** Waiting for unfinished jobs....
pg_conversion.c:2137:2: error: call to undeclared function 'tuplestore_donestoring'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2137 | tuplestore_donestoring(tupstore);
| ^
pg_conversion.c:2200:2: error: call to undeclared function 'tuplestore_donestoring'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2200 | tuplestore_donestoring(tupstore);
| ^
pg_conversion.c:2260:2: error: call to undeclared function 'tuplestore_donestoring'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
2260 | tuplestore_donestoring(tupstore);
| ^
3 errors generated.
make[1]: *** [/usr/pgsql-17/lib/pgxs/src/makefiles/../../src/Makefile.global:1085: pg_conversion.bc] Error 1
pg_userfuncs.c: In function ‘plr_environ’:
pg_userfuncs.c:414:9: error: implicit declaration of function ‘tuplestore_donestoring’; did you mean ‘tuplestore_rescan’? [-Wimplicit-function-declaration]
414 | tuplestore_donestoring(tupstore);
| ^~~~~~~~~~~~~~~~~~~~~~
| tuplestore_rescan
make[1]: *** [: pg_userfuncs.o] Error 1
pg_conversion.c: In function ‘get_frame_tuplestore’:
pg_conversion.c:2137:9: error: implicit declaration of function ‘tuplestore_donestoring’; did you mean ‘tuplestore_rescan’? [-Wimplicit-function-declaration]
2137 | tuplestore_donestoring(tupstore);
| ^~~~~~~~~~~~~~~~~~~~~~
| tuplestore_rescan
make[1]: *** [: pg_conversion.o] Error 1

@davecramer
Copy link
Collaborator

sure, thanks for the report

@AndreMikulec
Copy link
Collaborator

@devrimgunduz

Dave is building every day using the pg "master".
How exactly are you trying to build plr?

plr/.github/workflows/build.yml uses pg master
https://github.com/davecramer/plr/blob/release_17/.github/workflows/build.yml#L25C10-L25C34

git clone --depth=1 https://github.com/postgres/postgres.git

Job
https://github.com/davecramer/plr/actions/runs/10161280166/job/28099428293#step:5:28

# using postmaster on Unix socket, default port
ok 1         - plr                                      1985 ms
ok 2         - bad_fun                                   126 ms
ok 3         - opt_window                                128 ms
ok 4         - do                                        125 ms
ok 5         - out_args                                  127 ms
ok 6         - plr_transaction                           147 ms
ok 7         - opt_window_frame                          128 ms
1..7
# All 7 tests passed.

The Job workflow file
https://github.com/davecramer/plr/actions/runs/10161280166/workflow

The Job workflow file uses pg master
https://github.com/davecramer/plr/actions/runs/10161280166/workflow#L31

git clone --depth=1 https://github.com/postgres/postgres.git

Can you build in the same way as the workflow file?
Next, can you build using pg 17 beta2?
One needs to replace

git clone --depth=1 https://github.com/postgres/postgres.git

with

git clone --branch REL_17_BETA2 --depth=1 https://github.com/postgres/postgres.git

Compare?

@davecramer
Copy link
Collaborator

@AndreMikulec He needs a tag to build off of, we need to release 8_4_7 which is why I was trying to get CI to build clean.

I think we can release and fix it later. Most of the CI is succeeding.

Thoughts ?

@AndreMikulec
Copy link
Collaborator

Dave,

What is being done about 8_4_7?
I did not see any plr C code changes here except pg versions and file renaming.
https://github.com/davecramer/plr/commits/release_17/

Within a week, I will try to make a pull request. based off (but actually from my online clone of postgres-plr):

https://github.com/AndreMikulec/plr/tree/July_2024_updated_builds
and SOME successful 17 recent actions
https://github.com/AndreMikulec/plr/actions

@davecramer
Copy link
Collaborator

There are no code changes other than versioning and sql files.
So really I can back out any changes to CI and just merge that and tag it.
I'm OK with the current failing tests.

@AndreMikulec
Copy link
Collaborator

@devrimgunduz

REL_17_ had built here on ubuntu x64.
https://github.com/postgres-plr/plr/actions/runs/10238114376/job/28322183597

@devrimgunduz, please verify, and if successful one may close the issue.

@df7cb
Copy link

df7cb commented Sep 19, 2024

8.4.7 works fine with PG17 here on Debian.

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

No branches or pull requests

4 participants