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 #499

Closed
crunchyjohn opened this issue Sep 12, 2024 · 4 comments
Closed

PostgreSQL 17 support #499

crunchyjohn opened this issue Sep 12, 2024 · 4 comments

Comments

@crunchyjohn
Copy link

Hello!

I would like to request pg17 support for pljava.

When I build against PG17 using the latest released version (v1.6.7), I get the following error:

[INFO] ----------------------< org.postgresql:pljava-so >----------------------
[INFO] Building PL/Java backend native code 1.6.7                         [5/8]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ pljava-so ---
[INFO]
[INFO] --- pljava-pgxs:1.6.7:scripted-goal (build-shared-object) @ pljava-so ---
[INFO] Using compiling/linking rules for Linux
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c: In function 'pljavaDbName':
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c:93:14: warning: implicit declaration of function 'IsAutoVacuumWorkerProcess'; did you mean 'AmAutoVacuumWorkerProcess'? [-Wimplicit-function-declaration]
   93 |         if ( IsAutoVacuumWorkerProcess() || IsBackgroundWorker )
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~
      |              AmAutoVacuumWorkerProcess
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c:93:45: error: 'IsBackgroundWorker' undeclared (first use in this function); did you mean 'AmBackgroundWorkerProcess'?
   93 |         if ( IsAutoVacuumWorkerProcess() || IsBackgroundWorker )
      |                                             ^~~~~~~~~~~~~~~~~~
      |                                             AmBackgroundWorkerProcess
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c:93:45: note: each undeclared identifier is reported only once for each function it appears in
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c: In function 'origUserName':
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c:113:45: error: 'IsBackgroundWorker' undeclared (first use in this function); did you mean 'AmBackgroundWorkerProcess'?
  113 |         if ( IsAutoVacuumWorkerProcess() || IsBackgroundWorker )
      |                                             ^~~~~~~~~~~~~~~~~~
      |                                             AmBackgroundWorkerProcess
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c: In function 'InstallHelper_shouldDeferInit':
pljava-V1_6_7/pljava-so/src/main/c/InstallHelper.c:357:14: error: 'IsBackgroundWorker' undeclared (first use in this function); did you mean 'AmBackgroundWorkerProcess'?
  357 |         if ( IsBackgroundWorker || IsAutoVacuumWorkerProcess() )
      |              ^~~~~~~~~~~~~~~~~~
      |              AmBackgroundWorkerProcess
pljava-V1_6_7/pljava-so/src/main/c/PgSavepoint.c: In function 'Java_org_postgresql_pljava_internal_PgSavepoint__1rollback':
pljava-V1_6_7/pljava-so/src/main/c/PgSavepoint.c:190:17: warning: implicit declaration of function 'SPI_restore_connection' [-Wimplicit-function-declaration]
  190 |                 SPI_restore_connection();
      |                 ^~~~~~~~~~~~~~~~~~~~~~
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for PostgreSQL PL/Java 1.6.7:
[INFO]
[INFO] PostgreSQL PL/Java ................................. SUCCESS [ 16.476 s]
[INFO] PL/Java API ........................................ SUCCESS [ 10.033 s]
[INFO] PL/Java backend Java code .......................... SUCCESS [  4.775 s]
[INFO] PL/Java PGXS ....................................... SUCCESS [ 12.459 s]
[INFO] PL/Java backend native code ........................ FAILURE [ 10.006 s]
[INFO] PL/Java Ant tasks .................................. SKIPPED
[INFO] PL/Java examples ................................... SKIPPED
[INFO] PL/Java packaging .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  53.821 s
[INFO] Finished at: 2024-09-12T14:01:16-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.postgresql:pljava-pgxs:1.6.7:scripted-goal (build-shared-object) on project pljava-so: Compilation failed with exit code: 1 -> [Help 1]

I am compling on an Alma9 - x86_64 Linux box. I am unsure what changes would be required, so I thought I would raise the issue.

Thanks!

@devrimgunduz
Copy link

Hi @jcflack ,

v17 GA is soon. Any chance you can take a look at this please?

Thanks! Devrim

@javsalgar
Copy link

Hi! Any chance that you could cut a new release of the pljava plugin that has this support?

@jcflack
Copy link
Contributor

jcflack commented Oct 20, 2024

PL/Java 1.6.8 is released after testing with PostgreSQL 17.

@devrimgunduz, I am sorry we didn't connect at pgconf.dev to discuss the RPM packaging. This release has made some updates in the documentation for packaging PL/Java and what files are produced by a build. Those docs may be enough to suggest improvements to the RPM packaging. If they leave you with unanswered questions, I would be happy to discuss them.

A significant issue that was reported by a PL/Java user last spring was that the RPM package does not seem to install the pljava.policy file.

Leaving that file out of the RPM package can be a source of great frustration (or worse) for a new PL/Java user, because PL/Java 1.6.x definitely will not work without its policy file, and a frustrated user may try to get it working by creating a policy file that grants AllPermission to all code—which is far from desirable.

@jcflack jcflack closed this as completed Oct 20, 2024
@devrimgunduz
Copy link

@jcflack thanks for the 1.6.8 release! I'll take care of the policy file and other packaging issues ASAP and will let you know.

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.

4 participants