bihealth / irods-docker

iRODS Docker image for use with SODAR
MIT License
1 stars 0 forks source link

Upgrade odbc-postgresql driver for PostgreSQL >11 #18

Closed mikkonie closed 1 month ago

mikkonie commented 10 months ago

We need to upgrade to Postgres 12+ to bring SODAR Core and SODAR to Django 4.2, see bihealth/sodar-core#880. (Also Postgres 11 has now dropped out of support so it shouldn't be used anyway)

Attempts for the current version of the image to connect to a newer postgres version are met with a lovely flood of column c.relhasoids does not exist errors. This is caused by an old version of the odbc-postgresql driver installed on the image, namely 1:10.01.0000-1.

Alas, there is a problem: the newer version of driver is not available for Ubuntu 18.04. At least not without us trying to compile our own version or something. Judging by the lack of results online for people doing this, that probably is not a good idea.

The new driver is available for Ubuntu 20.04. But there we run into another issue: iRODS 4.2 is not officially available for that build. It is possible to build it with a workaround, but I'd rather not have that in our image.

Hence, I believe a proper solution for this task is as follows:

As far as I can tell, once the OS has been upgraded, the existing apt install command for unixodbc, unixodbc-dev and odbc-postgresql should install the new versions without any hassle. But if not, this is where we ensure the proper version gets installed.

mikkonie commented 1 month ago

Done.