On 01/18 12:12, Florian Obser wrote:
> Hi there!
> 
> when upgrading postgres from 17 -> 18, following the pkg readme "Option
> 2: pg_upgrade" one ends up here:
> 
> ------------------------------------------------------------------------
> # su _postgresql -c "cd /var/postgresql && \
> >     pg_upgrade -b /usr/local/bin/postgresql-17/ -B /usr/local/bin \
> >     -U postgres -d /var/postgresql/data-17/ -D /var/postgresql/data"
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions                                     ok
> 
> old cluster does not use data checksums but the new one does
> Failure, exiting
> ------------------------------------------------------------------------
> 
> I found two ways around this.
> 
> 1. use --no-data-checksums during upgrade
> -----------------------------------------
> su _postgresql -c "mkdir /var/postgresql/data && cd /var/postgresql && \
>     initdb -D /var/postgresql/data -U postgres -A scram-sha-256 -E UTF8 -W 
> --no-data-checksums"
> 
> 2. enable data checksums *before* the upgrade
> ---------------------------------------------
> rcctl stop postgresql
> su _postgresql -c '/usr/local/bin/pg_checksums -e -D /var/postgresql/data'
> rcctl start postgresql
> 
> 
> I suspect enabling data checksums is the preferred method as this seems
> to be the default now? I think we should update the pkg-readme and / or
> current.html.

Thank you for reporting this. I agree with your recommendation.

Best,
Jeremy

Reply via email to