Join the community today
Become a Member

Stable Branch update PostgreSQL default to 17.x in 131.00stable

Discussion in 'Centmin Mod Github Commits' started by eva2000, Sep 28, 2024.

  1. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    5:51 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    update PostgreSQL default to 17.x in 131.00stable

    - when POSTGRESQL='y' set in the persistent config file /etc/centminmod/custom_config.inc prior to centmin.sh menu option 5 PHP upgrade/recompiles, it will install PostgreSQL server and compile PHP-FPM with postgresql support
    - update default PostgreSQL version from 16 to 17 https://www.postgresql.org/about/news/postgresql-17-released-2936/ and release notes https://www.postgresql.org/docs/17/release-17.html
    - note postgreSQL is provided as is, you need to know how to manage, tune and administer PostgreSQL server yourself. If you had previous ran this and installed PostgreSQL 16, you may now have 2 versions of PostgreSQL 16 and 17 installed with their own service files and data directories and need to now how to deal with them yourself and any existing data on prior version for migration into newer version as per release notes instructions https://www.postgresql.org/docs/17/release-17.html. PostgreSQL 17 might not start up as it would bind on same default port 5432 as running on existing PostgreSQL 16 server if that exists, so would need to change port temporarily for PostgreSQL 17 config file /var/lib/pgsql/17/data/postgresql.conf until data migration is completed.

    sed -i 's|^#port = 5432|port = 5433|' /var/lib/pgsql/17/data/postgresql.conf
    systemctl restart postgresql-17

    systemctl status postgresql-17 --no-pager -l
    ● postgresql-17.service - PostgreSQL 17 database server
    Loaded: loaded (/usr/lib/systemd/system/postgresql-17.service; enabled; preset: disabled)
    Active: active (running) since Sat 2024-09-28 12:06:05 UTC; 3s ago
    Docs: https://www.postgresql.org/docs/17/static/
    Process: 1060418 ExecStartPre=/usr/pgsql-17/bin/postgresql-17-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
    Main PID: 1060423 (postgres)
    Tasks: 7 (limit: 48716)
    Memory: 18.2M
    CPU: 28ms
    CGroup: /system.slice/postgresql-17.service
    ├─1060423 /usr/pgsql-17/bin/postgres -D /var/lib/pgsql/17/data/
    ├─1060424 "postgres: logger "
    ├─1060425 "postgres: checkpointer "
    ├─1060426 "postgres: background writer "
    ├─1060428 "postgres: walwriter "
    ├─1060429 "postgres: autovacuum launcher "
    └─1060430 "postgres: logical replication launcher "


    Sep 28 12:06:05 almalinux9dev2 systemd[1]: Starting PostgreSQL 17 database server...
    Sep 28 12:06:05 almalinux9dev2 postgres[1060423]: 2024-09-28 12:06:05.260 UTC [1060423] LOG: redirecting log output to logging collector process
    Sep 28 12:06:05 almalinux9dev2 postgres[1060423]: 2024-09-28 12:06:05.260 UTC [1060423] HINT: Future log output will appear in directory "log".
    Sep 28 12:06:05 almalinux9dev2 systemd[1]: Started PostgreSQL 17 database server.

    ss -plt | grep 54
    LISTEN 0 200 127.0.0.1:5432 0.0.0.0:* users:(("postgres",pid=107728,fd=8))
    LISTEN 0 200 127.0.0.1:5433 0.0.0.0:* users:(("postgres",pid=1060423,fd=8))
    LISTEN 0 200 [::1]:5432 [::]:* users:(("postgres",pid=107728,fd=7))
    LISTEN 0 200 [::1]:5433 [::]:* users:(("postgres",pid=1060423,fd=7))

    php --ri pdo_pgsql
    pdo_pgsql
    PDO Driver for PostgreSQL => enabled
    PostgreSQL(libpq) Version => 17.0

    showing both v16 and v17 if you had prior v16 installed

    yum -q list installed | grep postgresql
    postgresql16.x86_64 16.4-1PGDG.rhel9 @pgdg16
    postgresql16-contrib.x86_64 16.4-1PGDG.rhel9 @pgdg16
    postgresql16-devel.x86_64 16.4-1PGDG.rhel9 @pgdg16
    postgresql16-libs.x86_64 16.4-1PGDG.rhel9 @pgdg16
    postgresql16-server.x86_64 16.4-1PGDG.rhel9 @pgdg16
    postgresql17.x86_64 17.0-2PGDG.rhel9 @pgdg17
    postgresql17-contrib.x86_64 17.0-2PGDG.rhel9 @pgdg17
    postgresql17-devel.x86_64 17.0-2PGDG.rhel9 @pgdg17
    postgresql17-libs.x86_64 17.0-2PGDG.rhel9 @pgdg17
    postgresql17-server.x86_64 17.0-2PGDG.rhel9 @pgdg17

    Continue reading...

    131.00stable branch