Upgrading to Buster but keeping Postgresql-9.6

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrading to Buster but keeping Postgresql-9.6

Phil Endecott-11
Dear Experts,

Does anyone have any advice about the possibility of upgrading
systems from Stretch to Buster, but keeping Postgresql-9.6 for
the time being?

This is for a couple of cloud servers that are running Postgresql
with streaming replication from one to the other.  I guess my
questions are: (a) will this actually work, i.e. will Postgresql-9.6
continue to run OK with the rest of the system upgraded, and (b)
what "apt magic runes" do I need to invoke to make it happen?  I
guess this is "pinning", is it?  That's not something I've ever
had to do before.

Many thanks for any suggestions.


(Please Cc: me in any replies, so I'll see them sooner.)


Phil.




Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

Jochen Spieker
Phil Endecott:
>
> Does anyone have any advice about the possibility of upgrading
> systems from Stretch to Buster, but keeping Postgresql-9.6 for
> the time being?

With previous Debian releases you always had to migrate your cluster to
the new Postgres version manually. The new packages are installed, but
the old ones stay around and you can pg_upgradecluster when you are
ready.

J.
--
I frequently find myself at the top of the stairs with absolutely
nothing happening in my brain.
[Agree]   [Disagree]
                 <http://archive.slowlydownward.com/NODATA/data_enter2.html>

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

andreimpopescu
In reply to this post by Phil Endecott-11
On Lu, 08 iul 19, 20:02:36, Phil Endecott wrote:
> Dear Experts,
>
> Does anyone have any advice about the possibility of upgrading
> systems from Stretch to Buster, but keeping Postgresql-9.6 for
> the time being?

Is upgrading to buster a necessity? Stretch will be supported by Debian
for one more year and probably some more by the LTS effort.

Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

Phil Endecott-11
Andrei POPESCU wrote:
> On Lu, 08 iul 19, 20:02:36, Phil Endecott wrote:
>> Dear Experts,
>>
>> Does anyone have any advice about the possibility of upgrading
>> systems from Stretch to Buster, but keeping Postgresql-9.6 for
>> the time being?
>
> Is upgrading to buster a necessity? Stretch will be supported by Debian
> for one more year and probably some more by the LTS effort.

Indeed, not upgrading to Buster is a possibility.  Also upgrading PostgreSQL
to version 11 is a possibility.  I think I understand the issues with each
of those options, but I don't have a good understanding of the issues with
trying to keep pg-9.6 on Buster.

(There doesn't seem to be a Debian-Postgresql mailing list, hmmm.)


Phil.




Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

Richard Hector
On 9/07/19 9:24 AM, Phil Endecott wrote:

> Andrei POPESCU wrote:
>> On Lu, 08 iul 19, 20:02:36, Phil Endecott wrote:
>>> Dear Experts,
>>>
>>> Does anyone have any advice about the possibility of upgrading
>>> systems from Stretch to Buster, but keeping Postgresql-9.6 for
>>> the time being?
>>
>> Is upgrading to buster a necessity? Stretch will be supported by
>> Debian for one more year and probably some more by the LTS effort.
>
> Indeed, not upgrading to Buster is a possibility.  Also upgrading
> PostgreSQL
> to version 11 is a possibility.  I think I understand the issues with each
> of those options, but I don't have a good understanding of the issues with
> trying to keep pg-9.6 on Buster.
Another option is to switch to using the pgdg repo for 9.6:

https://wiki.postgresql.org/wiki/Apt

I'm not sure if there are any implications of switching the packages for
the same version - I don't think so. I believe they're packaged by the
same person.

Richard


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

andreimpopescu
In reply to this post by Phil Endecott-11
On Lu, 08 iul 19, 22:24:17, Phil Endecott wrote:
> Andrei POPESCU wrote:
> >
> > Is upgrading to buster a necessity? Stretch will be supported by Debian
> > for one more year and probably some more by the LTS effort.
>
> Indeed, not upgrading to Buster is a possibility.  Also upgrading PostgreSQL
> to version 11 is a possibility.  I think I understand the issues with each
> of those options, but I don't have a good understanding of the issues with
> trying to keep pg-9.6 on Buster.

You can test that yourself as follows:

1. debootstrap buster in an empty directory.
2. chroot to it and add stretch to sources.list[1]
3. try to 'apt install' PostgreSQL forcing the version from stretch
   ('-t stretch' might work, otherwise you must use package/version)

Or just install buster in a VM.

If you need more help with any of the steps please do post exactly what
you did (full commands and output) as well as the output of
'apt policy'.

In case you get unresolvable dependency conflicts another option might
be to recompile the stretch PostgreSQL package(s) on buster (i.e.
forward-port), if the build dependencies are satisfiable on buster.

[1] setting Default-Release to buster or pinning recommended, but
probably not required, because apt *should* prefer the newer packages,
unless told to do otherwise (i.e. '-t stretch').

Kind regards,
Andrei
--
http://wiki.debian.org/FAQsFromDebianUser

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

Teemu Likonen-2
In reply to this post by Phil Endecott-11
Phil Endecott [2019-07-08T22:24:17+01] wrote:

> Indeed, not upgrading to Buster is a possibility. Also upgrading
> PostgreSQL to version 11 is a possibility. I think I understand the
> issues with each of those options, but I don't have a good
> understanding of the issues with trying to keep pg-9.6 on Buster.

Your PostgreSQL use seems to be far more advanced than mine so don't
take this as recommendation. I will just describe what I remember from
upgrades. I think I have upgraded Debian PostgreSQL three times now and
last time just a couple of days ago from 9.6 (Debian 9) to 11 (Debian
10).

  - Debian meta package "postgresql" depends on the supported version of
    database server. Debian distribution upgrade from Debian 9 to 10
    upgrades the meta package and it brings new version of PostgreSQL.

  - On upgrade (install of postgresql-11) the old version
    (postgresql-9.6) is kept but the server is shut down and it won't be
    started automatically anymore on system boot. All databases remain.
    I _think_ that the old version still works.

  - After upgrade the new version is started automatically but does not
    contain the database cluster(s) of the old version. Clusters must be
    upgraded manually with commands:

        systemctl stop postgresql       # stop v11
        pg_dropcluster 11 main          # remove v11's default "main" cluster
        pg_upgradecluster 9.6 main      # convert "main" from v9.6 to v11
        systemctl start postgresql      # start v11

  - If PostgreSQL server software is removed (apt remove postgresql-9.6)
    the actual database cluster data still remains under
    /var/lib/postgresql directory. If the server software is purged (apt
    purge postgresql-9.6) then the data is also removed.

--
///  OpenPGP key: 4E1055DC84E9DFF613D78557719D69D324539450
//  https://keys.openpgp.org/search?q=tlikonen@...
/  https://keybase.io/tlikonen  https://github.com/tlikonen

signature.asc (497 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

Phil Endecott-11
In reply to this post by Richard Hector
Richard Hector wrote:

> Another option is to switch to using the pgdg repo for 9.6:
>
> https://wiki.postgresql.org/wiki/Apt

Thanks Richard, that looks like the best solution.  They even
have a mailing list.


Cheers, Phil.





Reply | Threaded
Open this post in threaded view
|

Re: Upgrading to Buster but keeping Postgresql-9.6

Clemens Eisserer
Hi Phil,

> Thanks Richard, that looks like the best solution.  They even
> have a mailing list.

I have have really enjoyed using docker for such issues - mix&match
useland as you like it - without interfering with you "main"
distribution and without any performance overhead.

Br, Clemens

Br, Clemens