Re: Upgrade Process Says "The database server was not shut down cleanly" but it was

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: TalGloz <glozmantal(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Upgrade Process Says "The database server was not shut down cleanly" but it was
Date: 2020-05-11 22:31:33
Message-ID: 188fe25e-4001-4df3-9287-2f89eea84cfe@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/11/20 2:45 PM, TalGloz wrote:
> Well I tried your steps, both Postgres 10 and 12 are in perfect running
> conditions and were shut down using the "systemctl" command. When I execute:
>
> /usr/pgsql-12/bin/pg_upgrade --old-bindir=/usr/pgsql-10/bin/
> --new-bindir=/usr/pgsql-12/bin/ --old-datadir=/var/lib/pgsql/10/data
> --new-datadir=/var/lib/pgsql/12/data --old-options '-c
> config_file=/var/lib/pgsql/10/data/postgresql.conf' --new-options '-c
> config_file=/var/lib/pgsql/12/data/postgresql.conf' --check

The --*-options are redundant as you have already pointed pg_upgrade at
them with --*-datadir. Not sure it has anything to do with this, but you
might want to take them out just to be sure.

Have you run:

ps ax| grep post

before and between steps to make sure there is not a Postgres instance
running?

>
> I get:
>
> Performing Consistency Checks
> -----------------------------
> 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
>
> *Clusters are compatible*
>
> But if I execute the same command right after that without the "--check"
> flag I get:
>
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions ok
>
> The target cluster was not shut down cleanly.
> Failure, exiting
>
>
> Both of the servers were still shut down. If I start form the beginning with
> a fresh Prostgres 12 installation and execute the upgrade command right away
> without the "--check" flag I get the problem described in my original post.
>
> Best regards,
> TalGlo
>
>
>
> --
> Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michel Pelletier 2020-05-11 23:26:53 Firing an event trigger for ADD COLUMN?
Previous Message TalGloz 2020-05-11 21:45:50 Re: Upgrade Process Says "The database server was not shut down cleanly" but it was