Обсуждение: This utility can only upgrade to PostgreSQL version 9.4

Поиск
Список
Период
Сортировка

This utility can only upgrade to PostgreSQL version 9.4

От
"Furlong, Shane"
Дата:

I am trying to upgrade from PostgreSQL 9.0.22 to 9.4.4.

 

When I attempt to execute pg_upgrade, I get the following error:

 

Performing Consistency Checks

-----------------------------

Checking cluster versions

This utility can only upgrade to PostgreSQL version 9.4.

 

The command I am executing is:

 

/app/PostgreSQL/9.4/bin/pg_upgrade -b /app/PostgreSQL/9.0/bin -B /app/PostgreSQL/9.4/bin -c -d /pgsql/stip/data9 -D /pgsql/stip/data94

 

The data directory for 9.4 is a copy of the data directory for 9.0.  I am able to login to the 9.0 data via the 9.0 server and client, so I cannot see how pg_upgrade thinks the data is at a 9.4 level.

 

The error message is not of much help.  I have tried searching for an article or document that addresses this particular error message to no avail.

 

Any help you can provide would be greatly appreciated.

 

 

Thank you,

Shane Furlong

U.S. Department of Energy

Office of Scientific and Technical Information (OSTI)

(865) 574-9316, Rm 206-1, office

(865) 973-3276 mobile

furlongs@osti.gov

 

Re: This utility can only upgrade to PostgreSQL version 9.4

От
"Greg Sabino Mullane"
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Shane Furlong asks:

> When I attempt to execute pg_upgrade, I get the following error:
...
> This utility can only upgrade to PostgreSQL version 9.4.
...
> /app/PostgreSQL/9.4/bin/pg_upgrade -b /app/PostgreSQL/9.0/bin -B /app/PostgreSQL/9.4/bin -c -d /pgsql/stip/data9 -D
/pgsql/stip/data94
> The data directory for 9.4 is a copy of the data directory for 9.0.

That is your problem. You need to create a new, empty data directory for 9.4,
by using the 9.4 version of initdb. I do agree that the error message
could be improved.

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201507270953
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAlW2OAEACgkQvJuQZxSWSsj1CgCeKU8QO2dEHgBV6Su9D2eJmIss
MTkAoIGWD0UYPURhC+2WHU/e44Wcsm5N
=IcDc
-----END PGP SIGNATURE-----




Re: This utility can only upgrade to PostgreSQL version 9.4

От
Adrian Klaver
Дата:
On 07/27/2015 06:48 AM, Furlong, Shane wrote:
> I am trying to upgrade from PostgreSQL 9.0.22 to 9.4.4.
>
> When I attempt to execute pg_upgrade, I get the following error:
>
> *Performing Consistency Checks*
>
> *-----------------------------*
>
> *Checking cluster versions*
>
> *This utility can only upgrade to PostgreSQL version 9.4. *
>
> The command I am executing is:
>
> /app/PostgreSQL/9.4/bin/pg_upgrade -b /app/PostgreSQL/9.0/bin -B
> /app/PostgreSQL/9.4/bin -c -d /pgsql/stip/data9 -D /pgsql/stip/data94
>
> The data directory for 9.4 is a copy of the data directory for 9.0.  I
> am able to login to the 9.0 data via the 9.0 server and client, so I
> cannot see how pg_upgrade thinks the data is at a 9.4 level.

Well there's your problem:) The the new(9.4) data directory needs to
have been created by 9.4. Right now pg_upgrade thinks it is doing a 9.0
to 9.0 upgrade. The error message is not telling you it is at 9.4 but at
a Postgres other then 9.4.

Use the 9.4 initdb or pg_ctl init to create a new data directory that
pg_upgrade can move the 9.0 data to.

>
> The error message is not of much help.  I have tried searching for an
> article or document that addresses this particular error message to no
> avail.
>
> Any help you can provide would be greatly appreciated.
>
> Thank you,
>
> *Shane Furlong*
>
> U.S. Department of Energy
>
> Office of Scientific and Technical Information (OSTI)
>
> (865) 574-9316, Rm 206-1, office
>
> (865) 973-3276 mobile
>
> furlongs@osti.gov <mailto:furlongs@osti.gov>
>


--
Adrian Klaver
adrian.klaver@aklaver.com