Getting PostgreSQL running on Haiku

It took me a little while, but I got PostgreSQL 9.3 to work in Haiku R1B1 32 bit. I tried version 9.6 but for some reason it wasn’t installing all the needed commands such as initdb, createdb, etc. All 9.6 seemed to install was the psql command. I’ll try 9.6 again some other time.

I logged what I did here in case someone in the future may want a quick guide for setting PostgreSQL up in Haiku. I searched for a quick reference on installing PostgreSQL on Haiku but I couldn’t find one. So I created one.

I also manage to compile and successfully run the C example program testlibpq.c for testing a connection to PostgreSQL. I couldn’t get Paladin to compile it, but gcc in the Terminal compiled it fine.

Does anyone know where to get code or an App for load testing a PostgreSQL database? I’d like to see how much it can take on Haiku.

Cheers for R1B1

Why are you testing such a horribly outdated version? 9.3 is end-of-life and will not be supported anymore. PostgreSQL is at 11.x already. Please test with 11.1 or 10.6 to see if the problems still exist.

If you check his blog, he installed it from Depot, and currently 9.3 and 9.6 are the only available versions.
There is a wip recipe for a more recent version if somebody up to the task: https://github.com/haikuports/haikuports/pull/2120

9.x is still the master branch in linux “stable” distributions like Debian Stretch (v9.6), just checked after updating its repos. Yet i know debian is always on last century software.

I’m kinda confused with the depot/pkgman. I cannot find any postgresql version nor some other packages that are on my cloned haikuports git on the 64bits version (kobodeluxe for example).

~> pkgman refresh
Fetching repository checksum from https://eu.hpkg.haiku-os.org/haiku/r1beta1/x86_64/current ...
Validating checksum for Haiku ...
Fetching repository checksum from https://eu.hpkg.haiku-os.org/haikuports/r1beta1/x86_64/current ...
Validating checksum for HaikuPorts ...
~> pkgman search postgre
No matching packages found.

Not surprising, as the current recipes marked as untested/broken:

9.3.5: https://github.com/haikuports/haikuports/blob/0d782eba6738395cc7a73e300ef29f1cc27cbb0f/dev-db/postgresql/postgresql-9.3.5.recipe
ARCHITECTURES=“x86_gcc2 ?x86 !x86_64
9.6.10.: https://github.com/haikuports/haikuports/blob/a745267f4e6e318de8274f39972078e6f692b5d9/dev-db/postgresql/postgresql-9.6.10.recipe
ARCHITECTURES=“x86_gcc2 ?x86 ?x86_64

OK! Thanks for the clear answer, that solves the confusion. I asumed ! was not pushed to that arch but ? may/might be.

64bits version needs a little more love.

! means broken, ? means untested, neither will be built. Consult with the HaikuPorts wiki for more info.

Yup, I read about em, i think i even marked one as broken/unavailable on one arch for a custom recipe.

I just brainfarted with the “?” on the packages for official repo. Time to locally build kobodeluxe for testing in 64 bits then!

@dragon, as extrowerk mentioned, I installed it from the HaikuDepot App. I forgot to mention that in my initial post.

Not sure, but maybe this could help you:

Not sure, but maybe this could help you: Drupal is using PostgreeSQL. By installing Drupal you can choose mySQL or PostgreeSQL…

Would be very interesting if PostgreeSQLwith Drupal would work with Haiku…

Huh? Most production systems are still on 9.x; my workplace uses 9.6. CentOS doesn’t even have 10.0 available yet.

Got PostreSQL 10.6 here on Fedora 28. Should be able to test it with pgAdmin4 (or pgAdmin3 for PostgreSQL 9), a web GUI for fiddling with databases. Don’t even have to run pgAdmin on Haiku; if you have networking working it can be used from some other computer and remotely connect to the Haiku PostgreSQL server.

@un_spacyar Yes, that is what I was looking for. Thank you.

Agreed. I also have some long running, standalone systems deployed with 9.4 & 9.5.
Because they were shipped with Debian version by that time. Legacy systems update cost and yadayada keep em with those versions, running 24/7.

9.6.10 version available in Haiku as stated by (posted above by Extrowek) is more than enough to have for now (unless you need the new version features… somehow).

I did not stated that, i stated we only have that, and just for 32 bit right now. Somebody should try to fix it for 64 bit, and fix/finish the WIP recipe too.

Yep, sorry i meant that you “posted” the link to available versions (so “stated the available ones”).

Fixing my post.

Please call it Haiku. Haiku-os.org is only because haiku.org is being held for ransom.

2 Likes