Re: Question on upgrading postgresql from 10.7 to 11.5

Julien Rouhaud <[email protected]> Wed, 25 Dec 2019 16:36:24 +0100
Newsgroups gmane.comp.db.postgresql.general
Message-ID <CAOBaU_Zv8MmuLCx1EDgk45rSzYLB1_12pyezYRX=jKS+bcbSqg@mail.gmail.com>
On Wed, Dec 25, 2019 at 3:42 PM Lu, Dan <[email protected]> wrote:
>
> Hello,
>
> I am trying to upgrade my PG instance from 10.7 to 11.5.
>
> I got an error in doing so.  Any idea what I am missing?
>
> Example: pg_upgrade -d /hostname/pg/dpoc/data -D /hostname/pg/dpoc115/data -b /hostname/pg/PostgreSQL-10.7/bin -B /hostname/pg/PostgreSQL-11.5/bin -p 5432 -P 9432 -c -v
>
> Error message:
>
> old and new pg_controldata WAL segment sizes are invalid or do not match

The message is pretty much self explanatory.  It looks like you used
"initdb --wal-segsize" for the 11.5 cluster using a value different
from the one that were used in your 10.7 cluster (probably 16MB).  You
can check the value for each using "SHOW wal_segment_size".  You have
to recreate a new pg11 data directory using the same value as the 10.7
one.  While at it, you should update the pg11 binary to the latest
minor version, 11.6.