From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Murthy Nunna <mnunna@fnal.gov>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
To: pgsql-performance@lists.postgresql.org <pgsql-performance@lists.postgresql.org>
Subject: Re: pg_upgrade 10.2
Date: Tue, 12 Jun 2018 13:47:30 -0700
Message-ID: <1a3ebd40-7870-3eab-97d4-ca2b9907d917@aklaver.com> (raw)
In-Reply-To: <DM5PR09MB15157D85EB291E8F7EA62E25B87F0@DM5PR09MB1515.namprd09.prod.outlook.com>
References: <DM5PR09MB15157D85EB291E8F7EA62E25B87F0@DM5PR09MB1515.namprd09.prod.outlook.com>
On 06/12/2018 01:34 PM, Murthy Nunna wrote:
> In older versions of pg_upgrade (e.g from 9.2 to 9.3), I was able to run
> pg_upgrade without stopping old cluster using the check flag.
>
> pg_upgrade -b <old-bin> -B <new-bin> -d <old-data> -D <new-data> -p 5432
> -P 5434 -r -v -k -c
>
> Note the “c” flag at the end
I take the below to it mean it should work:
https://www.postgresql.org/docs/10/static/pgupgrade.html> "You can use pg_upgrade --check to perform only the checks, even if the
old server is still running. pg_upgrade --check will also outline any
manual adjustments you will need to make after the upgrade. If you are
going to be using link mode, you should use the --link option with
--check to enable link-mode-specific checks."
Might want to try without -k to see what happens.
More comments below.
> However pg_upgrade in 10 (I tried from 9.3 to 10.4), when I did not stop
> the old cluster, the upgrade failed:
>
> ***
>
> There seems to be a postmaster servicing the old cluster.
>
> Please shutdown that postmaster and try again.
>
> Failure, exiting
>
> Is this expected?
>
> Also, when I stopped the old cluster and ran pg_upgrade with “-c” flag,
> the file global/pg_control got renamed to global/pg_control.old. The
> “-c” flag never renamed anything in the old cluster in older pg_upgrade
Again seems related to -k:
"
If you ran pg_upgrade without --link or did not start the new server,
the old cluster was not modified except that, if linking started, a .old
suffix was appended to $PGDATA/global/pg_control. To reuse the old
cluster, possibly remove the .old suffix from $PGDATA/global/pg_control;
you can then restart the old cluster.
"
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: adrian.klaver@aklaver.com, mnunna@fnal.gov, pgsql-general@lists.postgresql.org, pgsql-admin@lists.postgresql.org, pgsql-performance@lists.postgresql.org
Subject: Re: pg_upgrade 10.2
In-Reply-To: <1a3ebd40-7870-3eab-97d4-ca2b9907d917@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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