'Upgrade to postgres 10 wanting to use checksums

I have a postgresql 9.3 instance that I am wanting to upgrade to postgresql 10. I have a command that I think should work but it includes checksums in it. My old instance doesn't have checksums enabled (could it even be at all? Forget was too long ago) and that is preventing my dry run from working right.

Error message

Performing Consistency Checks on Old Live Server
------------------------------------------------
Checking cluster versions                                   ok

old cluster does not use data checksums but the new one does
Failure, exiting

My command stripped of real paths

time ${PGBINNEW}/pg_upgrade --old-bindir=${PGBINOLD} --new-bindir=${PGBINNEW} --old-datadir=${PGDATAOLD} --new-datadir=${PGDATANEW} --old-port=${PGPORT} --new-port=${PGPORT} --jobs=$(nproc | awk '{ {print ($1 > 4) ? 4 : ($1 == 1 ? 1 : $1 - 1)} }') --link --username=postgres --check

What can I do to resolve this?



Solution 1:[1]

Happened to me during pg_upgrade. I Just disabled the checksum with this:

$ pg_checksums -d /var/lib/postgres/data/
pg_checksums: syncing data directory
pg_checksums: updating control file
Checksums disabled in cluster

In my case /var/lib/postgres/data is the data directory. Yours might be different.

Solution 2:[2]

To Resolve above old cluster does not use data checksums but the new one does Failure, exiting error : while installing new data cluster

.initdb -k -D /your data directory path/ then perform the upgradation

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 S.Goswami
Solution 2 Krishna