1

PostgreSQL 8.4 サーバーに 20 を超えるデータベースがあります。誰かが私の Postgres に何か問題を起こしたので、それが開かなくなりました。次のエラーが発生します。

error connecting to the server fatal role postgres is not permitted to log in

私はそれを回復するために多くのことをしましたが、まだ機能していません。Windows XP で PostgreSQL サーバー 8.4 を使用しています。

pg_hba.confファイル構成は次のとおりです。

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# IPv4 local connections:
#local   all   postgres                         ident sameuser
host    all         all         127.0.0.1/32          trust
#host    all         postgres trust 
#host    all         all         192.168.44.12/32      trust
#host    all         all         192.168.44.103/32     trust
# IPv6 local connections:
#host    all         all         192.168.44.18/32      trust
# host   all     all     ::1/128     md5

誰かROLEが Postgres ユーザーの を変更したため、問題がここにあると思われNOT LOG INます...

4

1 に答える 1

4

可能であれば、シングル ユーザー モードを試してください。postgres を停止し、コマンド ラインから実行します。

postgres --single -D path/to/your/postgres/directory

それで:

ALTER ROLE postgres WITH LOGIN

Ctrl-Dセッションを終了するために使用します。

これにより、postgresユーザーはサーバーにもう一度ログインできるようになります。

于 2013-03-02T05:08:33.963 に答える