0

I want to try my first upgrade from postgres 15.1 to 15.2

no instance is started,I run init on new dir:

    d:\_dev_\postgres\pgsql\bin\initdb.exe -D d:\_dev_\postgres\pgsql\data 
-U postgres -W -E UTF8 -A scram-sha-256

then

I've create a cmd file:

SET PGPASSWORD=xxxx
SET PATH=%PATH%;d:\_dev_\postgres\pgsql\bin;

pg_upgrade.exe 
--old-datadir "d:\_dev_\postgres\OLD_pgsql\data"
--new-datadir "d:\_dev_\postgres\pgsql\data"
--old-bindir "d:\_dev_\postgres\OLD_pgsql\bin"
--new-bindir "d:\_dev_\postgres\pgsql\bin"

but got:

Checking cluster versions                                   ok

connection to server at "localhost" (::1), port 50432 failed: FATAL:  password authentication failed for user "user"

    could not connect to source postmaster started with the command:
    "d:/_dev_/postgres/Vpgsql/bin/pg_ctl" -w -l "d:/_dev_/postgres/pgsql/data/pg_upgrade_output.d/20230210T102433.178/log/pg_upgrade_server.log" -D "d:/_dev_/postgres/Vpgsql/data" -o "-p 50432 -b " start
    Failure, exiting
mrapi
  • 5,831
  • 8
  • 37
  • 57
  • 1
    In your initdb, you told it to create the user named 'postgres', but in your pg_upgrade you did not tell it what user name to use. – jjanes Feb 10 '23 at 15:45
  • Which error did you actually get, the one in your title or the one in you post? – jjanes Feb 10 '23 at 15:46
  • 1
    15.1 and 15.2 is a minor release upgrade. You don't run pg_upgrade to do one of those, you just install the new binaries. – jjanes Feb 10 '23 at 15:47
  • great I've added pg_upgrade.exe -U postgres ... and worked,please add your answer to mark it as solved – mrapi Feb 10 '23 at 17:04

0 Answers0