Re: PostgreSQL Upgrade 11 to 12

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: pgdba pgdba <postgresdba12(at)outlook(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL Upgrade 11 to 12
Date: 2021-01-08 09:01:57
Message-ID: 5f70e1608090b381911551e534732e7c914a89f5.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, 2021-01-08 at 08:20 +0000, pgdba pgdba wrote:
> Hi everyone,
> I want to upgrade the postgresql cluster. The structure I use is streaming replication method on 2 nodes(one master, one slave). The version I want to upgrade is 11 to 12.
> but I am getting the following error during the upgrade. Can you support me? Thanks.
>
> -bash-4.2$ /usr/pgsql-12/bin/pg_upgrade --old-datadir=/var/lib/pgsql/11/data --new-datadir=/var/lib/pgsql/12/data --old-bindir=/usr/pgsql-11/bin --new-bindir=/usr/pgsql-12/bin --check
> Performing Consistency Checks on Old Live Server
> ------------------------------------------------
> Checking cluster versions ok
> Checking database user is the install user ok
> Checking database connection settings ok
> Checking for prepared transactions ok
> Checking for reg* data types in user tables ok
> Checking for contrib/isn with bigint-passing mismatch ok
> Checking for tables WITH OIDS ok
> Checking for invalid "sql_identifier" user columns ok
> Checking for presence of required libraries ok
> Checking database user is the install user ok
> Checking for prepared transactions ok
> Checking for new cluster tablespace directories ok
> Error;
> -bash-4.2$ /usr/pgsql-12/bin/pg_upgrade --old-datadir=/var/lib/pgsql/11/data --new-datadir=/var/lib/pgsql/12/data --old-bindir=/usr/pgsql-11/bin --new-bindir=/usr/pgsql-12/bin
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions ok
>
> The source cluster was shut down while in recovery mode. To upgrade, use "rsync" as documented or shut it down as a primary.
> Failure, exiting

You cannot "pg_upgrade" the standby server.

Look at step 10 in the documentation at https://www.postgresql.org/docs/current/pgupgrade.html

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2021-01-08 09:04:23 Re: autovacuum_analyze_scale_factor and autovacuum_analyze_scale_factor
Previous Message pgdba pgdba 2021-01-08 08:20:34 PostgreSQL Upgrade 11 to 12