Skip to content
/ pgj Public
forked from 8kdata/pgj

A JVM (Java Virtual Machine) running alongside PostgreSQL

License

Notifications You must be signed in to change notification settings

ahachete/pgj

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgj

A JVM (Java Virtual Machine) running alongside PostgreSQL.

This is not production ready, just a proof of concept.

It only works on Linux, but it should be possible to run it on other OSes (feel free to create a PR).

Compiling pgj

Java part of pgj

You need to compile first the Java part, as the generated Jar file will be included as part of the extension. This is a standard Maven program:

cd java
mvn package

A jar file should have been generated under java/target/pgj-<VERSION>.jar.

The PostgreSQL extension (pgxs)

You need a suitable JDK (version 6 or above) and export its path via the JAVA_HOME environment variable.

export JAVA_HOME=/path/to/jdk
cd pgxs
make
sudo make install

Running pgj

You need to make the JVM library (typically called libjvm.so) available in the LIBRARY_PATH, like:

sudo ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so /usr/lib

Add the library to postgresql.conf's shared_preload_libraries:

shared_preload_libraries = '... other libraries if any... , pgj'		# (change requires restart)

And restart PostgreSQL.

About

A JVM (Java Virtual Machine) running alongside PostgreSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 73.8%
  • Java 16.0%
  • Makefile 10.2%