Re: Upgrade 9.5 cluster on Ubuntu 16.04

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Vano Beridze <vanuatoo(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Upgrade 9.5 cluster on Ubuntu 16.04
Date: 2021-09-02 19:51:33
Message-ID: a6b670a2-5b3c-97dc-98ed-29ed52acfd16@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/2/21 11:55 AM, Vano Beridze wrote:
> I just want to upgrade to the OS and Postgres that is supported.
> If I just stop the service on both VMs and upgrade Ubuntu, then start
> Postgres, will it work or I should go with clean install and dump/restore?

Prudent behavior before you do any upgrading would be to:

1) Take pg_dumpall of cluster just before shutting it down.

2) Copy that dump off the VM's for extra safety.

Then you have choice of:

1) On new upgraded OS there will be a new 10 cluster created that has
only the template0, template1 and postgres databases. psql -f dump.sql
postgres per example here
https://www.postgresql.org/docs/10/app-pg-dumpall.html

2) Or use the pg_upgrade procedure shown here:

https://askubuntu.com/questions/1126847/will-a-release-upgrade-take-care-of-postgresql-upgrade-automatically

I would say if the database(s) are not that big I would go with 1).

>
> On Thu, Sep 2, 2021 at 10:41 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 9/2/21 11:34 AM, Vano Beridze wrote:
> >  > What repo are you getting Postgres from, Ubuntu or PGDG?
> > Ubuntu
>
> So you are going to get version 10.
>
> Is that what you want?
>
> If you want to move to something newer then this maybe the time to move
> to the PGDG repos, as they allow you to install any of the current
> supported versions of Postgres.
>
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nikolay Samokhvalov 2021-09-02 21:21:26 Re: Upgrade 9.5 cluster on Ubuntu 16.04
Previous Message Tom Lane 2021-09-02 19:44:09 Re: Querying a table with jaccard similarity with 1.6 million records take 12 seconds