GMS - Postgres super old versions

One customer is on 24.2 , another is on 24.3 . The first one has Postgres 13 , the second one Postgres 12 .

Pretty strange, older Postgres is version 12.7, released 2021, newer is 13.9 which was released 2022. 

In both cases these versions are very very old and customers security department doesn't like it.

Thanks

David

Tags:

  • 0

    I think it's up to you to update the OS from the repos which includes Postgres?

    my gms 24.3 on SLES 15 has Postgres 14 and 16, though I'm not sure which is being used by gms

  • 0   in reply to 

    The GMS install.sh will install postgresql like this :

    echo "Installing postgreSQL..."
    zypper -n in postgresql-server
    zypper -n in postgresql-contrib

    So what is available to zypper is what is installed.

  • 0   in reply to   

    Hi Rob,

    this information is relevant only for new installation. If I upgrade I will stick with that old Postgres version. Which highest Postgres version is supported ? 

    Thanks

    David

  • 0 in reply to   

    right, but it's not going to change major versions of postgres without going through a migration procedure.  My GMS server running SLES 15 (SP4 originally, upgraded to SP5 yesterday) has Postgres 14, 15 and 16 installed, but 14 is the active version.  And 14 is now unsupported in SP5, it's no longer in the repos (though I think there's a "Legacy" module that can be added that will bring back Postgres 14 repo support if I understand the docs correctly).

    gms:~ # zypper search -s -i postgresql
    Loading repository data...
    Reading installed packages...
    
    S  | Name                 | Type    | Version             | Arch   | Repository
    ---+----------------------+---------+---------------------+--------+------------------------------------------------
    i  | postgresql           | package | 16-150500.10.6.1    | noarch | SLE-Module-Basesystem15-SP5-Updates
    i  | postgresql           | package | 16-150500.10.6.1    | noarch | SLE-Module-Packagehub-Subpackages15-SP5-Updates
    i+ | postgresql-contrib   | package | 16-150500.10.6.1    | noarch | SLE-Module-Packagehub-Subpackages15-SP5-Updates
    i+ | postgresql-contrib   | package | 16-150500.10.6.1    | noarch | SLE-Module-Server-Applications15-SP5-Updates
    i  | postgresql-llvmjit   | package | 16-150500.10.6.1    | noarch | SLE-Module-Packagehub-Subpackages15-SP5-Updates
    i+ | postgresql-server    | package | 16-150500.10.6.1    | noarch | SLE-Module-Packagehub-Subpackages15-SP5-Updates
    i+ | postgresql-server    | package | 16-150500.10.6.1    | noarch | SLE-Module-Server-Applications15-SP5-Updates
    i  | postgresql14         | package | 14.10-150200.5.36.1 | x86_64 | (System Packages)
    i  | postgresql14-contrib | package | 14.10-150200.5.36.1 | x86_64 | (System Packages)
    i  | postgresql14-llvmjit | package | 14.10-150200.5.36.1 | x86_64 | SLE-Module-Packagehub-Subpackages15-SP5-Updates
    i  | postgresql14-server  | package | 14.10-150200.5.36.1 | x86_64 | (System Packages)
    i  | postgresql15         | package | 15.8-150200.5.30.1  | x86_64 | SLE-Module-Basesystem15-SP5-Updates
    i  | postgresql15-contrib | package | 15.8-150200.5.30.1  | x86_64 | SLE-Module-Server-Applications15-SP5-Updates
    i  | postgresql15-server  | package | 15.8-150200.5.30.1  | x86_64 | SLE-Module-Server-Applications15-SP5-Updates
    

    When I run "rcpostgresql status", after listing all the instances running it says:

    Nov 25 15:39:34 gms postgresql-script[10717]: Your database files were created by PostgreSQL version 14.
    Nov 25 15:39:34 gms postgresql-script[10717]: Using the executables in /usr/lib/postgresql14/bin.

    There's a procedure to migrate to a new Postgres version in the SLES upgrade guide: 

    https://documentation.suse.com/sles/15-SP6/html/SLES-all/cha-update-preparation.html#sec-update-preparation-postgresql

    So I think it's up to us to migrate between major versions, unless such procedure is added to the gms install script at some point.

  • 0   in reply to 

    Thanks.

    With GMS supported on SLES 15 SP6, should be Postgres 16 supported too, because now is the version 16 default as stated in same document .

    I will do the migration. 

    David

  • 0 in reply to   

    I just tried migrating to Postgres 15.... let's just say thanks for vmware snapshots, as it did not go well.  not sure if I screwed something up or what, but for the moment I'm back to 14.  

  • 0 in reply to   

    did you attempt your migration yet?  success?

  • 0   in reply to 

    It's in a queue. Maybe tomorrow, I will report back.

    David

  • 0 in reply to   

    in the meantime I added the "Legacy" module, which brought back repo support for Postgresql14, and then migrated to SLES 15 SP6 (which moved Postgresql15 into the legacy repo as well, and added Postgresql 17.2 as the default).  This also resulted in updating Postgresql14 to the latest release, 14.15.

    GMS 24.4 seems to be working fine on SLES 15 SP6 and Postgresql 14.15.

    As Postgresql 14 is supported for two more years (to November 2026) and it's in the SLES Legacy15-SP6 repo, I think I'm content to stay with that for now. 

  • 0   in reply to   

    I've done this multiple times in the past

    There are many scripts out there for doing this using pg's own pg_upgrade.  Workflow involves having a source and destination of data dir, and script uses pg_ugrade tools to copy the data to destination, changes the default pg engine then restarts pg using new engine

    Used to be a script included with gms, based on much older versions of pg whuch was easyvto modify

    I'll provide example later as I'm on mobile currently

    Rodney

    If you found this post useful, give it a "Like" or click on "Verify Answer" under the "More" button.   This helps others.