pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Upgrading error
5+ messages / 2 participants
[nested] [flat]

* Upgrading error
@ 2022-10-21 07:52 chris navarroza <canavarroza.work@gmail.com>
  2022-10-21 14:08 ` Re: Upgrading error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: chris navarroza @ 2022-10-21 07:52 UTC (permalink / raw)
  To: pgsql-general

Hi,

I have a postgresql server version 12.9 and trying to upgrade it to 14.5.
My OS is Centos 8 Stream and I already managed to install postgresql14.5
but when I'm trying to upgrade, I am encountering this error

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.
Failure, exiting

I can't seem to find any solution in the internet. Please help!

Sincerely,
butching

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Upgrading error
  2022-10-21 07:52 Upgrading error chris navarroza <canavarroza.work@gmail.com>
@ 2022-10-21 14:08 ` Tom Lane <tgl@sss.pgh.pa.us>
  2022-10-23 23:56   ` Re: Upgrading error chris navarroza <canavarroza.work@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2022-10-21 14:08 UTC (permalink / raw)
  To: chris navarroza <canavarroza.work@gmail.com>; +Cc: pgsql-general

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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Upgrading error
  2022-10-21 07:52 Upgrading error chris navarroza <canavarroza.work@gmail.com>
  2022-10-21 14:08 ` Re: Upgrading error Tom Lane <tgl@sss.pgh.pa.us>
@ 2022-10-23 23:56   ` chris navarroza <canavarroza.work@gmail.com>
  2022-10-24 00:12     ` Re: Upgrading error Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: chris navarroza @ 2022-10-23 23:56 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: 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
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Upgrading error
  2022-10-21 07:52 Upgrading error chris navarroza <canavarroza.work@gmail.com>
  2022-10-21 14:08 ` Re: Upgrading error Tom Lane <tgl@sss.pgh.pa.us>
  2022-10-23 23:56   ` Re: Upgrading error chris navarroza <canavarroza.work@gmail.com>
@ 2022-10-24 00:12     ` Tom Lane <tgl@sss.pgh.pa.us>
  2022-10-24 00:20       ` Re: Upgrading error chris navarroza <canavarroza.work@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2022-10-24 00:12 UTC (permalink / raw)
  To: chris navarroza <canavarroza.work@gmail.com>; +Cc: pgsql-general

chris navarroza <canavarroza.work@gmail.com> writes:
> 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

Did you look into the postmaster log (pg_upgrade_server.log, here)
to see what it thought about the problem?  I'm guessing there's
something that kept it from starting, but there's no evidence
offered here about what.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Upgrading error
  2022-10-21 07:52 Upgrading error chris navarroza <canavarroza.work@gmail.com>
  2022-10-21 14:08 ` Re: Upgrading error Tom Lane <tgl@sss.pgh.pa.us>
  2022-10-23 23:56   ` Re: Upgrading error chris navarroza <canavarroza.work@gmail.com>
  2022-10-24 00:12     ` Re: Upgrading error Tom Lane <tgl@sss.pgh.pa.us>
@ 2022-10-24 00:20       ` chris navarroza <canavarroza.work@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: chris navarroza @ 2022-10-24 00:20 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general

This is the log I got.
-----------------------------------------------------------------
  pg_upgrade run on Mon Oct 24 07:41:13 2022
-----------------------------------------------------------------

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 >>
"pg_upgrade_server.log" 2>&1
waiting for server to start....2022-10-23 23:41:13.458 GMT [107444] LOG:
 skipping missing configuration file
"/home/dmartuser/pgdata/data/postgresql.auto.conf"
2022-10-24 07:41:13.459 PST [107444] LOG:  starting PostgreSQL 12.9 on
x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat
8.5.0-4), 64-bit
2022-10-24 07:41:13.460 PST [107444] LOG:  listening on Unix socket
"/tmp/.s.PGSQL.50432"
2022-10-24 07:41:13.486 PST [107444] LOG:  redirecting log output to
logging collector process
2022-10-24 07:41:13.486 PST [107444] HINT:  Future log output will appear
in directory "log".
 stopped waiting
pg_ctl: could not start server
Examine the log output.

Thanks,

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


On Mon, Oct 24, 2022 at 8:12 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> chris navarroza <canavarroza.work@gmail.com> writes:
> > 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
>
> Did you look into the postmaster log (pg_upgrade_server.log, here)
> to see what it thought about the problem?  I'm guessing there's
> something that kept it from starting, but there's no evidence
> offered here about what.
>
>                         regards, tom lane
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2022-10-24 00:20 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21 07:52 Upgrading error chris navarroza <canavarroza.work@gmail.com>
2022-10-21 14:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-10-23 23:56   ` chris navarroza <canavarroza.work@gmail.com>
2022-10-24 00:12     ` Tom Lane <tgl@sss.pgh.pa.us>
2022-10-24 00:20       ` chris navarroza <canavarroza.work@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox