Re: git: 0c0bf56482b3 - main - Mk/bsd.default-versions.mk: Update to PostgreSQL 15

From: Kevin Bowling <kevin.bowling_at_kev009.com>
Date: Sat, 09 Sep 2023 06:58:47 UTC
On Fri, Sep 8, 2023 at 11:12 PM Matthias Fechner <mfechner@freebsd.org> wrote:
>
> Dear Kevin,
>
> Am 08.09.2023 um 21:22 schrieb Kevin Bowling:
> > +  # service postgresql stop
> > +  # pkg create postgresql13-server postgresql13-contrib
> > +  # mkdir /tmp/pg-upgrade
> > +  # tar xf postgresql13-server-13.12.pkg -C /tmp/pg-upgrade
> > +  # tar xf postgresql13-contrib-13.12.pkg -C /tmp/pg-upgrade
> > +  # pkg delete -f databases/postgresql13-server databases/postgresql13-contrib databases/postgresql13-client
> > +
> > +  Now update PostgreSQL:
> > +
> > +    pkg user:
> > +    # pkg install databases/postgresql15-server databases/postgresql15-contrib
> > +    # pkg upgrade
> > +
> > +    Portmaster users:
> > +    # portmaster databases/postgresql15-server databases/postgresql15-contrib
> > +    # portmaster -a
> > +
> > +    Portupgrade users:
> > +    # portinstall databases/postgresql15-server databases/postgresql15-contrib
> > +    # portupgrade -a
> > +
> > +  After installing the new PostgreSQL version you need to convert
> > +  all your databases to new version:
> > +
> > +  # su -l postgres -c "/usr/local/bin/initdb --encoding=utf-8 --lc-collate=C -D /var/db/postgres/data15 -U postgres"
> > +  # su -l postgres -c "pg_upgrade -b/tmp/pg-upgrade/usr/local/bin/  -d/var/db/postgres/data13/ -B /usr/local/bin/  -D /var/db/postgres/data15/ -U postgres "
> > +
> > +  Now the migration is finished. You can start PostgreSQL again with:
> > +
> > +  # service postgresql start
>
> thanks a lot for your work and this really nice instructions.
>
> Should we maybe add this line to the postgres upgrade documentation?
> /usr/local/bin/vacuumdb -U postgres --all --analyze-in-stages

Sure feel free to add it

> Gruß
> Matthias
>
> --
>
> "Programming today is a race between software engineers striving to
> build bigger and better idiot-proof programs, and the universe trying to
> produce bigger and better idiots. So far, the universe is winning." --
> Rich Cook
>