old cluster does not use data checksums but the new one does

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

old cluster does not use data checksums but the new one does

Mariel Cherkassky
Hey,
I'm trying to upgrade from PG9.6 to PG11.2 but I'm getting the following error : 
old cluster does not use data checksums but the new one does

As you can understand from the message, my old cluster doesnt use data checksums and I want t enable this feature in the newer version. Is there any way to handle it ?
Reply | Threaded
Open this post in threaded view
|

Re: old cluster does not use data checksums but the new one does

Bruce Momjian
On Sun, May  5, 2019 at 02:32:46PM +0300, Mariel Cherkassky wrote:

> Hey,
> I'm trying to upgrade from PG9.6 to PG11.2 but I'm getting the following error
> : 
>
> old cluster does not use data checksums but the new one does
>
>
> As you can understand from the message, my old cluster doesnt use data
> checksums and I want t enable this feature in the newer version. Is there any
> way to handle it ?

You have to initialize your new cluster with checksums disabled.

--
  Bruce Momjian  <[hidden email]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Reply | Threaded
Open this post in threaded view
|

Re: old cluster does not use data checksums but the new one does

Mariel Cherkassky
So basically I dont have any other option ?
My only option is doing the upgrade with other tools and not with pg_upgrade ?

‫בתאריך יום א׳, 5 במאי 2019 ב-15:04 מאת ‪Bruce Momjian‬‏ <‪[hidden email]‬‏>:‬
On Sun, May  5, 2019 at 02:32:46PM +0300, Mariel Cherkassky wrote:
> Hey,
> I'm trying to upgrade from PG9.6 to PG11.2 but I'm getting the following error
> : 
>
> old cluster does not use data checksums but the new one does
>
>
> As you can understand from the message, my old cluster doesnt use data
> checksums and I want t enable this feature in the newer version. Is there any
> way to handle it ?

You have to initialize your new cluster with checksums disabled.

--
  Bruce Momjian  <[hidden email]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +
Reply | Threaded
Open this post in threaded view
|

Re: old cluster does not use data checksums but the new one does

Scott Ribe-2
> On May 5, 2019, at 9:58 AM, Mariel Cherkassky <[hidden email]> wrote:
>
> My only option is doing the upgrade with other tools and not with pg_upgrade ?

Dump & restore; you're changing the on-disk file format, so attempts to use current disk files cannot work.

Reply | Threaded
Open this post in threaded view
|

Re: old cluster does not use data checksums but the new one does

Mariel Cherkassky
in aspect of upgrade, what will be faster, pg_upgrade or dump and restore each db in the cluster ?

‫בתאריך יום א׳, 5 במאי 2019 ב-19:11 מאת ‪Scott Ribe‬‏ <‪[hidden email]‬‏>:‬
> On May 5, 2019, at 9:58 AM, Mariel Cherkassky <[hidden email]> wrote:
>
> My only option is doing the upgrade with other tools and not with pg_upgrade ?

Dump & restore; you're changing the on-disk file format, so attempts to use current disk files cannot work.
Reply | Threaded
Open this post in threaded view
|

Re: old cluster does not use data checksums but the new one does

Scott Ribe-2
> On May 5, 2019, at 2:42 PM, Mariel Cherkassky <[hidden email]> wrote:
>
> in aspect of upgrade, what will be faster, pg_upgrade or dump and restore each db in the cluster ?

pg_upgrade is faster, potentially *MUCH* faster, but it does not allow you to change anything about the on-disk data structure, and storage of checksums is such a change.




Reply | Threaded
Open this post in threaded view
|

Re: old cluster does not use data checksums but the new one does

Mariel Cherkassky
I see. To be honest i'm not so familiar with the checksums feature but I understood that it is recommended to enable it in order to identify disk corruptions. How useful is it ? In my case I'm upgrading a cluster that was installed with checksums enabled so I have to choose between enabling it and increasing the downtime (I'm familiar with logical replication decided, in this case the upgrade happens when the system is down..) or disabling it and decreasing the downtime. The question is how bad is it if I'll disable it ?



‫בתאריך יום א׳, 5 במאי 2019 ב-23:44 מאת ‪Scott Ribe‬‏ <‪[hidden email]‬‏>:‬
> On May 5, 2019, at 2:42 PM, Mariel Cherkassky <[hidden email]> wrote:
>
> in aspect of upgrade, what will be faster, pg_upgrade or dump and restore each db in the cluster ?

pg_upgrade is faster, potentially *MUCH* faster, but it does not allow you to change anything about the on-disk data structure, and storage of checksums is such a change.


Reply | Threaded
Open this post in threaded view
|

Re: old cluster does not use data checksums but the new one does

Scott Ribe-2
In reply to this post by Mariel Cherkassky
> On May 5, 2019, at 2:42 PM, Mariel Cherkassky <[hidden email]> wrote:
>
> in aspect of upgrade, what will be faster, pg_upgrade or dump and restore each db in the cluster ?
>
> ‫בתאריך יום א׳, 5 במאי 2019 ב-19:11 מאת ‪Scott Ribe‬‏ <‪[hidden email]‬‏>:‬
> > On May 5, 2019, at 9:58 AM, Mariel Cherkassky <[hidden email]> wrote:
> >
> > My only option is doing the upgrade with other tools and not with pg_upgrade ?
>
> Dump & restore; you're changing the on-disk file format, so attempts to use current disk files cannot work.

In my opinion, depends on your confidence in your disks & file system etc. For instance, given enterprisey hardware (channel per disk, no half-backed SATA multipliers, decent disks) + ZFS with appropriate redundancy, I wouldn't see the need. On the other hand, a desktop PC with some multi-disk USB box, and hell yeah I want checksums. Systems in between, harder judgment call...