pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Vano Beridze <vanuatoo@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Upgrade 9.5 cluster on Ubuntu 16.04
Date: Thu, 2 Sep 2021 12:51:33 -0700
Message-ID: <a6b670a2-5b3c-97dc-98ed-29ed52acfd16@aklaver.com> (raw)
In-Reply-To: <CANmF5MCgWSGtq4+KEB37ch0Ljuyh=D6PSUmew5oE1+sRkyXmow@mail.gmail.com>
References: <CANmF5MDMAUSvURfQhAMPy8VReLjyUEh0nF=zTtNmsRb5GwNMmA@mail.gmail.com>
	<52fa93d2-d934-87c4-e2e2-29856c6cdaab@aklaver.com>
	<CANmF5MANPu=YMx_=aZgWhJOcK0q-uTyHwFNVaUxYvCB1v72AoQ@mail.gmail.com>
	<5f7b4e6e-e5da-2bab-7f03-c271c369f717@aklaver.com>
	<CANmF5MCgWSGtq4+KEB37ch0Ljuyh=D6PSUmew5oE1+sRkyXmow@mail.gmail.com>

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-autom...

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.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.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.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (9+ messages)  latest in thread

Message-ID: <a6b670a2-5b3c-97dc-98ed-29ed52acfd16@aklaver.com>
Permalink:  ../a6b670a2-5b3c-97dc-98ed-29ed52acfd16@aklaver.com/
Also on:    postgresql.org/message-id/a6b670a2-5b3c-97dc-98ed-29ed52acfd16@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, vanuatoo@gmail.com
  Subject: Re: Upgrade 9.5 cluster on Ubuntu 16.04
  In-Reply-To: <a6b670a2-5b3c-97dc-98ed-29ed52acfd16@aklaver.com>
  References: <CANmF5MDMAUSvURfQhAMPy8VReLjyUEh0nF=zTtNmsRb5GwNMmA@mail.gmail.com> <52fa93d2-d934-87c4-e2e2-29856c6cdaab@aklaver.com> <CANmF5MANPu=YMx_=aZgWhJOcK0q-uTyHwFNVaUxYvCB1v72AoQ@mail.gmail.com> <5f7b4e6e-e5da-2bab-7f03-c271c369f717@aklaver.com> <CANmF5MCgWSGtq4+KEB37ch0Ljuyh=D6PSUmew5oE1+sRkyXmow@mail.gmail.com> <a6b670a2-5b3c-97dc-98ed-29ed52acfd16@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox