Обсуждение: PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

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

PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

От
jmfox180
Дата:
so i'm running ubuntu 12.04 with pg8.3.2 installed on it, i want to upgrade
to 9.2.4 using the pg_upgrade. i've followed this steps:

1) download postgres9.2.4
2)configure it and compile it
3) make and install the pg_upgrade and pg_upgrade_support utilities from the
pg9.2.4 contrib folder
4) init the pg9.2.4 cluster with:  initdb -D /usr/local/pgsql9.2.4/data
5) try to check for compatibilities between the 2 clusters and getting the
following error while logged into postgres user account.

command>>
/usr/local/pgsql9.2.0/bin/./pg_upgrade -b /usr/local/pgsql/bin/ -B
/usr/local/pgsql9.2.0/bin/ -c -d /usr/local/pgsql/data/ -D
/usr/local/pgsql9.2.0/data/

error>>
cannot write to log file pg_upgrade_internal.log
Failure, exiting

6) so i decided to move on and just do an upgrade without the -c (check for
compatibilities) :

            6.1) stop both servers
            6.2) run the same command without the -c to upgrade and getting
:
               " this utility can only upgrade to postgresql version 9.2"

please enlighten me or give me any advice.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PG-UPGRADE-issues-this-utility-can-only-upgrade-to-postgresql-version-9-2-tp5759509.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

От
Bruce Momjian
Дата:
On Mon, Jun 17, 2013 at 10:54:06AM -0700, jmfox180 wrote:
> so i'm running ubuntu 12.04 with pg8.3.2 installed on it, i want to upgrade
> to 9.2.4 using the pg_upgrade. i've followed this steps:
>
> 1) download postgres9.2.4
> 2)configure it and compile it
> 3) make and install the pg_upgrade and pg_upgrade_support utilities from the
> pg9.2.4 contrib folder
> 4) init the pg9.2.4 cluster with:  initdb -D /usr/local/pgsql9.2.4/data
> 5) try to check for compatibilities between the 2 clusters and getting the
> following error while logged into postgres user account.
>
> command>>
> /usr/local/pgsql9.2.0/bin/./pg_upgrade -b /usr/local/pgsql/bin/ -B
> /usr/local/pgsql9.2.0/bin/ -c -d /usr/local/pgsql/data/ -D
> /usr/local/pgsql9.2.0/data/
>
> error>>
> cannot write to log file pg_upgrade_internal.log
> Failure, exiting
>
> 6) so i decided to move on and just do an upgrade without the -c (check for
> compatibilities) :
>
>             6.1) stop both servers
>             6.2) run the same command without the -c to upgrade and getting
> :
>                " this utility can only upgrade to postgresql version 9.2"
>
> please enlighten me or give me any advice.

You need write permission in the current directory.  My guess is that
your /usr/local/pgsql9.2.0/data/ isn't really 9.2.


--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


Re: PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

От
jmfox180
Дата:
so after trying i advance just a little bit but when running pg_upgrade for a
check or upgrade

i get:

pg_control values:

First log file ID after reset:        0
First log file segment after reset:   2
pg_control version number:            922
Catalog version number:               201204301
Database system identifier:           5890882831378718649
Latest checkpoint's TimeLineID:       1
Latest checkpoint's full_page_writes: on
Latest checkpoint's NextXID:          0/726
Latest checkpoint's NextOID:          12047
Latest checkpoint's NextMultiXactId:  1
Latest checkpoint's NextMultiOffset:  0
Latest checkpoint's oldestXID:        716
Latest checkpoint's oldestXID's DB:   1
Latest checkpoint's oldestActiveXID:  0
Maximum data alignment:               4
Database block size:                  8192
Blocks per segment of large relation: 131072
WAL block size:                       8192
Bytes per WAL segment:                16777216
Maximum length of identifiers:        64
Maximum columns in an index:          32
Maximum size of a TOAST chunk:        2000
Date/time type storage:               floating-point numbers
Float4 argument passing:              by value
Float8 argument passing:              by reference
"/usr/local/pgsql.old/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D
"/usr/local/pgsql.old/data/" -o "-p 5432 -c autovacuum=off -c
autovacuum_freeze_max_age=2000000000  -c listen_addresses='' -c
unix_socket_permissions=0700" start >> "pg_upgrade_server.log" 2>&1
*failure*
There were problems executing ""/usr/local/pgsql.old/bin/pg_ctl" -w -l
"pg_upgrade_server.log" -D "/usr/local/pgsql.old/data/" -o "-p 5432 -c
autovacuum=off -c autovacuum_freeze_max_age=2000000000  -c
listen_addresses='' -c unix_socket_permissions=0700" start >>
"pg_upgrade_server.log" 2>&1"
Consult the last few lines of "pg_upgrade_server.log" for
the probable cause of the failure.

