Upgrade PostgreSQL 9.X to 12.X in Windows

  • Comments posted to this topic are about the item Upgrade PostgreSQL 9.X to 12.X in Windows

  • not wishing to minimize the article itself which I consider well written I wonder why would posting this on a SQL Server forum be a good idea.

  • I am not too sure about changing ports. Imagine a large scale company that relies on Postgres and changing ports in a myriad of applications is not something that gets done in a snap of a finger. You might even need to configure the firewall to allow the new port. All of these tasks might involve different teams. Personally I would install the newer version on a separate host, migrate the databases, point whatever DNS aliases to the new host. That way it won't ever involve the applications team (other than post-migration connection testing). You also get to keep the old host alive for a grace period before shutting it down.

  • Absolutely right; if port switching is not an easy step, you can run new Postgres on the same port and stop the older Postgres service. If you configure new Postgres on another server, it will be a tech-refresh kind of activity that requires a new H/W and N/W setup.

    This approach will be effectively helpful when users want to use Postgres's new features with the same setup. i.e., CDC and many more.

  • Jignesh you have the best guide so far for a windows based upgrade.

    I am going from 9.5 to 9.6. Trying to upgrade my jira/bitbucket system.

    Getting stuck on the upgrade process. " password authentication failed for user" Have the same password for Postgres for both systems. Changed the port number for 9.6 to 5433.   Tried editing both pg_hba.conf and giving full permissions

    host all all trust

    host all all ::1/128 trust


    C:\temp>SET PGPASSWORD = passwordhere

    C:\temp>"C:\Program Files\PostgreSQL\9.6\bin\pg_upgrade" -d "C:\Program Files\Po

    stgreSQL\9.5\data" -D "C:\Program Files\PostgreSQL\9.6\data" -b "C:\Program File

    s\PostgreSQL\9.5\bin" -B "C:\Program Files\PostgreSQL\9.6\bin" -U Postgres

    Performing Consistency Checks


    Checking cluster versions ok

    connection to database failed: FATAL: password authentication failed for user "



  • can you please check the Authentication with a lower case of the user name? and if possible then share the log.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply