Re: Upgrading error

Поиск
Список
Период
Сортировка
От chris navarroza
Тема Re: Upgrading error
Дата
Msg-id CADRdQ7r1EDYEm4HaaDewry+Sh-TY2FvGO3ngTx4JFk1-8-o3yA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Upgrading error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

Thanks for the reply!

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

[root@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@sss.pgh.pa.us> wrote:
chris navarroza <canavarroza.work@gmail.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to find an oid that's not uesd now?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Upgrading error