Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

pg_upgrade 12 to 14 with postgis - several hurdles - solved #45

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

Closed
WinFinn opened this issue Feb 24, 2022 · 0 comments
Closed

pg_upgrade 12 to 14 with postgis - several hurdles - solved #45

WinFinn opened this issue Feb 24, 2022 · 0 comments

Comments

@WinFinn
Copy link

WinFinn commented Feb 24, 2022

Just wanted to drop this in here as I had several issues during my upgrade, but managed to get through after a couple of days searching and failing.

  1. There seems to be a postmaster servicing the old cluster. Please shutdown that postmaster and try again.
    see Does not work with official postgres:10 due to shutdown issues #15
    I increased the shutdown period to 10min, but it was not enough. I had to run the 4 commands described in issue 15 above.
  2. Next failure was with error ""no password supplied"
    This was fixed with by editing pg_hba.conf on original (v12) postgresql. Changed settings for the two "local" lines from my "md5" to "peer". (Note that changing the other to peer will genereate another error).
    See postgres official upgrade step7 (Adjust authentication). https://www.postgresql.org/docs/14/pgupgrade.html
  3. Finally something started to happen. But as I had postgis extention installed I had to run the upgrade with this extentions.
    see Upgrade postgresql with postgis extension #33
    I build a new docker container for upgrade with the postgis extentions as explained above.
  4. Next failure was during upgrade of the postgis extention:
    -- For binary upgrade, handle extension membership the hard way
    ALTER EXTENSION "postgis_sfcgal" ADD FUNCTION "public"."postgis_sfcgal_version"();
    I could not find much information about this. But I ended up removing this extension on the databases that had it. and then create them again when the pg14 was up and running. I deleted and created these with pgadmin4 web ui.
    I suspect this failure might be due to incorrect versions of postgis in my upgrade docker vs the original PG12 docker.
  5. when upgrade finally completed I had to change the PG14 pg_hba.conf file to get access again. basically I copied the file from v12, and changed back the "peer" changes made at failure 2 above.
  6. finally getting the connections up with pgadmin4 to the new PG14 I created the postgis_sfcgal extension from failure 4 above, and also updated the extensions as suggested in the "update_exstensions.sql" generated by this docker_upgrade.

Hope this can help others that also has issues upgrading

Repository owner locked and limited conversation to collaborators Feb 25, 2022
@tianon tianon converted this issue into discussion #46 Feb 25, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant