postgresql server start and then immediately stop

Posted 我本坏蛋

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了postgresql server start and then immediately stop相关的知识,希望对你有一定的参考价值。


I had the same issue installing 9.1.4 on Windows 7. I managed to find a solution online that worked.

The steps I followed are:

  1. Uninstall PostgreSQL
  2. Delete the postgres user if it still exists.

    net user postgres /delete
  3. Create the postgres user with a password you can remember

    net user /add postgres <password>
  4. Add the postgres user to the Administrators group

    net localgroup administrators postgres /add
  5. Add the postgres user to the Power Users group

    net localgroup "power users" postgres /add
  6. Run a command window as the postgres user

    runas /user:postgres cmd.exe
  7. Run the install file from within the command window.

    C:Downloadpostgresql-9.1.4-1-windows.exe

    This should run the installation successfully.

  8. Remove the postgres user from the Administrators group.

    net localgroup administrators postgres /delete

 源链接:https://dba.stackexchange.com/questions/10241/postgresql-the-database-cluster-initialization-failed

 



以上是关于postgresql server start and then immediately stop的主要内容,如果未能解决你的问题,请参考以下文章

Start/Stop PostgreSQL on Mac

在 PostgreSQL 中授予对函数 pg_start_backup 的执行不起作用

PostgreSQL pg_ctl start超时分析

linux设置postgresql开机自启动

安装 postgresql92-server postgresql92-contrib 时缺少 libssl.so.10

PostgreSQL Server进程检查启动脚本