pg_ctl failed to start the old server, or connection failed
Failure, exiting


when going to the log file:

  pg_upgrade run on Tue Jun 18 11:58:08 2013
-----------------------------------------------------------------

command: "/usr/local/pgsql.old/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D
"/usr/local/pgsql.old/data/" -o "-p 5432 -c autovacuum=off -c $
waiting for server to start....LOG:  database system was shut down at
2013-06-18 11:30:47 CST
LOG:  database system is ready to accept connections
...........................................................could not start
server






--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PG-UPGRADE-issues-this-utility-can-only-upgrade-to-postgresql-version-9-2-tp5759509p5759711.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: Re: PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

От
Ziggy Skalski
Дата:
On 13-06-18 02:06 PM, jmfox180 wrote:
> so after trying i advance just a little bit but when running pg_upgrade for a
> check or upgrade
>
> i get:
>
> pg_control values:
>
> First log file ID after reset:        0
> First log file segment after reset:   2
> pg_control version number:            922
> Catalog version number:               201204301
> Database system identifier:           5890882831378718649
> Latest checkpoint's TimeLineID:       1
> Latest checkpoint's full_page_writes: on
> Latest checkpoint's NextXID:          0/726
> Latest checkpoint's NextOID:          12047
> Latest checkpoint's NextMultiXactId:  1
> Latest checkpoint's NextMultiOffset:  0
> Latest checkpoint's oldestXID:        716
> Latest checkpoint's oldestXID's DB:   1
> Latest checkpoint's oldestActiveXID:  0
> Maximum data alignment:               4
> Database block size:                  8192
> Blocks per segment of large relation: 131072
> WAL block size:                       8192
> Bytes per WAL segment:                16777216
> Maximum length of identifiers:        64
> Maximum columns in an index:          32
> Maximum size of a TOAST chunk:        2000
> Date/time type storage:               floating-point numbers
> Float4 argument passing:              by value
> Float8 argument passing:              by reference
> "/usr/local/pgsql.old/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D
> "/usr/local/pgsql.old/data/" -o "-p 5432 -c autovacuum=off -c
> autovacuum_freeze_max_age=2000000000  -c listen_addresses='' -c
> unix_socket_permissions=0700" start >> "pg_upgrade_server.log" 2>&1
> *failure*
> There were problems executing ""/usr/local/pgsql.old/bin/pg_ctl" -w -l
> "pg_upgrade_server.log" -D "/usr/local/pgsql.old/data/" -o "-p 5432 -c
> autovacuum=off -c autovacuum_freeze_max_age=2000000000  -c
> listen_addresses='' -c unix_socket_permissions=0700" start >>
> "pg_upgrade_server.log" 2>&1"
> Consult the last few lines of "pg_upgrade_server.log" for
> the probable cause of the failure.
>
> pg_ctl failed to start the old server, or connection failed
> Failure, exiting
>
>
> when going to the log file:
>
>    pg_upgrade run on Tue Jun 18 11:58:08 2013
> -----------------------------------------------------------------
>
> command: "/usr/local/pgsql.old/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D
> "/usr/local/pgsql.old/data/" -o "-p 5432 -c autovacuum=off -c $
> waiting for server to start....LOG:  database system was shut down at
> 2013-06-18 11:30:47 CST
> LOG:  database system is ready to accept connections
> ...........................................................could not start
> server
>
>
>
>
>
>
> --
> View this message in context:
http://postgresql.1045698.n5.nabble.com/PG-UPGRADE-issues-this-utility-can-only-upgrade-to-postgresql-version-9-2-tp5759509p5759711.html
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
>

