pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Amn Ojee Uw <amnojeeuw@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Upgrading
Date: Sun, 30 Jul 2023 19:46:23 -0700
Message-ID: <c1ad730a-a84a-ae97-2f23-6891cb06ef26@aklaver.com> (raw)
In-Reply-To: <931207bb-42f2-3d1a-7b89-c5f3aa1c5b1a@gmail.com>
References: <2426dfb5-63f7-a166-5780-5433da798a9e@gmail.com>
	<20230730153437.bkogcoh4jyyzwjdz@hjp.at>
	<931207bb-42f2-3d1a-7b89-c5f3aa1c5b1a@gmail.com>

On 7/30/23 19:22, Amn Ojee Uw wrote:
> Thank you Ron and Peter for taking the time to respond to my call for help.
> 
> In summery, I'd like to use PostgreSQL-15.
> 
> However, since my Debian 12 already has already PostgreSQL-15 installed, 
> did I inadvertently overwrote PostgreSQL-15 when I installed 
> PostgreSQL-12? If so, how do I remove PostgreSQL-12 and continue on with 
> PostgreSQL-15.

Short answer

1) No you just created a new cluster. See result of:

pg_lsclusters

2) This assumes you don't have any valuable data in cluster. To remove 
first confirm cluster name below(main) with above command then:

pg_dropcluster 12 main


Longer answer read:

https://wiki.debian.org/PostgreSql

and for more in depth explanation two blogs I recently posted:

https://aklaver.org/wordpress/2023/06/29/postgres-debian-ubuntu-packagingpart-1/

https://aklaver.org/wordpress/2023/07/01/postgres-debian-ubuntu-packagingpart-2/

> 
> Please note that I installed using the following command
> 
> /*sudo apt-get -y install postgresql-12*/
> 
> Thanks in advance.
> 
> 
> On 7/30/23 11:34 a.m., Peter J. Holzer wrote:
>> On 2023-07-30 07:53:54 -0400, Amn Ojee Uw wrote:
>>> On my Debian 12, I installed PostgreSQL-12,
>> Where did you install that from?
>>
>> AFAICS, Debian 12 comes with PostgreSQL 15.
>>
>>> I'd like to upgrade to the latest release of PostgreSQL. So, my
>>> question is, what is the best way to upgrade to the next release of
>>> PostgreSQL?
>> If you stay with the same source, Just installing the new version and
>> then invoking pg_upgrade (or a variant - PGDG, Debian, Ubuntu have
>> pg_upgradecluster) should do the trick.
>>
>> If you switch sources, the setup may be sufficiently different that
>> pg_dump/pg_restore may be the easiest way.
>>
>>          hp
>>

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (8+ messages)

Message-ID: <c1ad730a-a84a-ae97-2f23-6891cb06ef26@aklaver.com>
Permalink:  ../c1ad730a-a84a-ae97-2f23-6891cb06ef26@aklaver.com/
Also on:    postgresql.org/message-id/c1ad730a-a84a-ae97-2f23-6891cb06ef26@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, amnojeeuw@gmail.com
  Subject: Re: Upgrading
  In-Reply-To: <c1ad730a-a84a-ae97-2f23-6891cb06ef26@aklaver.com>
  References: <2426dfb5-63f7-a166-5780-5433da798a9e@gmail.com> <20230730153437.bkogcoh4jyyzwjdz@hjp.at> <931207bb-42f2-3d1a-7b89-c5f3aa1c5b1a@gmail.com> <c1ad730a-a84a-ae97-2f23-6891cb06ef26@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