RE: Question on upgrading postgresql from 10.7 to 11.5

2019-12-26 Thread Lu, Dan
Thanks!

I was misled by "pg_controldata" keyword and totally ignored the WAL segment 
size variable.

Much appreciated for your help.

-Original Message-
From: Julien Rouhaud [mailto:rjuju...@gmail.com]
Sent: Wednesday, December 25, 2019 10:36 AM
To: Lu, Dan 
Cc: pgsql-gene...@postgresql.org
Subject: Re: Question on upgrading postgresql from 10.7 to 11.5

On Wed, Dec 25, 2019 at 3:42 PM Lu, Dan  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.



IMPORTANT: The information contained in this email and/or its attachments is 
confidential. If you are not the intended recipient, please notify the sender 
immediately by reply and immediately delete this message and all its 
attachments. Any review, use, reproduction, disclosure or dissemination of this 
message or any attachment by an unintended recipient is strictly prohibited. 
Neither this message nor any attachment is intended as or should be construed 
as an offer, solicitation or recommendation to buy or sell any security or 
other financial instrument. Neither the sender, his or her employer nor any of 
their respective affiliates makes any warranties as to the completeness or 
accuracy of any of the information contained herein or that this message or any 
of its attachments is free of viruses.


Re: Question on upgrading postgresql from 10.7 to 11.5

2019-12-25 Thread Julien Rouhaud
On Wed, Dec 25, 2019 at 3:42 PM Lu, Dan  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.




Question on upgrading postgresql from 10.7 to 11.5

2019-12-25 Thread Lu, Dan
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
Failure, exiting



IMPORTANT: The information contained in this email and/or its attachments is 
confidential. If you are not the intended recipient, please notify the sender 
immediately by reply and immediately delete this message and all its 
attachments. Any review, use, reproduction, disclosure or dissemination of this 
message or any attachment by an unintended recipient is strictly prohibited. 
Neither this message nor any attachment is intended as or should be construed 
as an offer, solicitation or recommendation to buy or sell any security or 
other financial instrument. Neither the sender, his or her employer nor any of 
their respective affiliates makes any warranties as to the completeness or 
accuracy of any of the information contained herein or that this message or any 
of its attachments is free of viruses.