Re: Upgrading error

From: chris navarroza <canavarroza(dot)work(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Upgrading error
Date: 2022-10-23 23:56:37
Message-ID: CADRdQ7r1EDYEm4HaaDewry+Sh-TY2FvGO3ngTx4JFk1-8-o3yA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Thanks for the reply!

Sorry I missed that line, but now I'm having new error.

[root(at)datamartds tmp]# sudo su postgres
bash-4.4$ cd /tmp
bash-4.4$ /usr/pgsql-14/bin/pg_upgrade
--old-datadir=/home/dmartuser/pgdata/data/
--new-datadir=/home/dmartuser/pgsql/14/data/
--old-bindir=/usr/pgsql-12/bin/ --new-bindir=/usr/pgsql-14/bin/
--old-options '-c config_file=/var/lib/pgsql/12/data/postgresql.conf'
--new-options '-c config_file=/var/lib/pgsql/14/data/postgresql.conf'
--check
Performing Consistency Checks
-----------------------------
Checking cluster versions ok

*failure*
Consult the last few lines of "pg_upgrade_server.log" for
the probable cause of the failure.

connection to server on socket "/tmp/.s.PGSQL.50432" failed: No such file
or directory
Is the server running locally and accepting connections on that
socket?

could not connect to source postmaster started with the command:
"/usr/pgsql-12/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D
"/home/dmartuser/pgdata/data" -o "-p 50432 -b -c
config_file=/var/lib/pgsql/12/data/postgresql.conf -c listen_addresses=''
-c unix_socket_permissions=0700 -c unix_socket_directories='/tmp'" start
Failure, exiting

Thanks,

Chris Albert Navarroza
Information Technology Officer I
CTCO - ITDS - RDMD

On Fri, Oct 21, 2022 at 10:08 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> chris navarroza <canavarroza(dot)work(at)gmail(dot)com> writes:
> > bash-4.4$ /usr/pgsql-14/bin/pg_upgrade
> > --old-datadir=/home/dmartuser/pgdata/data/
> > --new-datadir=/home/dmartuser/pgdata/data/
> --old-bindir=/usr/pgsql-12/bin/
> > --new-bindir=/usr/pgsql-14/bin/ --check --verbose
> > Running in verbose mode
> > Performing Consistency Checks
> > -----------------------------
> > Checking cluster versions
> > This utility can only upgrade to PostgreSQL version 14.
>
> You cannot use the same directory as --old-datadir and --new-datadir.
> I think pg_upgrade is unhappy because what it sees in PG_VERSION in
> the --new-datadir isn't v14 ... but I wonder if we shouldn't be
> checking for this mistake more directly.
>
> Anyway, the right way to proceed is to use v14's initdb to create
> a new directory at, say, /home/dmartuser/pgdata/data-14
> and then pg_upgrade to that. Afterwards you can rename the old
> data directory out of the way and move the new one to
> /home/dmartuser/pgdata/data, if you like.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-10-24 00:12:22 Re: Upgrading error
Previous Message Tom Lane 2022-10-23 16:58:13 Re: How to find an oid that's not uesd now?