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

Upgrade postgres from 13 to 16 #1253

Open
yanmxa opened this issue Nov 29, 2024 · 0 comments
Open

Upgrade postgres from 13 to 16 #1253

yanmxa opened this issue Nov 29, 2024 · 0 comments

Comments

@yanmxa
Copy link
Member

yanmxa commented Nov 29, 2024

Change the image directly

  1. from 13 to 16
Incompatible data directory.  This container image provides
PostgreSQL '16', but data directory is of
version '13'.

This image supports automatic data directory upgrades from
'15', please _carefully_ consult image documentation
about how to use the '$POSTGRESQL_UPGRADE' startup option.

Related document: https://docs.redhat.com/en/documentation/red_hat_decision_manager/7.13/html/release_notes_for_red_hat_decision_manager_7.13/rn-7.13.2-known-issues-ref#red_hat_openshift_container_platform_7

  1. from 13 to 15
Incompatible data directory.  This container image provides
PostgreSQL '15', but data directory is of
version '13'.

This image supports automatic data directory upgrade from
'13', please _carefully_ consult image documentation
about how to use the '$POSTGRESQL_UPGRADE' startup option.

Upgrade with POSTGRESQL_UPGRADE option(Env)

  1. from 13 to 16
# change env
POSTGRESQL_UPGRADE=copy
# change image
quay.io/myan/postgresql-16:9.5-1732622748

...
With this container image you can only upgrade from data directory
of version '15', not '13'.
  1. from 13 to 15
POSTGRESQL_UPGRADE=copy
quay.io/myan/postgresql-15:1-14

...

==========  $PGDATA upgrade: 13 -> 15  ==========

Can't read /etc/scl/conf/rh-postgresql13, rh-postgresql13 is probably not installed.

===>  Starting old postgresql once again for a clean shutdown...

/usr/share/container-scripts/postgresql/common.sh: line 346: /opt/rh/rh-postgresql13/root/usr/bin/pg_ctl: No such file or directory

The upgraded image is from this repos: https://github.com/sclorg/postgresql-container. It's common.sh doesn't contain any rh-postgresql13 info, so we need to upgrade from 13 to 15, and the image version 15 will from the redhat Postgres image!

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

No branches or pull requests

1 participant