RE: pg_upgrade 10.2

From: Murthy Nunna <mnunna(at)fnal(dot)gov>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: RE: pg_upgrade 10.2
Date: 2018-06-12 20:58:25
Message-ID: DM5PR09MB151597B492B84C4E7FC8E099B87F0@DM5PR09MB1515.namprd09.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-performance

Thanks Adrian.
I removed "-k" flag. But still got same error.

There seems to be a postmaster servicing the old cluster.
Please shutdown that postmaster and try again.
Failure, exiting

-----Original Message-----
From: Adrian Klaver [mailto:adrian(dot)klaver(at)aklaver(dot)com]
Sent: Tuesday, June 12, 2018 3:48 PM
To: Murthy Nunna <mnunna(at)fnal(dot)gov>; pgsql-general(at)lists(dot)postgresql(dot)org; pgsql-admin(at)lists(dot)postgresql(dot)org; pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: pg_upgrade 10.2

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://urldefense.proofpoint.com/v2/url?u=https-3A__www.postgresql.org_docs_10_static_pgupgrade.html&d=DwID-g&c=gRgGjJ3BkIsb5y6s49QqsA&r=0wrsmPzpZSao0v32yCcG2Q&m=g2e1NMngBLIcEgi5UjlCHkyJ5zK1Su-vsaRw0Y9N0Dc&s=PDVmjA_uW6cJvV4lWR8vgkiArplzgd5Rs4taLA6ZY6Q&e=
> "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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Adrian Klaver 2018-06-12 21:13:27 Re: pg_upgrade 10.2
Previous Message Adrian Klaver 2018-06-12 20:47:30 Re: pg_upgrade 10.2

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Shutyaev 2018-06-12 21:11:08 Re: pg_upgrade and wraparound
Previous Message Adrian Klaver 2018-06-12 20:47:30 Re: pg_upgrade 10.2

Browse pgsql-performance by date

  From Date Subject
Next Message Adrian Klaver 2018-06-12 21:13:27 Re: pg_upgrade 10.2
Previous Message Adrian Klaver 2018-06-12 20:47:30 Re: pg_upgrade 10.2