Postgresql 服务器是否在主机上运行;localhost";?

Postgresql 服务器是否在主机上运行;localhost";?,postgresql,server,pg-hba.conf,Postgresql,Server,Pg Hba.conf,我对postgresql有意见。我看到一些帖子正在编辑pg_hba.conf,但它不起作用 以下是问题: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and

我对postgresql有意见。我看到一些帖子正在编辑pg_hba.conf,但它不起作用

以下是问题:

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused (0x0000274D/10061)
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 32?
could not connect to server: Connection refused (0x0000274D/10061)
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 32?
和我的pg_hba.conf:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

如果有人能给我解释一下,我不明白问题出在哪里。

你的博士后考试在进行吗?请尝试使用pgAdmin或某些客户端进行连接。@dassum我使用pgAdmin 4进行了连接,因此我认为它正在运行。编辑pg_hba.conf后是否重新启动或启动了postgres服务器?@wildplasser是的,从Windows上的“服务”重新启动了