Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to completely disable PostgreSQL

Discussion in 'Database Discussion' started by Kent Brockman, Dec 26, 2017.

Tags:
  1. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,181
    Likes Received:
    7
    Trophy Points:
    168
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello guys. I want to completely disable/uninstall PostgreSQL in my servers. What's the recommended procedure? I googled around a bit and found cPanel Docs don't provide this information and there are some tuts with dates around 5-10 years ago, like this one:
    how to remove postgresql out of WHM/cpanel completely ?

    I found that deactivating the service in Service Manager, doesn't completely delete the RPMs nor deleted the Postgres icons from cPanel screens. In fact, I'm receiving every night a report from some cron task:

    Code:
    Subject:
    Cron <root@s080> /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
    
    Content:
    warn [update_db_cache] postgres is stopped
    So, I wanted to ask for updated information. Please. Thanks in advance!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 Kent Brockman, Dec 26, 2017
    Last edited: Dec 26, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,720
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    To disable PostgreSQL, you'd need to take the following steps:

    1. Remove the PostgreSQL RPMs (not the cpanel-postgresql RPMS). EX:

    Code:
    yum remove postgresql
    rpm -e --nodeps postgresql-libs-9.2.23-3.el7_4.x86_64
    2. Select "PostgreSQL" in the "Disabled" feature list via "WHM >> Feature Manager".

    I completed these steps on a test system and the PostgreSQL options were no longer visible. Additionally, the service was automatically removed.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Kent Brockman likes this.
  3. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,181
    Likes Received:
    7
    Trophy Points:
    168
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    Excelent! Worked like a charm. Thank you very much!

    PS: You should consider adding this information to the docs ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Kent Brockman

    Kent Brockman Well-Known Member

    Joined:
    Jan 20, 2008
    Messages:
    1,181
    Likes Received:
    7
    Trophy Points:
    168
    Location:
    Buenos Aires, Argentina
    cPanel Access Level:
    Root Administrator
    Twitter:
    As a footnote, I also disabled the icon of phpPgAdmin in the "Disabled" feature.
    Is there any possibility to uninstall it as well? or won't it do any hurt?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,720
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The feature name itself isn't automatically removed, but there's no harm in leaving it enabled. As far as documentation, I recommend voting and adding feedback to the following feature request instead, as removing system RPMs (the install script simply installs PostgreSQL from the OS repos) isn't something we'd typically document:

    Improved PostgreSQL support

    If support for PostgreSQL were to be improved, the ability to install or uninstall it would be offered directly from WHM.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Kent Brockman likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice