AIX Open Source

 View Only
  • 1.  postgresql 11.10: messedup initscript

    Posted Fri April 09, 2021 11:10 AM
    this happens on a NEW installed server after initdb. as you can see, your check for "PGMAJORVERSION" does not return the  major version hence this
    totally pointless error message which cost me ONE HOUR of my valuable lifetime. thank you for that.
    root@nimvie: /postgresql/11 # /etc/rc.d/init.d/postgresql start
    + PGVERSION=11.10
    + + echo 11.10
    + sed s/^\([0-9]*\.[0-9]*\).*$/\1/
    PGMAJORVERSION=11.10
    + PGDOCDIR=/opt/freeware/doc/postgresql-11.10
    + NAME=postgresql
    + PROG=postmaster
    + PGENGINE=/opt/freeware/bin
    + PGPORT=5432
    + PGDATA=/var/lib/postgresql/data
    + PGLOG=/var/lib/postgresql/pgstartup.log
    + [ -f /etc/sysconfig/postgresql/postgresql ]
    + . /etc/sysconfig/postgresql/postgresql
    + PGDATA=/postgresql/11/data
    + PGLOG=/postgresql/11/pgstartup.log
    + export PGDATA
    + export PGPORT
    + PIDFILE=/var/run/postmaster.5432.pid
    + LOCKFILE=/var/locks/postmaster.5432.lock
    + script_result=0
    + AWK=/usr/bin/awk
    + CAT=/usr/bin/cat
    + CHMOD=/usr/bin/chmod
    + CHOWN=/usr/bin/chown
    + ECHO=/usr/bin/echo
    + GREP=/usr/bin/grep
    + HEAD=/usr/bin/head
    + KILL=/usr/bin/kill
    + MKDIR=/usr/bin/mkdir
    + PRINTF=/usr/bin/printf
    + PS=/usr/bin/ps
    + RM=/usr/bin/rm
    + SLEEP=/usr/bin/sleep
    + SU=/usr/bin/su
    + TOUCH=/usr/bin/touch
    + startdb
    
    An old version of the database format was found.
    You need to dump and reload before using PostgreSQL 11.10.
    See /opt/freeware/doc/postgresql-11.10/README.rpm-dist for more information.
    ​


    ------------------------------
    I regret starting this entire conversation
    ------------------------------


  • 2.  RE: postgresql 11.10: messedup initscript

    Posted Wed April 14, 2021 03:32 AM
    Thanks for reporting the issue.
    Yes, the script needs update. 
    Looks like this script is created during postgresql 9.X.X releases when the first two fields are considered as the major version. 
    From version 10 onwards,  only the first field is considered as the major version and hence the script is no longer working correctly.
    We will update the script in 11.11 version which we are planning to upload to toolbox soon.

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