• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Postgresql Installation bug

unibtc

New Pleskian
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
Plesk Web Pro edition, Plesk Onyx 17.5.3, Ubuntu 14.04.5 LTS‬

PROBLEM DESCRIPTION:
When installing postgresql server via Plesk > Tools & Settings > Updates and Upgrades > Add and Remove Product Components > PostgreSQL server support. This installs the latest version which is postgresql 9.6, which is not currently supported by plesk onyx. The installation goes tru perfectly but adding an admin user gives an error.
Internal error: ERROR: unrecognized role option "createuser" LINE 1: create user "admin" password 'xxxxxxx' createdb createuser ^
error thrown by DatabaseManagerPostgreSQL.php on line 360.

The reason for this error is because according to postgresql 9.6 release notes:
Remove the long-deprecated CREATEUSER/NOCREATEUSER options from CREATE ROLE and allied commands (Tom Lane)

CREATEUSER actually meant SUPERUSER, for ancient backwards-compatibility reasons. This has been a constant source of confusion for people who (reasonably) expect it to mean CREATEROLE. It has been deprecated for ten years now, so fix the problem by removing it.

Possible Resolution:
  • Allow user to choose which version of Postgresql to install.
  • Or, Update DatabaseManagerPostgreSQL.php to use the newer syntax:
    CREATE ROLE 'admin' WITH LOGIN PASSWORD 'xxxxxx' CREATEDB CREATEROLE;

 
Alternative Solution:
  • Go tru with the regular installation via Plesk > Tools & Settings > Updates and Upgrades > Add and Remove Product Components > PostgreSQL server support
  • Uninstall postgresql 9.6 -
    Code:
    /etc/init.d/postgresql stop && apt-get --purge remove postgresql\*
  • Install postgresql 9.5 and other components -
    Code:
    apt-get install postgresql-9.5 postgresql-client-9.5 postgresql-client-common postgresql-common postgresql-contrib-9.5
  • Check if postgresql is started
    Code:
    service postgresql status
    , if its not started, start it using
    Code:
    service postgresql start
  • Now you can add admin user via Plesk > Tools & Settings > Database Servers
 
Back
Top