Upgrading /opt/bitnami/postgresql from version 11.8 to 12

Keywords: Django - AWS - How to - Upgrade
Description:
How can I upgrade the bitnami postgresql from version 11 to 12? Due to the difference in version with AWS Lightsail Postgres DB, the describe table query will fail with this error:

ERROR: column c.relhasoids does not existLINE 1: …riggers, c.relrowsecurity, c.relforcerowsecurity, c.relhasoi… ^

If there is no easy way to upgrade, is there a suggested workaround? Thanks.

Hello @eddieO,

In order to upgrade postgres you could launch a new Bitnami instance and migrate the files from the current deployment to that new one.

If the version you desire if not available on LightSail, you could stop the current installation, and install it manually from here:
https://bitnami.com/stack/django/installer

I hope it helps

Regards

@davidg Got it. By any chance, do you know how can i look for this file that is typically in
/usr/share/phppgadmin/classes/database/Postgres.php

From the link here, the workaround to make two different version works without an error is by commenting out the SELECT relhasoids, but i am not able to find the Postgres.php on my Django Bitnami lightsail box.
https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/transferring-a-repository

Thanks.

Hello @eddieO

Note that our Django solution does not ship phppgadmin, so that file is not present.

Regards

@davidg will you be able to please provide me with the link to download django installers version 2.2.13-0?

The current Postgres DB on AWS Lightsail is 12.3, and while the latest django stack installer upgrades Postgresql to version 13.1

In order to prevent further compatibility issue, i prefer to upgrade to the client to the same version as the db.
Based on the change log, https://bitnami.com/stack/django/changelog.txt

Version 2.2.13-0 2020-06-05

  • Updated PostgreSQL to 12.3

Any suggestions on the postgres configuration?

If you could also provide the installer link for django stack version 2.2.16-0 too that will be great, since that version has the latest on PostgreSQL version 12, 12.4

Version 2.2.16-0 2020-09-02

  • Updated PostgreSQL to 12.4

Thanks again.

Hello @eddieO,

These are the installers you are looking for:

https://downloads.bitnami.com/files/stacks/django/2.2.13-1/bitnami-django-2.2.13-1-linux-x64-installer.run
https://downloads.bitnami.com/files/stacks/django/2.2.16-0/bitnami-django-2.2.16-0-linux-x64-installer.run

Regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.