Service PostgreSQL Initdb [FAILED]

Source: Internet
Author: User

First, the scene

There may be a problem with the configuration when installing PostgreSQL "The problem is that I changed the pg_hba.conf in the local column ident to peer will be wrong" cause the service does not come, error is as follows:

[[Email protected] ~] # /etc/init.d/postgresql Restart stopping PostgreSQL service:                               [  OK  ]starting PostgreSQL service:                               [FAILED]

So I reinstalled postgresql-server with yum Remove and yum install.

Execute Command # service PostgreSQL INITDB Error following installation is complete:

[[Email protected] ~] # Service PostgreSQL Initdb  is  not empty!                               [FAILED]
Ii. Solutions

The web says this command executes only once and does not need to be executed a second time. Said is equal not to say.

Look again at the error message, the data directory is not empty.

My idea is to

[[Email protected] ~] # Cd/var/lib/pgsql [[Email protected] ~] # move Data datatemp

Then execute # service PostgreSQL initdb OK again.

[[email protected] pgsql] # lsbackups  data  datatemp  Pgstartup.log

Then I will be OK to serve again.

[[Email protected] ~] # /etc/init.d/postgresql Start Starting PostgreSQL service:                               [  OK  ]

The author starof, because the knowledge itself in the change, the author is also constantly learning and growth, the content of the article is not updated regularly, in order to avoid misleading readers, convenient tracing, please reprint annotated source: http://www.cnblogs.com/starof/p/4773364. HTML has a problem welcome to discuss with me, common progress.

Service PostgreSQL Initdb [FAILED]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.