Upgrade from 17.9 to 18.3.1 seems stuck

I have been trying to upgrade from version 17.9 to 18.3.1 on Ubuntu 24.04 for a couple days but seem to be stuck half way through.

The initial attempt proceeded as documented but ran into trouble because I had not preinstalled the additional dictionaries that we use.

After resolving this issue I attempted to restart the migration:

  • $ pg_upgradecluster 17 main --check
    pg_upgradecluster pre-upgrade checks ok

  • $ pg_upgradecluster 17 main
    Upgrading cluster 17/main to 18/main …
    Restarting old cluster with restricted connections…
    Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
    Cluster is already running.
    Error: Could not restart old cluster

  • $ psql
    psql (18.3 - Percona Server for PostgreSQL 18.3.1, server 17.9 - Percona Server for PostgreSQL 17.9.1 - Percona Distribution)
    Type “help” for help.
    postgres=# select version();

    PostgreSQL 17.9 - Percona Server for PostgreSQL 17.9.1 - Percona Distribution on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0, 64-bit
    (1 row)

So I completely removed the Postgres 18 and 17 packages and attempted to try again, but whenever I attempt to install percona-postgresql-18:

  • sudo apt install percona-postgresql-18

I only seem to get version 17.9.

I have tried moving the /etc/postgresql/17 folder but version 17.9 just springs to life, even without it’s configuration files.

I have made a dumpall backup so at this point, having wasted way to many hours trying to figure this out, I would be happy just to fresh install percona-postgresql-18 but it will not let me do that either. version 17.9 just keep reappearing.

Please assist me to either restart the migration or remove 17.9 so I can install from scratch.

Thanks

Chris

Hi Christ,

Hope you are doing well.

So I completely removed the Postgres 18 and 17 packages and attempted to try again, but whenever I attempt to install percona-postgresql-18:

  • sudo apt install percona-postgresql-18

I only seem to get version 17.9.

I have made a dumpall backup so at this point, having wasted way to many hours trying to figure this out, I would be happy just to fresh install percona-postgresql-18 but it will not let me do that either. version 17.9 just keep reappearing.

After installing PG v18, did you verify the package yet?

Please run:

dpkg -l | grep postgres

Also, did you check the status of all clusters?

pg_lsclusters

If you installed PGv18 successfully, you should see something like version 18.x or only 18/mainin the output.

$ pg_upgradecluster 17 main
Upgrading cluster 17/main to 18/main …
Restarting old cluster with restricted connections…
Notice: extra pg_ctl/postgres options given, bypassing systemctl for start operation
Cluster is already running.
Error: Could not restart old cluster

Did you stop all instances before starting the upgrade?

Please assist me to either restart the migration or remove 17.9 so I can install from scratch.

Well, I think you can verify the above command first to make sure PGv18 is here, and retry the upgrade process. And I would like to suggest you follow the link below to do the upgrade:

Let us know if you have any concerns or issues.

Warm regards,

Nam.