Just a shot, but are you sure the user you're running the pg_upgrade
with has permissions to start the backend in /usr/local/pgsql.old/data/
?   Can you do a test using pg_ctl? anything in postgres log?

Ziggy



Re: PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

От
jmfox180
Дата:
so i tried to do a

/usr/local/pgsql.old/bin/postgres -D /usr/local/pgsql.old/data start

LOG:  database system was shut down at 2013-06-19 08:10:51 CST
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

it got stuck there ^^

the i tried to
/usr/local/pgsql.old/bin/psql -p 5432

and it turns that
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

so basically i just moved the whole pgsql8.3.2 that i had to a new folder
which is pgsql.old with sudo mv etc,etc
but i can not turn on the 8.3 server, i did try to start the new one (9.2.4)
and yes i can.

any idea?



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PG-UPGRADE-issues-this-utility-can-only-upgrade-to-postgresql-version-9-2-tp5759509p5759873.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


Re: PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

От
Bruce Momjian
Дата:
On Mon, Jun 17, 2013 at 07:08:03PM -0400, Bruce Momjian wrote:
> On Mon, Jun 17, 2013 at 10:54:06AM -0700, jmfox180 wrote:
> > so i'm running ubuntu 12.04 with pg8.3.2 installed on it, i want to upgrade
> > to 9.2.4 using the pg_upgrade. i've followed this steps:
> >
> > 1) download postgres9.2.4
> > 2)configure it and compile it
> > 3) make and install the pg_upgrade and pg_upgrade_support utilities from the
> > pg9.2.4 contrib folder
> > 4) init the pg9.2.4 cluster with:  initdb -D /usr/local/pgsql9.2.4/data
> > 5) try to check for compatibilities between the 2 clusters and getting the
> > following error while logged into postgres user account.
> >
> > command>>
> > /usr/local/pgsql9.2.0/bin/./pg_upgrade -b /usr/local/pgsql/bin/ -B
> > /usr/local/pgsql9.2.0/bin/ -c -d /usr/local/pgsql/data/ -D
> > /usr/local/pgsql9.2.0/data/
> >
> > error>>
> > cannot write to log file pg_upgrade_internal.log
> > Failure, exiting
> >
> > 6) so i decided to move on and just do an upgrade without the -c (check for
> > compatibilities) :
> >
> >             6.1) stop both servers
> >             6.2) run the same command without the -c to upgrade and getting
> > :
> >                " this utility can only upgrade to postgresql version 9.2"
> >
> > please enlighten me or give me any advice.
>
> You need write permission in the current directory.  My guess is that
> your /usr/local/pgsql9.2.0/data/ isn't really 9.2.

FYI, this is the same person posting as Marcos Cano.  I am working with
him via private email.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


Re: Re: PG_UPGRADE issues "this utility can only upgrade to postgresql version 9.2."

От
Ziggy Skalski
Дата:

On 13-06-19 10:16 AM, jmfox180 wrote:
so i tried to do a 

/usr/local/pgsql.old/bin/postgres -D /usr/local/pgsql.old/data start

LOG:  database system was shut down at 2013-06-19 08:10:51 CST
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started

it got stuck there ^^

the i tried to 
/usr/local/pgsql.old/bin/psql -p 5432

and it turns that 
psql: could not connect to server: No such file or directoryIs the server running locally and acceptingconnections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

so basically i just moved the whole pgsql8.3.2 that i had to a new folder
which is pgsql.old with sudo mv etc,etc
but i can not turn on the 8.3 server, i did try to start the new one (9.2.4)
and yes i can.

any idea?



--
View this message in context: http://postgresql.1045698.n5.nabble.com/PG-UPGRADE-issues-this-utility-can-only-upgrade-to-postgresql-version-9-2-tp5759509p5759873.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.



Does the file /var/run/postgresql/.s.PGSQL.5432.lock exist on the system you're trying to upgrade ?   If so, what's inside (cat it), does it point to your /usr/local/pgsql.old/data directory?  I've found that in my (limited) experience with pg_upgrade, it's good to run the upgrade from /tmp directory, that way the lock file gets created there and usually there's no write permission problems in /tmp either :)

Ziggy