Thanks to all for you we have solved “old and new pg_controldata WAL segment sizes are invalid or do not match ” issue during upgrade.

Below command details
PWD : /usr/pgsql-12/bin
1. Stop the server 12
2. Remove all data from location /var/lib/pgsql/12/data
3. Go to /usr/pgsql-12/bin
4. Run below command
./initdb -D /var/lib/pgsql/12/data -U postgres --wal-segsize=64
5. run Upgrade command :
/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/
Regards,
Ram Pratap.
Lava International Limited.
Tel+ 91-120-4637148
-----Original Message-----
From: Michael Paquier [mailto:michael@paquier.xyz]
Sent: 29 June 2020 13:05
To: Bruce Momjian
Cc: Stephen Frost; Tom Lane; Jeff Janes; Ram Pratap Maurya; pgsql-bugs
Subject: Re: BUG #16497: old and new pg_controldata WAL segment sizes are invalid or do not match
On Sat, Jun 27, 2020 at 05:26:10PM -0400, Bruce Momjian wrote:
> Instead of mentioning a specific wal_level "or higher", I decided to
> just mention the WAL level _not_ to use; patch attached.
Sounds fine to me, thanks!
--
Michael