AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  PostgreSQL 15 in AIX Toolbox

    Posted Fri November 24, 2023 06:40 AM

    PostgreSQL 11.x version has reached end of life and is no longer supported by the community. AIX Toolbox team will be uploading PostgreSQL 15 (15.4) to AIX Toolbox soon. It is therefore recommended that customers use PostgreSQL 15 going forward from AIX Toolbox.

    Since this is a major version update, internal data storage format is subject to change. Thus, users are requested to perform the steps necessary to migrate their databases. There are several methods to migrate database from one major version to another (traditional backup and restore method is preferred (section 19.6.1)).  For detailed information on the various methods and the steps involved in database migration, please refer https://www.postgresql.org/docs/15/upgrading.html . Users are recommended to go through this link before updating to the new version.

    In order to alert the users of this, we have made couple of packaging changes.

    1.     1. RPMS have been renamed from postgresql to postgresql15. So, inorder to install postgresql 15 one has to run the following command

    dnf install postgresql15

    2.     2. We have also added Conflicts: postgresql-libs < 15 in postgresql15 spec file. As a result, if an older version of postgresql is already installed in the system, then the installation would fail with the following error.      

    package postgresql15-libs-15.4-1.ppc conflicts with postgresql-libs < 15 provided by postgresql-libs-11.20-1.ppc

    In this case, one has to remove the older version of postgresql first and then install the new version.

    For example:-

    Suppose the database directory is /var/lib/postgresql/data, following would be the sequence of steps to migrate the database.

    1.     1. Create a backup of the existing database

           pg_dumpall > outputfile

    2.     2. Shut down the old server

           pg_ctl -D /var/lib/postgresql/data -l logfile stop

    3.     3. Rename the old installation directory just in case some issue is encountered and one wants to revert back to it

           mv /var/lib/postgresql/data /var/lib/postgresql/data.bak

    4.     4. Install the new version of postgresql

    5.     5. Create a new database cluster if needed

           initdb -D /var/lib/postgresql/data

    6.     6. Start the database server

           pg_ctl -D /var/lib/postgresql/data -l logfile start

    7.     7. Restore the data from backup

           psql -d postgres -f outputfile



    ------------------------------
    RESHMA KUMAR
    ------------------------------


  • 2.  RE: PostgreSQL 15 in AIX Toolbox

    Posted Mon November 27, 2023 05:35 AM

    postgresql15-15.4-1.aix7.1.ppc.rpm is now available in AIX Toolbox.



    ------------------------------
    RESHMA KUMAR
    ------------------------------



  • 3.  RE: PostgreSQL 15 in AIX Toolbox

    Posted Thu January 11, 2024 01:28 PM
    Edited by Erich Wolz Thu January 11, 2024 01:30 PM

    I recently ran "dnf update" on all my servers to bring all the RPMs to current levels, and encountered one web server that has postgresql-libs-11.20-1.ppc installed.  Not sure why, since I am not aware of any PostgreSQL databases on the system (and in fact I don't even have the psql command installed).  However, removing postgresql-libs would result in the removal of mod_ssl, php, and httpd -- which I definitely need for my web server :-)   Not sure how to proceed:

    # dnf remove postgresql-libs
    Dependencies resolved.
    =============================================================================================
     Package                         Architecture        Version                   Repository                    Size
    =============================================================================================
    Removing:
     postgresql-libs                 ppc                 11.20-1                   @AIX_Toolbox                 4.5 M
    Removing dependent packages:
     mod_ssl                         ppc                 2.4.58-1                  @AIX_Toolbox                 954 k
     php                             ppc                 7.4.33-1                  @AIX_Toolbox                  30 M
    Removing unused dependencies:
     apr-util                        ppc                 1.6.3-1                   @AIX_Toolbox                 1.0 M
     httpd                           ppc                 2.4.58-1                  @AIX_Toolbox                  12 M
     
    Transaction Summary
    =============================================================================================
    Remove  5 Packages
     
    Freed space: 49 M
    Is this ok [y/N]: n
    Operation aborted.



    ------------------------------
    Erich Wolz
    ------------------------------



  • 4.  RE: PostgreSQL 15 in AIX Toolbox

    Posted Fri January 12, 2024 09:22 AM

    We have created separate sub-rpm for pgsql support in apr-util with apr-util-1.6.3-2. 
    Please refresh the dnf repo, update apr-util and then dnf erase/remove postgresql-libs.



    ------------------------------
    Ayappan P
    ------------------------------



  • 5.  RE: PostgreSQL 15 in AIX Toolbox

    Posted Fri January 12, 2024 09:46 AM

    Apr-util provides a postgresql module which needs postgresql-libs. We have rebuilt and published apr-util 1.6.3-2 to avoid postgresql-libs dependency in the main apr-util rpm. Apr-util postgresql module is now provided through a separate sub-rpm. Please update apr-util to version 1.6.3-2 and then you can remove postgresql-libs.

    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/apr-util/apr-util-1.6.3-2.aix7.1.ppc.rpm



    ------------------------------
    RESHMA KUMAR
    ------------------------------



  • 6.  RE: PostgreSQL 15 in AIX Toolbox

    Posted Fri January 12, 2024 01:15 PM

    Thanks, that did the trick!



    ------------------------------
    Erich Wolz
    ------------------------------