Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Sep 2023 23:58:47 -0700
From:      Kevin Bowling <kevin.bowling@kev009.com>
To:        Matthias Fechner <mfechner@freebsd.org>
Cc:        Kevin Bowling <kbowling@freebsd.org>, ports-committers@freebsd.org,  dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: 0c0bf56482b3 - main - Mk/bsd.default-versions.mk: Update to PostgreSQL 15
Message-ID:  <CAK7dMtCACsDcBmS_1WxuoGzDnb%2BxgA9zJCjDjzAP8=oVurydZw@mail.gmail.com>
In-Reply-To: <4e633eee-1573-3a7b-eeb5-57aed892fe09@freebsd.org>
References:  <202309081822.388IMQsO057995@gitrepo.freebsd.org> <4e633eee-1573-3a7b-eeb5-57aed892fe09@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 8, 2023 at 11:12=E2=80=AFPM 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=3Dutf-8 --lc-c=
ollate=3DC -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=C3=9F
> 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
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAK7dMtCACsDcBmS_1WxuoGzDnb%2BxgA9zJCjDjzAP8=oVurydZw>